Qwen4-35B-A3B-MXFP4
MXFP4 quant of Qwen/Qwen4-35B-A3B by SolsticeAI β’ compressed-tensors for vLLM β’ 45.90 GB
Base model by the Qwen Team. Quantization by SolsticeAI with llm-compressor. Same Apache-2.0 licence as the base model.
What's in it
- Routed experts (gate, up, down; 40 layers x 256 experts): MXFP4 weights (FP4 E2M1, one E8M0 power-of-two scale per group of 32). The checkpoint config also declares dynamic MXFP4 activation quantization (W4A4), which kernels with native MXFP4 MoE support can use.
- N-gram / PLE table: Qwen's official FP8 table, copied byte-for-byte from Qwen/Qwen4-35B-A3B-FP8 (
text_config.ple_embedding_dtype = float8_e4m3fn). - Everything else is BF16 and byte-identical to the base model: attention (Gated DeltaNet + QSA), shared experts, routers, hyper-connections, embeddings,
lm_head, the vision encoder, and the MTP / NextN layer (31 tensors, kept fused).
Checkpoint size: 45.90 GB. Format: compressed-tensors (mxfp4-pack-quantized), 28 safetensors files (23 model shards + 5 FP8 n-gram table shards). The shard names start at model-00011-of-00033 because shards 1-10 of the BF16 source held only the BF16 n-gram table, which was replaced by the FP8 table files ple-fp8-0000{0..4}.safetensors.
Quality (measured 2026-12-06)
vLLM (official vllm/vllm-openai:qwen4 image, 0.1.dev26393+gf247de72b) on one RTX PRO 6000 Blackwell (96 GB), n-gram table offloaded to host RAM. WikiText-2 raw test, 40 chunks x 1024 tokens, compared with BF16 Qwen4-35B-A3B run the same way:
| BF16 | MXFP4 (this repo) | |
|---|---|---|
| Perplexity | 7.895 | 8.014 |
| Mean top-20 KLD vs BF16 (nats) | 0 | 0.1652 |
| Median top-20 KLD | β | 0.0645 |
| P99 top-20 KLD | β | 1.345 |
| Top-1 token agreement with BF16 | 100% | 87.66% |
| Load time | β | 98 s |
KLD here is KL(BF16 || quant) over BF16's top-20 tokens, so it is not comparable to full-vocabulary llama.cpp KLD numbers (like the ones on the GGUF card).
Kernel note: on this GPU, this vLLM build ran the experts with MarlinExperts [w=mxfp4, a=none] and logged that it was using weight-only FP4 via Marlin. So the numbers above are MXFP4 weights with BF16 activations. A runtime that executes the W4A4 path natively can give slightly different numbers.
Greedy chat outputs were correct and coherent (e.g. "The capital of France is Paris.", a working iterative Fibonacci function, a correct Rayleigh-scattering answer); the full outputs are in reproduce/verify-2026-12-06/results/summary_mxfp4.json.
Completeness was checked on the files downloaded from this repo: all LFS sha256 values match, every indexed tensor is in its shard, all 1258 non-expert tensors are byte-identical to BF16, and all 30720 routed-expert projections are packed.
How to use (vLLM)
Tested with the vllm/vllm-openai:qwen4 image. The n-gram table is large (about 20.5 GB in FP8), so it was offloaded to host RAM:
from vllm import LLM, SamplingParams
llm = LLM(
model="SolsticeAI/Qwen4-35B-A3B-MXFP4",
trust_remote_code=True,
max_model_len=4096,
engram_config={"cpu_offload": True},
limit_mm_per_prompt={"image": 0, "video": 0},
)
out = llm.chat([{"role": "user", "content": "What is the capital of France?"}],
SamplingParams(temperature=0, max_tokens=128),
chat_template_kwargs={"enable_thinking": False})
print(out[0].outputs[0].text)
The tested run also used enforce_eager=True. Text-only settings are shown above; the vision encoder is included in the checkpoint (BF16).
How it was built
Data-free PTQ with llm-compressor 0.15.0 (model_free_ptq, preset MXFP4, compressed-tensors 0.20.1) on the routed experts only, then the FP8 n-gram table swap.
Reproduce
Everything is in reproduce/:
RECIPE.md,scripts/q_ct.py,scripts/ple_fp8.py,scripts/dl_src.py,logs/β the build (exact commands, logs)ENV.md,pip-freeze-*.txtβ environments and resolved package versionsverify-2026-12-06/β the completeness check and the vLLM PPL/KLD run behind the table above (scripts, logs, results)readme-history/β earlier versions of this card
Build recipes for every Qwen4-35B-A3B format are also in reproduce/formats/ of the GGUF repo.
Other formats
- GGUF (llama.cpp): SolsticeAI/Qwen4-35B-A3B-GGUF
- MLX (Apple): SolsticeAI/Qwen4-35B-A3B-MLX
- NVFP4 (NVFP4A16): SolsticeAI/Qwen4-35B-A3B-NVFP4
Links
- X: @TheSolsticeAI
- Discord: discord.gg/rhE9zdKyE4
- GitHub: Solstice-Labs
- Site: solsticeai.ml
- Downloads last month
- -
Model tree for SolsticeAI/Qwen4-35B-A3B-MXFP4
Base model
Qwen/Qwen4-35B-A3B