Skip to content

Commit 9db7cfa

Browse files
committed
Rename huggingface-embeddings -> sentencetransformers in embeddings.md for consistency with the backend structure
The Dockerfile still knows the "huggingface-embeddings" backend (I assume for compatibility reasons) but uses the sentencetransformers backend under the hood anyway. I figured it would be good to update the docs to use the new naming to make it less confusing moving forward. As the docker container knows both the "huggingface-embeddings" and the "sentencetransformers" backend, this should not break anything. Signed-off-by: Marcus Köhler <[email protected]>
1 parent 19639d4 commit 9db7cfa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/content/features/embeddings.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,23 @@ curl http://localhost:8080/embeddings -X POST -H "Content-Type: application/json
6161

6262
## Huggingface embeddings
6363

64-
To use `sentence-transformers` and models in `huggingface` you can use the `huggingface` embedding backend.
64+
To use `sentence-transformers` and models in `huggingface` you can use the `sentencetransformers` embedding backend.
6565

6666
```yaml
6767
name: text-embedding-ada-002
68-
backend: huggingface-embeddings
68+
backend: sentencetransformers
6969
embeddings: true
7070
parameters:
7171
model: all-MiniLM-L6-v2
7272
```
7373
74-
The `huggingface` backend uses Python [sentence-transformers](https://github.com/UKPLab/sentence-transformers). For a list of all pre-trained models available see here: https://github.com/UKPLab/sentence-transformers#pre-trained-models
74+
The `sentencetransformers` backend uses Python [sentence-transformers](https://github.com/UKPLab/sentence-transformers). For a list of all pre-trained models available see here: https://github.com/UKPLab/sentence-transformers#pre-trained-models
7575

7676
{{% notice note %}}
7777

78-
- The `huggingface` backend is an optional backend of LocalAI and uses Python. If you are running `LocalAI` from the containers you are good to go and should be already configured for use. If you are running `LocalAI` manually you must install the python dependencies (`pip install -r /path/to/LocalAI/extra/requirements`) and specify the extra backend in the `EXTERNAL_GRPC_BACKENDS` environment variable ( `EXTERNAL_GRPC_BACKENDS="huggingface-embeddings:/path/to/LocalAI/backend/python/sentencetransformers/sentencetransformers.py"` ) .
79-
- The `huggingface` backend does support only embeddings of text, and not of tokens. If you need to embed tokens you can use the `bert` backend or `llama.cpp`.
80-
- No models are required to be downloaded before using the `huggingface` backend. The models will be downloaded automatically the first time the API is used.
78+
- The `sentencetransformers` backend is an optional backend of LocalAI and uses Python. If you are running `LocalAI` from the containers you are good to go and should be already configured for use. If you are running `LocalAI` manually you must install the python dependencies (`pip install -r /path/to/LocalAI/extra/requirements`) and specify the extra backend in the `EXTERNAL_GRPC_BACKENDS` environment variable ( `EXTERNAL_GRPC_BACKENDS="sentencetransformers:/path/to/LocalAI/backend/python/sentencetransformers/sentencetransformers.py"` ) .
79+
- The `sentencetransformers` backend does support only embeddings of text, and not of tokens. If you need to embed tokens you can use the `bert` backend or `llama.cpp`.
80+
- No models are required to be downloaded before using the `sentencetransformers` backend. The models will be downloaded automatically the first time the API is used.
8181

8282
{{% /notice %}}
8383

0 commit comments

Comments
 (0)