Files

26 lines
1.2 KiB
Bash

# Settings of the ML service on a GPU host; copy to
# ~/.config/lincodex-ml/ml.env (mode 600) and replace the placeholders. The
# token is a secret: generate it on the host, for example
# python3 -c 'import secrets; print(secrets.token_hex(32))'
# and give the same value to the backend as ML_SERVICE_TOKEN.
ML_EMBEDDER=giga,qwen3
ML_DEVICE=cuda
# float16 fits both models in about 2.4 GiB of VRAM; see the precision note in
# docs/en/DEPLOYMENT.md#ml-service-on-a-gpu-host before changing it.
ML_DTYPE=float16
# Allocator cap of the process; the CUDA context adds about 130 MiB.
ML_CUDA_MEMORY_LIMIT_MB=2300
ML_TORCH_THREADS=4
ML_MICRO_BATCH=1
ML_VERIFY_WEIGHTS=true
# A private address of the host, never 0.0.0.0.
ML_LISTEN_HOST=<private-ip>
ML_LISTEN_PORT=<port>
# Directories with the pinned files (a Hugging Face snapshot directory works)
# and the lock files of the release that pin them.
ML_GIGA_MODEL_DIR=<directory of ai-sage/Giga-Embeddings-instruct-480M-0826 at the pinned revision>
ML_GIGA_MODEL_LOCK=<release>/ml/model/giga-embeddings-480m.lock.json
ML_QWEN3_MODEL_DIR=<directory of Qwen/Qwen3-Embedding-0.6B at the pinned revision>
ML_QWEN3_MODEL_LOCK=<release>/ml/model/qwen3-embedding-0.6b.lock.json
ML_SERVICE_TOKEN=<generated on the host>