bitsandbytes quantizes on-the-fly: loads full bf16 weights (~54GB RAM peak) before compressing to int4. Kills the 40GB OptiPlex on torch.compile warmup. Fix in next commit: switch serve phase to llama.cpp + GGUF Q4_K_M. Pre-quantized weights load directly — peak RAM ~16GB, no compile overhead.
30 lines
891 B
Django/Jinja
30 lines
891 B
Django/Jinja
[Unit]
|
|
Description=vLLM inference server — {{ llm_hf_model }}
|
|
After=network.target nvidia-persistenced.service
|
|
Wants=nvidia-persistenced.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User={{ llm_venv_owner }}
|
|
Group={{ llm_venv_owner }}
|
|
Environment="HF_TOKEN={{ vault_hf_token }}"
|
|
Environment="HOME=/home/{{ llm_venv_owner }}"
|
|
Environment="HF_HUB_CACHE={{ llm_hf_cache_dir }}"
|
|
ExecStart={{ llm_venv_path }}/bin/python -m vllm.entrypoints.openai.api_server \
|
|
--model {{ llm_hf_model }} \
|
|
--host {{ llm_serve_host }} \
|
|
--port {{ llm_serve_port }} \
|
|
--quantization {{ llm_quantization }} \
|
|
--gpu-memory-utilization {{ llm_gpu_memory_utilization }} \
|
|
--max-model-len {{ llm_max_model_len }} \
|
|
--enable-prefix-caching
|
|
Restart=on-failure
|
|
RestartSec=10
|
|
TimeoutStartSec=300
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=vllm-serve
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|