This is a W4A16 (4-bit weight, 16-bit activation) quantization of
Qwen/Qwen3.6-35B-A3B using
Intel AutoRound v0.12.2.
Qwen3.6-35B-A3B is a Mixture-of-Experts model with 35B total parameters and ~3B active parameters per token (256 experts, 8 active). It features a hybrid architecture with Gated Delta Net (GDN) linear attention layers alternating with full attention, plus a Multi-Token Prediction (MTP) head for speculative decoding.
Certain layers are excluded from quantization to preserve model quality and ensure compatibility with tensor-parallel inference:
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model = AutoModelForCausalLM.from_pretrained(
5 "nchapman/Qwen3.6-35B-A3B-int4-AutoRound",
6 torch_dtype=torch.bfloat16,
7 device_map="auto",
8)
9tokenizer = AutoTokenizer.from_pretrained("nchapman/Qwen3.6-35B-A3B-int4-AutoRound")
10
11messages = [{"role": "user", "content": "Explain mixture-of-experts architectures briefly."}]
12text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
13inputs = tokenizer(text, return_tensors="pt").to(model.device)
14output = model.generate(**inputs, max_new_tokens=512)
15print(tokenizer.decode(output[0], skip_special_tokens=True))
1vllm serve nchapman/Qwen3.6-35B-A3B-int4-AutoRound \
2 --dtype bfloat16 \
3 --quantization auto_round \
4 --num-speculative-tokens 1 \
5 --speculative-model [draft_model]
The MTP head is preserved in BF16, enabling vLLM's speculative decoding with the native MTP draft. Tensor parallelism (TP>=2) works correctly thanks to the in_proj_ba FP overrides.
1from auto_round import AutoRound
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model = AutoModelForCausalLM.from_pretrained(
5 "Qwen/Qwen3.6-35B-A3B",
6 torch_dtype="auto",
7 device_map="auto",
8)
9tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.6-35B-A3B")
10
11autoround = AutoRound(
12 model,
13 tokenizer,
14 bits=4,
15 group_size=128,
16 sym=True,
17 iters=400,
18 nsamples=256,
19 seqlen=2048,
20 batch_size=8,
21 dataset="NeelNanda/pile-10k",
22 ignore_layers=[
23 "mtp.fc",
24 "linear_attn.in_proj_a",
25 "linear_attn.in_proj_b",
26 "shared_expert",
27 ],
28)
29autoround.quantize()
30autoround.save_quantized("Qwen3.6-35B-A3B-int4-AutoRound", format="auto_round")