You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,20 @@ TE_MODEL_DOWNLOAD_PATH=# Download location for model
28
28
HF_HUB_DISABLE_PROGRESS_BARS=#boolean to use progress bars for HuggingFace model downloads; defaults to 'true' in deployed contexts
29
29
```
30
30
31
+
## Configuring an Embedding Model
32
+
33
+
This CLI application is designed to create embeddings for input texts. To do this, a pre-trained model must be identified and configured for use.
34
+
35
+
To this end, there is a base embedding class `BaseEmbeddingModel` that is designed to be extended and customized for a particular embedding model.
36
+
37
+
Once an embedding class has been created, the preferred approach is to set env vars `TE_MODEL_URI` and `TE_MODEL_DOWNLOAD_PATH` directly in the `Dockerfile` to a) download a local snapshot of the model during image build, and b) set this model as the default for the CLI.
38
+
39
+
This allows invoking the CLI without specifying a model URI or local location, allowing this model to serve as the default, e.g.:
40
+
41
+
```shell
42
+
uv run --env-file .env embeddings test-model-load
43
+
```
44
+
31
45
## CLI Commands
32
46
33
47
For local development, all CLI commands should be invoked with the following format to pickup environment variables from `.env`:
0 commit comments