# vllm-qwen3 stack tunables. Copy this to `.env` on the server before deploying. # # cp .env.example .env # # edit .env with real values # docker compose up -d # Image version — pin for reproducibility (`latest` for edge) VLLM_VERSION=latest # Host ports (container always listens on 8000 internally) EMBED_PORT=8001 RERANK_PORT=8002 # GPU assignment — both services share this GPU # (ana-ml2 has 0 and 1; default 1 keeps 0 free for heavy LLM work) GPU_ID=1 # Models — reference by full repo name in API requests EMBED_MODEL=Qwen/Qwen3-Embedding-0.6B RERANK_MODEL=Qwen/Qwen3-Reranker-0.6B # GPU memory split — fractions are of TOTAL GPU memory, not free memory. # When two vLLM services share a GPU, each profiler needs its own slice to # fit both the model and KV cache, so small values cause the second-to-start # service to OOM on KV cache allocation. 0.40 + 0.40 leaves ~20% headroom # and is comfortably above the minimum for two 0.6B Qwen3 models at 8k ctx. EMBED_GPU_MEM_UTIL=0.40 RERANK_GPU_MEM_UTIL=0.40 # Context length caps — lower these if VRAM is tight. # Qwen3-Embedding supports up to 32k; reranker up to 32k. EMBED_MAX_MODEL_LEN=8192 RERANK_MAX_MODEL_LEN=8192 # Optional API key — leave blank for no auth (fine on the internal network). # If set, both services require `Authorization: Bearer `. API_KEY= # HuggingFace token — only needed for gated models HF_TOKEN=