vLLM (OpenAI-compatible server) serving Qwen3.8-27B W4A16 AutoRound on 2x RTX 3060 12GB (tensor parallel 2), with the syv-ai "fast variant" MTP speculative decoding patches.
Serves on http://<host>:11434, model name: Qwen3.8-27B.
Marcin116/Qwen3.8-27B-W4A16-AutoRound-fast-embed-int4 — the assembled
"fast" variant of syvai/qwen3.8-27b-3090-fast-variant (base:
born2bewild/Qwen3.8-27B-W4A16-AutoRound-fast).
Key fact: the MTP module uses a reduced 40,960-token draft vocabulary
(mtp_draft_vocab_ids.pt) instead of the full 248,320 vocab. Stock vLLM
builds a full-size draft head and crashes at
vocab_parallel_embedding.py:480. This repo ships the two required patches
from syv-ai/qwen38-27b-rtx3090.
| Problem | Patch |
|---|---|
embed_tokens missing quant_config / prefix → load failure in main model & predictor |
patches/embed_quant.patch (applied to models/qwen3_5.py) |
draft_lm_head (40,960 rows) vs full vocab assert, and .pt vocab-id loading |
patches/mtp_patch.patch (applied to models/qwen3_5_mtp.py) |
The patched files are pre-built in models/ — no image rebuild needed; they
are bind-mounted over the stock modules.
-
Ensure the model snapshot exists locally (vLLM can download it, but you must add the extra files it skips):
HF_HOME=/root/.cache/huggingface \ python3 scripts/download_extra_files.py
(Requires
huggingface_hub:pip install huggingface_hub, or run inside the container:docker run --rm -v /root/.cache/huggingface:/root/.cache/huggingface vllm/vllm-openai:qwen38 python3 /scripts/download_extra_files.pyafter mounting.) -
Start:
docker compose up -d
-
Verify:
curl http://localhost:11434/v1/models curl http://localhost:11434/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model":"Qwen3.8-27B","messages":[{"role":"user","content":"1+1=?"}],"max_tokens":64}'
- Model path: the compose command passes the local snapshot dir, not
the HF repo id. This is required — the patch resolves
mtp_draft_vocab_ids.ptrelative tomodel_config.model. With the repo id, the file would not be found and the draft head silently falls back. - Context length: with bf16 KV cache the practical ceiling on 2x 3060 is
~60k tokens; this compose file uses
--kv-cache-dtype fp8, which roughly doubles it (profiler estimate ~121k, configured 120000). The original 128000 request does NOT fit (needs 2.46 GiB KV vs 2.36 GiB available). - Versions: image
vllm/vllm-openai:qwen38(vLLM 0.1.dev19754+g3a0914114, Python 3.12 dist-packages path). Patches are validated against vLLM 0.28.0 and apply cleanly here; line numbers may drift in other versions. --enforce-eagerdisables torch.compile/CUDAGraphs; first token incurs Triton JIT latency. Measured: ~9 tok/s decode, MTP acceptance ~68-74%.