Views
No views yet
| Component | Precision | Notes |
|---|---|---|
MoE experts (gate_proj, up_proj, down_proj) | INT4 (GPTQ) | 30,720 modules quantized |
Full attention (q_proj, k_proj, v_proj, o_proj) | FP16 | Every 4th layer |
Linear attention (in_proj_qkv, in_proj_z, out_proj) | FP16 | Full precision |
| Shared experts | FP16 | Full precision |
Vision encoder (model.visual.*) | BF16 | 333 tensors, full precision |
MTP module (mtp.*) | BF16 | 785 tensors, full precision |
| Embeddings, LM head, norms | FP16 | Full precision |
| Version | Size | Compression |
|---|---|---|
| BF16 (original) | 67 GB | - |
| GPTQ 8-bit | 40 GB | 1.7x |
| GPTQ 4-bit | 25 GB | 2.7x |
| Model | Perplexity | Degradation |
|---|---|---|
| BF16 (original) | 6.0695 | - |
| GPTQ 8-bit | 6.0748 | +0.09% |
| GPTQ 4-bit | 6.1260 | +0.93% |
1vllm serve btbtyler09/Qwen3.5-35B-A3B-GPTQ-4bit \
2 --gpu-memory-utilization 0.95 \
3 --max-model-len 256000 \
4 --tensor-parallel-size 4 \
5 --reasoning-parser qwen3 \
6 --enable-auto-tool-choice --tool-call-parser qwen3_coder \
7 --dtype float16 \
8 --skip-mm-profiling \
9 --limit-mm-per-prompt '{"image": 2}'| Parameter | Description |
|---|---|
--gpu-memory-utilization 0.95 | Use 95% of GPU VRAM for KV cache + weights |
--max-model-len 256000 | Full 256K context window support |
--tensor-parallel-size 4 | Shard across 4 GPUs (adjust to your setup) |
--reasoning-parser qwen3 | Enable thinking/reasoning token parsing |
--enable-auto-tool-choice --tool-call-parser qwen3_coder | Enable tool/function calling |
--dtype float16 | Run in FP16 (required for ROCm GPTQ kernels) |
--skip-mm-profiling | Skip multimodal memory profiling at startup |
--limit-mm-per-prompt '{"image": 2}' | Allow up to 2 images per request |
vLLM bug workaround: vLLM versions up to at least 0.15.2 have a bug inQwen3_5MoeTextConfigwhereignore_keys_at_rope_validationis defined as alistinstead of aset, causing aTypeErrorduring config parsing. Apply this fix before serving:python1python3 -c " 2for f in [ 3 '/usr/local/lib/python3.12/dist-packages/vllm/transformers_utils/configs/qwen3_5_moe.py', 4 '/usr/local/lib/python3.12/dist-packages/vllm/transformers_utils/configs/qwen3_5.py', 5]: 6 t = open(f).read() 7 t = t.replace( 8 'ignore_keys_at_rope_validation\"] = [\n \"mrope_section\",\n \"mrope_interleaved\",\n ]', 9 'ignore_keys_at_rope_validation\"] = {\n \"mrope_section\",\n \"mrope_interleaved\",\n }') 10 open(f,'w').write(t) 11 print('Patched', f) 12"
1import base64, requests
2
3with open("image.png", "rb") as f:
4 b64 = base64.b64encode(f.read()).decode()
5
6response = requests.post("http://localhost:8000/v1/chat/completions", json={
7 "model": "btbtyler09/Qwen3.5-35B-A3B-GPTQ-4bit",
8 "messages": [{"role": "user", "content": [
9 {"type": "image_url", "image_url": {"url": f"data:image/png;base64,{b64}"}},
10 {"type": "text", "text": "Describe what you see in this image."},
11 ]}],
12 "max_tokens": 1024,
13})
14print(response.json()["choices"][0]["message"]["content"])Note: Neither GPTQModel nor transformers can currently load this model directly. GPTQModel'sQwen3_5MoeGPTQclass expects the text-only weight prefix (model.layers.*) and does not support the multimodal architecture (model.language_model.layers.*). The transformers GPTQ path delegates tooptimum, which does not handle the fused-expert architecture. Use vLLM for inference.
nn.Parameter tensors rather than individual nn.Linear modules. During quantization, GPTQModel's MODULE_CONVERTER_MAP converts these to individual quantizable nn.Linear layers. This same conversion must also run during model loading for the quantized kernels to be applied correctly.convert_qwen3_5_moe_expert_converter for fused 3D expert weights