Qwen3.6-35B-A3B ยท NVFP4 (W4A4, FP4)
4-bit quantization of Qwen/Qwen3.6-35B-A3B, produced for efficient vLLM serving. Quantized by axteam.
Revision 2026-11-01 (rebuilt): The MoE router (
mlp.gate) and the shared-expert gate are now compensated during AWQ smoothing (checked on every layer against the original: the router rescale matches the norm rescale, median per-channel difference below 2%). The first upload of this repo left the router and the shared-expert gate uncompensated, so tokens were routed to different experts than in the original. If you downloaded this repo before 2026-11-01 07:46:05 UTC (revision6de6e2c), download it again. The benchmark and fidelity figures on this card were measured on the rebuilt files.
| Base model | Qwen/Qwen3.6-35B-A3B |
| Method | NVFP4 (W4A4, FP4) |
| Format | compressed-tensors nvfp4-pack-quantized |
| Weights / activations | W4A4 โ FP4 (E2M1) weights group 16 (FP8 E4M3 scale + per-tensor FP32 global scale), FP4 activations |
| Architecture | Hybrid (linear-attention + full-attention) ยท MoE (256 experts + shared, ~3B / 35B total active) ยท multimodal (vision) ยท MTP head |
| Size on disk | ~25.0 GB |
| Calibration | 256 samples (Korean-heavy mixed corpus) |
| License | Apache-2.0 |
Quantization details
- Scheme โ W4A4 โ FP4 (E2M1) weights group 16 (FP8 E4M3 scale + per-tensor FP32 global scale), FP4 activations, stored as compressed-tensors
nvfp4-pack-quantized. - Kept in BF16 โ the vision tower & projector (
model.visual.*), the multi-token-prediction head (mtp.*), all RMSNorms, token embeddings, the LM head, the MoE router (mlp.gate) and shared-expert gate, the entire linear-attention (GatedDeltaNet/SSM) path โ FP4 is too coarse for the SSM weights, so the fulllinear_attn.*stays BF16. Left unquantized to preserve quality (about 9% of all parameters in this build). - Tokenizer /
chat_template/generation_configare identical to the original.config.jsonis the original plus aquantization_configblock.
This is post-training quantization (PTQ) โ no retraining. AWQ uses a small calibration set (no gradient) to protect salient weight channels before rounding.
Benchmarks (measured)
Every column was measured with the same harness and settings โ lm-evaluation-harness on vLLM, greedy, completion-style prompts without a chat template (0- or 5-shot, as listed in each row). MMLU here is lm-eval's generative variant (mmlu_generative: the model writes the answer letter and only an exact match on the first line counts), so it is not directly comparable with MMLU scores measured another way (e.g. log-likelihood scoring). Percentages are recovery vs. the BF16 original.
| Benchmark | BF16 (original) | FP8-dynamic | AWQ-8bit | NVFP4A16 | NVFP4 (this repo) | AWQ-4bit |
|---|---|---|---|---|---|---|
| MMLU (5-shot, generative) | 64.44 | 67.45 (104.7%) | 64.02 (99.3%) | 69.31 (107.6%) | 68.39 (106.1%) | 74.12 (115.0%) |
| GSM8K (5-shot, strict) | 30.40 | 21.53 (70.8%) | 28.81 (94.8%) | 24.49 (80.5%) | 46.55 (153.1%) | 71.11 (233.9%) |
| ARC-Challenge (0-shot) | 55.38 | 54.61 (98.6%) | 55.46 (100.2%) | 55.03 (99.4%) | 56.23 (101.5%) | 54.78 (98.9%) |
| Winogrande (5-shot) | 76.32 | 75.37 (98.8%) | 76.24 (99.9%) | 74.43 (97.5%) | 74.27 (97.3%) | 75.85 (99.4%) |
| KMMLU (5-shot, direct) | 65.14 | 64.86 (99.6%) | 65.18 (100.1%) | 64.50 (99.0%) | 64.09 (98.4%) | 64.61 (99.2%) |
| HAE-RAE (0-shot) | 74.89 | 74.89 (100.0%) | 75.07 (100.2%) | 75.34 (100.6%) | 74.06 (98.9%) | 73.69 (98.4%) |
| Average | 61.09 | 59.78 (97.9%) | 60.80 (99.5%) | 60.52 (99.1%) | 63.93 (104.6%) | 69.03 (113.0%) |
| Average without MMLU ยท GSM8K | 67.93 | 67.43 (99.3%) | 67.99 (100.1%) | 67.33 (99.1%) | 67.16 (98.9%) | 67.23 (99.0%) |
Note on MMLU and GSM8K: these tasks are scored on generated text (
mmlu_generative,gsm8kstrict-match), so the score depends on whether the model answers in exactly the format the scorer expects (for MMLU only a bare answer letter on the first line counts). For this model they swing widely between builds of the same model (MMLU 64.0โ74.1; GSM8K 21.5โ71.1), and two quantized builds score well above the BF16 original (MMLU: AWQ-4bit 115.0%; GSM8K: AWQ-4bit 233.9%, NVFP4 153.1%). This most likely reflects how each build formats its answers rather than quantization quality, but per-question outputs were not saved, so it was not checked answer by answer. The second average leaves them out.
Evaluation (measured)
Fidelity to the BF16 original on an internal mixed English/Korean set (100 prompts: the BF16 original's greedy answers, scored under each build with the same prompts and scoring code). This build was measured on the rebuilt files with vLLM 0.32 on 2026-11-01; the BF16 reference column was measured on 2026-10-27.
| Metric | This model | BF16 original |
|---|---|---|
| Perplexity (lower = closer) | 1.3700 | 1.2934 (+5.9%) |
| Top-1 next-token agreement | 91.7% | 98.0% |
These measure fidelity to the base model, not absolute task scores.
Requirements
| Runtime | vLLM โ the architecture is in vLLM โฅ 0.17.0; tested here with vLLM 0.32.0. |
| vLLM install | vLLM 0.32 itself needs Python 3.11โ3.14, torch 2.13 (CUDA 13.0 build, so an NVIDIA driver with CUDA 13 support), transformers โฅ5.16.1,<5.20 and compressed-tensors 0.17.0 (both pinned by vLLM; 0.17.0 reads this checkpoint, which was saved with 0.19.0 โ do not upgrade it separately). |
| GPU | Full FP4 (W4A4) speed on Blackwell โ B200/GB200 (sm100), B300 (sm103), RTX 50xx / RTX PRO 6000 (sm120). TuringโHopper (sm75โ90) fall back to weight-only FP4 (slower, vLLM warns). V100 (sm70) is not supported. (Kernel choice per GPU from vLLM 0.32's selection code; only B200 was run here.) |
| Memory | Weights: 25.0 GB. Add KV cache (grows with context length ร concurrent requests) and a few GB for activations / CUDA graphs; use --tensor-parallel-size N when the weights do not fit one GPU. |
| Transformers (without vLLM) | Not loadable correctly by Transformers โ use vLLM. Up to 5.22.1 its MoE loader cannot merge per-expert 4-bit weights of this format (checked on the first 2 layers of the Qwen3.6-35B-A3B AWQ-4bit and NVFP4A16 builds; this repo itself was not loaded in Transformers). |
| trust_remote_code | not needed |
Usage (vLLM)
Start an OpenAI-compatible server:
vllm serve axteam/Qwen3.6-35B-A3B-NVFP4 --max-model-len 32768
Query it:
curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "axteam/Qwen3.6-35B-A3B-NVFP4",
"messages": [{"role": "user", "content": "๋ํ๋ฏผ๊ตญ์ ์๋๋ ์ด๋์ธ๊ฐ์?"}],
"temperature": 1.0, "top_p": 0.95, "top_k": 20, "max_tokens": 512
}'
Offline inference in Python:
from vllm import LLM, SamplingParams
llm = LLM(model="axteam/Qwen3.6-35B-A3B-NVFP4", max_model_len=32768)
params = SamplingParams(temperature=1.0, top_p=0.95, top_k=20, max_tokens=1024)
out = llm.chat([{"role": "user", "content": "Explain model quantization in two sentences."}], params)
print(out[0].outputs[0].text)
# image input (URL or data: URI)
messages = [{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": "https://example.com/your-image.png"}},
{"type": "text", "text": "Describe this image."},
]}]
out = llm.chat(messages, params)
print(out[0].outputs[0].text)
Recommended sampling (from the original
generation_config.json):temperature=1.0,top_p=0.95,top_k=20. Thinking mode is on by default in the chat template; to turn it off passchat_template_kwargs={"enable_thinking": False}(Pythonllm.chat(..., chat_template_kwargs=...), or"chat_template_kwargs": {"enable_thinking": false}in the request body). Text-only serving: add--limit-mm-per-prompt '{"image": 0, "video": 0}'to skip loading the vision encoder's memory budget.
Reducing KV-cache memory (optional, serve-time)
The KV cache is kept in BF16 by default. KV-cache precision is a runtime choice, independent of the weight quantization above. This is a hybrid model: only its 10 full-attention layers keep a KV cache, while its 30 linear-attention (Gated DeltaNet) layers keep a fixed-size state per request, which --kv-cache-dtype does not change. FP8 halves the full-attention KV cache, so the saving grows with context length and is small for many short requests:
vllm serve axteam/Qwen3.6-35B-A3B-NVFP4 --kv-cache-dtype fp8
License
Quantized derivative of Qwen/Qwen3.6-35B-A3B (Apache-2.0). All original weights, tokenizer and chat template belong to the Qwen team.
ํ๊ตญ์ด ์์ฝ
Qwen/Qwen3.6-35B-A3B์ NVFP4 (W4A4) ์์ํ ๋น๋ ยท ์ ์ axteam
๊ฐ์
| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| ์๋ณธ ๋ชจ๋ธ | Qwen/Qwen3.6-35B-A3B |
| ์์ํ ๋ฐฉ์ | NVFP4 (W4A4, ๊ฐ์ค์นยทํ์ฑํ FP4) |
| ์ ์ฅ ํ์ | compressed-tensors nvfp4-pack-quantized |
| ๋ชจ๋ธ ๊ตฌ์กฐ | ํ์ด๋ธ๋ฆฌ๋ ์ดํ ์ (์ ํ ์ดํ ์ + ํ ์ดํ ์ ) ยท MoE (์ ๋ฌธ๊ฐ 256๊ฐ + ๊ณต์ ์ ๋ฌธ๊ฐ, ์ด 35B ์ค ์ฝ 3B ํ์ฑ) ยท ๋ฉํฐ๋ชจ๋ฌ(๋น์ ) ยท MTP ํค๋ |
| ์ฉ๋ | ์ฝ 25.0 GB |
| ๋ณด์ ๋ฐ์ดํฐ | ์ํ 256๊ฐ (ํ๊ตญ์ด ์์ฃผ ํผํฉ ์ฝํผ์ค) |
์์ํ ์์ธ
- ๊ฐ์ค์น: FP4(E2M1), ๊ทธ๋ฃน ํฌ๊ธฐ 16 (๊ทธ๋ฃน๋ณ FP8(E4M3) ์ค์ผ์ผ + ํ ์๋ณ FP32 ์ ์ญ ์ค์ผ์ผ)
- ํ์ฑํ: ์คํ ์ FP4 (Blackwell FP4 ํ ์์ฝ์ด์์ ๊ฐ์)
- ์์ํ ์ ์ฐจ: PTQ(ํ์ต ํ ์์ํ, ์ฌํ์ต ์์), AWQ ๋ฐฉ์ โ ๋ณด์ ๋ฐ์ดํฐ๋ก ํ์ฑํ๊ฐ ํฐ ๊ฐ์ค์น ์ฑ๋์ ์ฐพ์ ์ฑ๋๋ณ ์ค์ผ์ผ๋ก ๋ณดํธํ ๋ค FP4๋ก ๋ฐ์ฌ๋ฆผ
- BF16 ์ ์ง: ๋น์ ํ์ยทํฌ์์ธต(
model.visual.*), MTP ํค๋(mtp.*), ๋ชจ๋ RMSNorm, ํ ํฐ ์๋ฒ ๋ฉ, LM ํค๋, MoE ๋ผ์ฐํฐ(mlp.gate)์ ๊ณต์ ์ ๋ฌธ๊ฐ ๊ฒ์ดํธ, ์ ํ ์ดํ ์ (GatedDeltaNet/SSM) ๊ฒฝ๋ก ์ ์ฒด(linear_attn.*, FP4๋ก๋ ์ ๋ฐ๋ ๋ถ์กฑ) โ ์ ์ฒด ํ๋ผ๋ฏธํฐ์ ์ฝ 9% - ์๋ณธ ํ์ผ: ํ ํฌ๋์ด์ ยทchat templateยทgeneration config๋ ์๋ณธ๊ณผ ๋์ผ,
config.json์ ์๋ณธ์quantization_config๋ธ๋ก๋ง ์ถ๊ฐ
ํ์ง (์ค์ธก)
- ์๋ณธ ๋๋น ์ถฉ์ค๋: PPL 1.3700 (์๋ณธ 1.2934, +5.9%, ๋ฎ์์๋ก ์๋ณธ์ ๊ฐ๊น์), ๋ค์ ํ ํฐ top-1 ์ผ์น์จ 91.7% (์๋ณธ ์์ฒด ๊ธฐ์ค๊ฐ 98.0%) โ ๋ด๋ถ ์์ดยทํ๊ตญ์ด ํผํฉ ํ๋กฌํํธ 100๊ฐ, ์๋ณธ(BF16)์ greedy ๋ต๋ณ์ ๊ธฐ์ค ํ ์คํธ๋ก ์ธก์
- ๋ฒค์น๋งํฌ ํ๊ท : 63.93 (์๋ณธ 61.09, 104.6%) โ MMLU(์์ฑํ)ยทGSM8KยทARC-ChallengeยทWinograndeยทKMMLUยทHAE-RAE 6์ข ํ๊ท , lm-evaluation-harness + vLLM, chat template ์๋ ์์ฑํ ํ๋กฌํํธ(๊ณผ์ ๋ณ 0ยท5-shot, ํ ์ฐธ๊ณ )ยทgreedy, ๋ชจ๋ ๋น๋๋ฅผ ๊ฐ์ ์ค์ ์ผ๋ก ์ธก์
- MMLU(์์ฑํ)ยทGSM8K ์ ์ธ ํ๊ท : 67.16 (์๋ณธ 67.93, 98.9%) โ MMLU(์์ฑํ)ยทGSM8K๋ ์์ฑํ ๋ต์ด ์ฑ์ ๊ธฐ๊ฐ ๊ธฐ๋ํ๋ ํ์ ๊ทธ๋๋ก์ฌ์ผ ์ ์๊ฐ ๋๋ ๊ณผ์ ; ์ด ๋ชจ๋ธ์์๋ ๊ฐ์ ๋ชจ๋ธ์ ๋น๋๋ผ๋ฆฌ MMLU(์์ฑํ) 64.0
74.1ยทGSM8K 21.571.1๋ก ํฌ๊ฒ ํ๋ค๋ฆฌ๊ณ ์์ํ ๋น๋ 2๊ฐ๊ฐ ์๋ณธ๋ณด๋ค ํฌ๊ฒ ๋์(MMLU(์์ฑํ): AWQ-4bit 115.0%; GSM8K: AWQ-4bit 233.9%ยทNVFP4 153.1%), ๋ต ํ์ ์ฐจ์ด๋ก ๋ณด์ด๋ ๋ฌธํญ๋ณ ์ถ๋ ฅ์ ์ ์ฅํ์ง ์์ ๋ฌธํญ ๋จ์๋ก๋ ํ์ธํ์ง ์์ - ํ๊ตญ์ด ๋ฒค์น๋งํฌ: KMMLU 64.09 (์๋ณธ 65.14, 98.4%) ยท HAE-RAE 74.06 (์๋ณธ 74.89, 98.9%)
- MMLU ๋ฐฉ์: lm-eval ์์ฑํ ๋ณํ(
mmlu_generative) โ ๋ชจ๋ธ์ด ๋ต ๊ธ์๋ฅผ ์์ฑํ๊ณ ์ฒซ ์ค์ด ์ ํํ ์ผ์นํด์ผ ์ ๋ต์ผ๋ก ์ฑ์ ํ๋ฏ๋ก, ๋ค๋ฅธ ๋ฐฉ์(์: log-likelihood ์ฑ์ )์ผ๋ก ์ฐ MMLU ์ ์์ ์ง์ ๋น๊ต ๋ถ๊ฐ
์๊ตฌ์ฌํญ
- ์คํ ์์ง: vLLM 0.17.0 ์ด์(์ด ๊ตฌ์กฐ๋ฅผ ์ง์ํ๋ ์ฒซ ๋ฒ์ ), ์ด ๋น๋๋ vLLM 0.32.0์์ ์คํ ํ์ธ
- vLLM 0.32 ์ค์น ์กฐ๊ฑด: Python 3.11~3.14, torch 2.13(CUDA 13.0 ๋น๋, CUDA 13 ์ง์ ๋๋ผ์ด๋ฒ ํ์), transformers 5.16.1 ์ด์ 5.20 ๋ฏธ๋ง, compressed-tensors 0.17.0 โ transformersยทcompressed-tensors๋ vLLM์ด ๋ฒ์ ์ ๊ณ ์ ํ๋ฏ๋ก compressed-tensors๋ฅผ ๋ฐ๋ก ์ ๊ทธ๋ ์ด๋ํ์ง ๋ง ๊ฒ (์ด ์ฒดํฌํฌ์ธํธ๋ 0.19.0์ผ๋ก ์ ์ฅ๋์ง๋ง 0.17.0์์๋ ๋ก๋๋จ)
- GPU: Blackwell(B200ยทGB200 sm100, B300 sm103, RTX 50xxยทRTX PRO 6000 sm120)์์ FP4(W4A4) ์ฐ์ฐ ๊ฐ์, V100(sm70) ๋ฏธ์ง์ โ Turing
Hopper(sm7590)๋ ๊ฐ์ค์น ์ ์ฉ FP4๋ก ์๋ ์ ํ๋์ด ์๋ ์ ํ, vLLM ๊ฒฝ๊ณ ์ถ๋ ฅ (GPU๋ณ ์ง์ ์ฌ๋ถ๋ vLLM 0.32 ์ปค๋ ์ ํ ์ฝ๋ ๊ธฐ์ค, ์ค์ ์คํ์ B200์์๋ง ํ์ธ) - ๋ฉ๋ชจ๋ฆฌ: ๊ฐ์ค์น 25.0 GB + KV ์บ์(์ปจํ
์คํธ ๊ธธ์ด ร ๋์ ์์ฒญ ์์ ๋น๋ก) + ํ์ฑํยทCUDA graph์ฉ ์ GB โ GPU ํ ์ฅ์ ๋ค ๋ค์ด๊ฐ์ง ์์ผ๋ฉด
--tensor-parallel-size N์ผ๋ก ๋ถ์ฐ - Transformers๋ก ์ง์ ์ฌ์ฉ: ๋ถ๊ฐ โ ์ด ํ์์ ์ ๋ฌธ๊ฐ๋ณ 4๋นํธ ๊ฐ์ค์น๋ฅผ 5.22.1๊น์ง์ MoE ๋ก๋๊ฐ ํฉ์น์ง ๋ชปํจ (Qwen3.6-35B-A3B AWQ-4bitยทNVFP4A16 ๋น๋์ ์ 2๊ฐ ์ธต์ผ๋ก ํ์ธ, ์ด ๋ฆฌํฌ ์์ฒด๋ Transformers ๋ก๋ ๋ฏธ์คํ), vLLM ์ฌ์ฉ
- trust_remote_code: ๋ถํ์
์ฌ์ฉ๋ฒ
- ์๋ฒ ์คํ:
vllm serve axteam/Qwen3.6-35B-A3B-NVFP4 --max-model-len 32768โ OpenAI ํธํ API - Python:
LLM(model="axteam/Qwen3.6-35B-A3B-NVFP4", max_model_len=32768).chat(...)โ ์ ์ฒด ์์๋ ์ ์์ด ๋ณธ๋ฌธ 'Usage (vLLM)' ์ ์ฐธ๊ณ - ๊ถ์ฅ ์ํ๋ง:
temperature=1.0,top_p=0.95,top_k=20(์๋ณธgeneration_config.json๊ธฐ์ค) - thinking ๋ชจ๋: ๊ธฐ๋ณธ ์ผ์ง โ ๋๋ ค๋ฉด
chat_template_kwargs={"enable_thinking": False}์ ๋ฌ(Python์llm.chat()์ธ์, HTTP๋ ์์ฒญ ๋ณธ๋ฌธ์"chat_template_kwargs": {"enable_thinking": false}) - ์ด๋ฏธ์ง ์
๋ ฅ: ๋ฉ์์ง์
image_urlํญ๋ชฉ ์ฌ์ฉ - ํ
์คํธ๋ง ์ฌ์ฉํ ๋:
--limit-mm-per-prompt '{"image": 0, "video": 0}'โ ๋น์ ํ์์ฉ ๋ฉ๋ชจ๋ฆฌ ์์ฝ์ ์๋ตํด ๋ฉ๋ชจ๋ฆฌ ์ ์ฝ - KV ์บ์ ์ ๊ฐ(์ ํ):
vllm serve์--kv-cache-dtype fp8์ถ๊ฐ โ ํ์ด๋ธ๋ฆฌ๋ ๊ตฌ์กฐ๋ผ KV ์บ์๋ ํ ์ดํ ์ 10๊ฐ ์ธต์๋ง ์๊ณ , ์ ํ ์ดํ ์ (Gated DeltaNet) 30๊ฐ ์ธต์ ์์ฒญ๋ณ ๊ณ ์ ํฌ๊ธฐ ์ํ๋ ์ด ์ต์ ์ผ๋ก ๋ฐ๋์ง ์์ โ ํ ์ดํ ์ KV ์บ์๋ง ์ ๋ฐ์ผ๋ก ์ค์ด ๊ธด ์ปจํ ์คํธ์์ ํจ๊ณผ๊ฐ ํฌ๊ณ ์งง์ ์์ฒญ์ด ๋ง์ ๋๋ ์์ (๊ฐ์ค์น ์์ํ์ ๋ณ๊ฐ์ธ ์คํ ์ต์ )
์ฐธ๊ณ
- ์์ ์ด๋ ฅ (2026-11-01, ์ฌ์์ํ): MoE ๋ผ์ฐํฐ(
mlp.gate)ยท๊ณต์ ์ ๋ฌธ๊ฐ ๊ฒ์ดํธ์ AWQ ์์ ์ค์ผ์ผ ์ ์ฉ (๋ชจ๋ ์ธต์์ ์๋ณธ ๋๋น ๋ผ์ฐํฐ ๋ฐฐ์จ์ด norm ๋ฐฐ์จ๊ณผ ์ผ์นํจ์ ํ์ธ, ์ฑ๋๋ณ ์ฐจ์ด ์ค์๊ฐ 2% ๋ฏธ๋ง) โ ์ด์ ์ ๋ก๋์ ๊ฒฐํจ: ์ฒซ ๋ฒ์งธ ์ ๋ก๋๋ ๋ผ์ฐํฐยท๊ณต์ ์ ๋ฌธ๊ฐ ๊ฒ์ดํธ ์์ ๋๋ฝ์ผ๋ก ์๋ณธ๊ณผ ๋ค๋ฅธ ์ ๋ฌธ๊ฐ ์ ํ โ 2026-11-01 07:46:05 UTC(๋ฆฌ๋น์ 6de6e2c) ์ด์ ์ ๋ฐ์๋ค๋ฉด ๋ค์ ๋ฐ์ ๊ฒ, ํ์ง ํญ๋ชฉ์ ๋ฒค์น๋งํฌยท์ถฉ์ค๋๋ ์ฌ์์ํ ๋น๋๋ก ์ฐ ๊ฐ
๋ผ์ด์ ์ค
- ๋ผ์ด์ ์ค: Apache-2.0 โ ์๋ณธ ๋ชจ๋ธ์ ๋ผ์ด์ ์ค๋ฅผ ๊ทธ๋๋ก ๋ฐ๋ฆ
- ๊ถ๋ฆฌ: ์๋ณธ ๊ฐ์ค์นยทํ ํฌ๋์ด์ ยทchat template์ Qwen ํ(Alibaba) ์์ , ์ด ๋ฆฌํฌ๋ ์์ํ ํ์๋ฌผ