Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alessandrospallina/sentencetransformersserver
API Server for SentenceTransformers' embedders
https://github.com/alessandrospallina/sentencetransformersserver
Last synced: about 19 hours ago
JSON representation
API Server for SentenceTransformers' embedders
- Host: GitHub
- URL: https://github.com/alessandrospallina/sentencetransformersserver
- Owner: AlessandroSpallina
- License: gpl-3.0
- Created: 2023-08-28T11:21:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-14T08:25:58.000Z (about 1 year ago)
- Last Synced: 2024-04-18T02:11:33.558Z (7 months ago)
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SentenceTransformersServer
This project implements an API server for SentenceTransformers' embedders which aims to be a drop-in replacement for [llama-cpp-python's webserver embeddings](https://github.com/abetlen/llama-cpp-python#web-server).
## Why should I use it?
If you are using the llama-cpp-python webserver and you are experiencing poor embedding performance, now you can try another embedder without modifying your client code!## Quickstart
Clone the project
```bash
git clone https://github.com/AlessandroSpallina/SentenceTransformersServer.git
```Choose the model you want to use for the embedding, [here](https://www.sbert.net/docs/pretrained_models.html#sentence-embedding-models/) all the supported models from SentenceTransformers.
Keep in mind that the right model to pick mostly depends on your use case and your data, so try some similarity search in order to understand which model fits better your needs. For example you can start by comparing [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) and [all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2). You might want to check [this leaderboard](https://huggingface.co/spaces/mteb/leaderboard) too.
When you are done, rename the .env.example to .env and modify the model name accordingly. If you are behind a corporate proxy remember to uncomment the right section in the docker-compose.yml file.
Then impose your hands on the keyboard, close your eyes and
```bash
docker compose up
```