This is a basic embedding server using llama-cpp-python.
You can run it with:
fastapi run main.py
If you have multiple CPUs and would like to run multiple processes you can run
fastapi run --workers <num_workers> main.py
There is also a docker image published to Github packages that can be used as well.
https://github.com/users/shichongrui/packages/container/package/embeddings-server
By default the server will use nomic-ai/nomic-embed-text-v1.5 model quantized to Q4_K_M.
You can use any GGUF model on HuggingFace by setting the following two environment variables
REPO_ID=<hugging-face-repo-id>
FILE_NAME=<quantized-file-name-to-use>
python -m venv .venv
source .venv/bin/activate
pip install -r
fastapi run main.py
echo <token> | docker login ghcr.io -u shichongrui --password-stdin
docker build -t embeddings-server .
docker tag embeddings-server ghcr.io/shichongrui/embeddings-server:latest
docker push ghcr.io/shichongrui/embeddings-server:latest
5 commits
Python
80.2%
Dockerfile
19.8%
This is a basic embedding server using llama-cpp-python.
You can run it with:
fastapi run main.py
If you have multiple CPUs and would like to run multiple processes you can run
fastapi run --workers <num_workers> main.py
There is also a docker image published to Github packages that can be used as well.
https://github.com/users/shichongrui/packages/container/package/embeddings-server
By default the server will use nomic-ai/nomic-embed-text-v1.5 model quantized to Q4_K_M.
You can use any GGUF model on HuggingFace by setting the following two environment variables
REPO_ID=<hugging-face-repo-id>
FILE_NAME=<quantized-file-name-to-use>
python -m venv .venv
source .venv/bin/activate
pip install -r
fastapi run main.py
echo <token> | docker login ghcr.io -u shichongrui --password-stdin
docker build -t embeddings-server .
docker tag embeddings-server ghcr.io/shichongrui/embeddings-server:latest
docker push ghcr.io/shichongrui/embeddings-server:latest
5 commits
Python
80.2%
Dockerfile
19.8%