Instructions to use SolsticeAI/Qwen4-35B-A3B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SolsticeAI/Qwen4-35B-A3B-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M # Run inference directly in the terminal: llama cli -hf SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M # Run inference directly in the terminal: llama cli -hf SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M
Use Docker
docker model run hf.co/SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use SolsticeAI/Qwen4-35B-A3B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SolsticeAI/Qwen4-35B-A3B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SolsticeAI/Qwen4-35B-A3B-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M
- Ollama
How to use SolsticeAI/Qwen4-35B-A3B-GGUF with Ollama:
ollama run hf.co/SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M
- Unsloth Desktop
- Pi
How to use SolsticeAI/Qwen4-35B-A3B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use SolsticeAI/Qwen4-35B-A3B-GGUF with Docker Model Runner:
docker model run hf.co/SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M
- Lemonade
How to use SolsticeAI/Qwen4-35B-A3B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M
Run and chat with the model
lemonade run user.Qwen4-35B-A3B-GGUF-UD-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use SolsticeAI/Qwen4-35B-A3B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use SolsticeAI/Qwen4-35B-A3B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "SolsticeAI/Qwen4-35B-A3B-GGUF:UD-Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Qwen4-35B-A3B-GGUF
Official SolsticeAI GGUF Suite โข 27 GGUF Sets โข Open Recipe โข 35B / 3B Active Hybrid MoE โข 20B Engram โข Baked-in MTP โข Native 1M Context โข Vision
Base Model by the Qwen Team โข GGUF Quantization, 2-Shard Engram Split & Open Recipe by SolsticeAI
Ours. Open. Reproducible.
Executive Summary
SolsticeAI/Qwen4-35B-A3B-GGUF is a full 27-set GGUF suite (BF16 + 26 quants) of official Qwen/Qwen4-35B-A3B โ Qwen's hybrid Mixture-of-Experts model with 35B total parameters, 3B active, a 20B per-layer n-gram embedding table (the engram, per_layer_token_embd), a 1-layer multi-token prediction (MTP) head, native multimodal vision, and a native 1,048,576-token context window.
This is not a closed cookbook. The calibration corpus, importance matrices, per-tensor override files, exact commands, and the perplexity / KL-divergence measurements we have so far against the BF16 are published in this repository under reproduce/. Anyone can audit the work, reproduce a file, or improve the recipe.
Key Capabilities
- 27-set lineup, one consistent layout. BF16 plus 26 quants: 10 Unsloth-Dynamic-style (UD) sets (8 built from Unsloth's published tensor maps, plus
UD-Q4_K_Mand our tunedUD-Q4_K_M-Plus), 10 standard K-quants, and 6 I-quants. Every language-model file is a 2-shard split. Shard 2 holds only the n-gram table, so it can live in CPU RAM (-ot per_layer_token_embd=CPU) while the rest of the model sits on the GPU. - Open, deliberate quantization policy. Our own bartowski-v6 imatrix (Qwen4 chat template, 544ร512-token chunks, MTP included via
--nextn) is used for Q4_K_M and below, plus every I-quant. Q5_K_S, Q5_K_M, Q6_K, and Q8_0 are pure stock โ no imatrix โ so high-bit files are not nudged by a calibration set. UD files follow Unsloth's Dynamic recipe (Unsloth's imatrix + per-tensor override files). This matches ggml-org's approach of imatrix-calibrating Q4_K_M. - MTP baked into every file. Speculative decoding needs no separate draft model:
--spec-type draft-mtp --spec-draft-n-max 3. (ggml-org ships MTP as a sidecar; this suite follows the Unsloth convention and embeds it.) - Vision included.
mmproj-BF16.ggufandmmproj-F16.ggufship alongside the quants. Pass--mmprojtollama-serverorllama-mtmd-cli. Heads-up: our automated vision smoke test (llama-mtmd-cli) returned an error code and was never diagnosed, so treat vision as unverified for now โ seereproduce/results/known_issues.md. - llama.cpp native. Architecture is
qwen4exp, first supported in llama.cpp PR #33626 and shipped from b12969. This suite was built with the official prebuilt b12973 binaries.
Sizes are exact (both shards summed, from the Hugging Face API; GB = 10โน bytes). PPL / KLD are measured values (see the footnotes under the picker tables). BF16 has no KLD because it is the reference. Nothing here is estimated.
Quant Picker
Point -m / --model at the first shard only (...-00001-of-00002.gguf). llama.cpp discovers and loads shard 2 automatically from the same directory.
Every quant lives in its own folder. Filenames follow:
<QUANT>/Qwen4-35B-A3B-<QUANT>-00001-of-00002.gguf # model (no engram)
<QUANT>/Qwen4-35B-A3B-<QUANT>-00002-of-00002.gguf # per_layer_token_embd only
BF16/ is the 2-shard BF16 source; BF16-backup/ additionally holds the original single-file BF16 GGUF (112.81 GB, same 912 tensors).
Unsloth Dynamic (UD) โ 10 sets
Eight sets are built with Unsloth's imatrix and Unsloth's per-tensor override maps. Credit Unsloth for the UD recipe. UD-Q4_K_M copies Unsloth's UD-Q4_K_M tensor types 1:1 but uses our bartowski-v6 imatrix (Unsloth's imatrix was not used for that set). UD-Q4_K_M-Plus is our own sensitivity-tuned variant of that map (more bits on the best gain-per-GB tensor groups, Q5_0 engram), see reproduce/live/.
| Quant | Imatrix | Engram (per_layer_token_embd) |
Size | PPL | KLD vs BF16 | Role |
|---|---|---|---|---|---|---|
| UD-IQ2_M | Unsloth | IQ4_NL | 26.61 GB | 6.900 โต | 0.1907 โต | Compact Dynamic 2-bit |
| UD-Q2_K_XL | Unsloth | IQ4_NL | 27.68 GB | 6.813 โต | 0.1649 โต | Dynamic 2-bit, Unsloth tensor mix |
| UD-IQ3_XXS | Unsloth | IQ4_NL | 28.74 GB | 6.707 โต | 0.1299 โต | Compact Dynamic 3-bit |
| UD-Q3_K_XL | Unsloth | IQ4_NL | 30.88 GB | 6.604 โต | 0.0920 โต | Dynamic 3-bit, Unsloth tensor mix |
| UD-Q4_K_XL | Unsloth | IQ4_NL | 36.24 GB | 6.486 ยฒ | 0.0522 ยฒ | โญ Recommended UD production driver |
| UD-Q5_K_XL | Unsloth | Q5_1 | 43.20 GB | 6.485 โต | 0.0380 โต | High-fidelity Dynamic 5-bit |
| UD-Q6_K_XL | Unsloth | Q8_0 | 52.21 GB | 6.491 โต | 0.0325 โต | Near-reference Dynamic 6-bit |
| UD-Q8_K_XL | Unsloth | Q8_0 | 62.29 GB | 6.499 โต | 0.0217 โต | Reference-grade Dynamic 8-bit |
| UD-Q4_K_M | Ours (bartowski v6) | IQ4_NL | 35.18 GB | 6.511 ยน | 0.0555 ยน | Unsloth's UD-Q4_K_M tensor types 1:1, our imatrix |
| UD-Q4_K_M-Plus | Ours (bartowski v6) | Q5_0 | 40.15 GB | 6.489 ยน | 0.0399 ยน | โญ Lowest KLD of our 4-bit sets (+4.96 GB vs UD-Q4_K_M) |
Standard K-quants (Normal) โ 10 files + BF16
hc_*, ssm_beta_alpha, and ple_conv1d are kept at BF16, following ggml-org. Router gates remain F32.
| Quant | Imatrix | Engram (per_layer_token_embd) |
Size | PPL | KLD vs BF16 | Role |
|---|---|---|---|---|---|---|
| BF16 | โ | BF16 | 112.81 GB | 6.5177 ยน | โ | Full-precision source / evaluation reference |
| Q2_K | Ours (bartowski v6) | Q5_0 | 28.14 GB | 7.769 โต | 0.4468 โต | Smallest standard K-quant |
| Q3_K_S | Ours (bartowski v6) | Q5_0 | 30.38 GB | 7.107 โต | 0.2823 โต | Small 3-bit |
| Q3_K_M | Ours (bartowski v6) | Q5_0 | 32.04 GB | 6.803 โต | 0.1911 โต | Balanced 3-bit |
| Q3_K_L | Ours (bartowski v6) | Q5_0 | 33.45 GB | 6.862 โต | 0.1772 โต | Larger 3-bit |
| Q4_K_S | Ours (bartowski v6) | Q5_0 | 35.21 GB | 6.556 โต | 0.0985 โต | Smaller 4-bit |
| Q4_K_M | Ours (bartowski v6) | Q5_0 | 36.60 GB | 6.554 ยน | 0.0907 ยน | โญ Recommended standard 4-bit (ggml-org-style imatrix Q4_K_M) |
| Q5_K_S | None (stock) | Q5_1 | 40.68 GB | 6.531 โต | 0.0578 โต | Stock 5-bit, no calibration bias |
| Q5_K_M | None (stock) | Q5_1 | 41.49 GB | 6.586 โต | 0.0548 โต | High-fidelity stock 5-bit |
| Q6_K | None (stock) | Q8_0 | 51.73 GB | 6.557 โต | 0.0365 โต | Near-lossless stock 6-bit |
| Q8_0 | None (stock) | Q8_0 | 60.33 GB | 6.522 ยฒ | 0.0248 ยฒ | Reference-grade stock 8-bit |
I-quants โ 6 files
All use our bartowski-v6 imatrix. Same BF16 overrides and F32 router gates as the standard K-quants.
| Quant | Imatrix | Engram (per_layer_token_embd) |
Size | PPL | KLD vs BF16 | Role |
|---|---|---|---|---|---|---|
| IQ2_XS | Ours (bartowski v6) | Q5_0 | 25.68 GB | 8.666 โต | 0.6374 โต | Smallest I-quant in this suite |
| IQ2_M | Ours (bartowski v6) | Q5_0 | 26.89 GB | 7.786 โต | 0.4584 โต | Compact 2-bit I-quant |
| IQ3_XXS | Ours (bartowski v6) | Q5_0 | 28.83 GB | 7.154 โต | 0.3032 โต | Compact 3-bit I-quant |
| IQ3_M | Ours (bartowski v6) | Q5_0 | 30.68 GB | 6.793 โต | 0.1942 โต | Balanced 3-bit I-quant |
| IQ4_XS | Ours (bartowski v6) | Q5_0 | 34.06 GB | 6.654 โต | 0.1105 โต | Compact 4-bit I-quant |
| IQ4_NL | Ours (bartowski v6) | Q5_0 | 35.13 GB | 6.654 โต | 0.1091 โต | Non-linear 4-bit I-quant |
Vision projectors
| File | Precision | Size | Notes |
|---|---|---|---|
mmproj-BF16.gguf |
BF16 | 902.8 MB | Preferred vision projector |
mmproj-F16.gguf |
F16 | 899.3 MB | F16 vision projector |
Footnotes (PPL / KLD columns)
All numbers: stock llama-perplexity from prebuilt llama.cpp b12973, wikitext-2 test split, 40 chunks ร 512 tokens, engram on CPU, flash-attention on; KLD is against our own BF16 (BF16 PPL on this setup = 6.5177). A single configuration, so treat small differences as noise.
- ยน Measured and logged. Raw
llama-perplexitylogs are inreproduce/live/logs/(kld-Q4_K_M-gate.log,kld-UD-Q4_K_M-U.log,kld-UD-Q4_K_M-B.log; BF16 PPL is thePPL(base)line in those logs). The Q4_K_M log is the validation rebuild (rebuilt imatrix), which reproduced the original run's KLD of 0.0907. Summary table:reproduce/live/results.tsv. - ยฒ Recorded at the original verification run. From
reproduce/results/kld_comparison.md; the raw logs for these two were lost in a sandbox wipe. The 2026-12-06 re-check (โต) reproduced the same rounded figures forUD-Q4_K_XLandQ8_0. - โต Measured 2026-12-06. Same
llama-perplexitysetup as ยน, on an NVIDIA RTX PRO 6000 Blackwell Server Edition. The Q4_K_M re-check reproduced KLD 0.090722 (gate). Raw logs,results.tsv, and MTP logs:reproduce/live/bench-2026-12-06/.
Shard Topology
Qwen4's n-gram table is huge โ about 20B parameters in BF16, stored as per_layer_token_embd. Leaving it packed into the same file as the rest of the model makes offload clumsy. Every file in this suite uses the same Unsloth-style 2-shard layout:
shard 1 โ everything except the n-gram table โ GPU via -ngl 99
shard 2 โ per_layer_token_embd only โ CPU via -ot per_layer_token_embd=CPU
--load-mode mmap and --lazy-mode on (verified in llama.cpp b12973) let oversized tensors be read on demand instead of being forced entirely resident. Combined with the CPU override, the GPU can hold the active hybrid-MoE body while the lookup table sits in system memory.
The Open Recipe
This is the USP. Nothing in the production path is hidden.
flowchart TD
A["Qwen/Qwen4-35B-A3B<br/>official weights"] --> B["BF16 GGUF + MTP<br/>2-shard split"]
B --> C["bartowski calibration v6<br/>rendered in Qwen4 chat template"]
C --> D["Our imatrix<br/>544 ร 512 tokens, --nextn"]
B --> E["Unsloth imatrix<br/>+ UD tensor-type files"]
D --> F["Q4_K_M and below<br/>+ all I-quants"]
B --> G["Stock: Q5_K_S, Q5_K_M,<br/>Q6_K, Q8_0 โ no imatrix"]
E --> H["8ร Unsloth Dynamic UD-*<br/>+ UD-Q4_K_M / -Plus (our v6 imatrix)"]
F --> I["2-shard GGUF<br/>engram alone in shard 2"]
G --> I
H --> I
I --> J["Load + coherence tests<br/>PPL / KLD vs BF16 on key quants"]
Calibration corpus
- Source: bartowski calibration v6 โ prose plus tool-calling conversations, rendered through Qwen4's chat template (the official
tokenizer-compatJinja template). - The corpus renderer and the v6 source files are published in
reproduce/calibration/(render_corpus.py,v6_prose.txt,v6_conversations.json); the rendered text itself is regenerated with them. A longer-context v7 corpus we also tried is inreproduce/calibration/v7/. - Tokenization for the imatrix run: 544 chunks ร 512 tokens, with
--parse-specialso chat-format special tokens contribute to the importance matrix.
Importance matrix
Computed on the split BF16 with llama.cpp b12973:
llama-imatrix \
-m Qwen4-35B-A3B-BF16-00001-of-00002.gguf \
-f Qwen4-35B-A3B-calibration-v6.txt \
-c 512 -b 512 \
--parse-special \
--nextn \
-ngl 99 \
-ot per_layer_token_embd=CPU
--nextnincludes the 1-layer MTP head in the imatrix.-ot per_layer_token_embd=CPUkeeps the n-gram table off the GPU during the pass.- The resulting file is published as
reproduce/artifacts/imatrix-Qwen4-35B-A3B-calibv6.gguf. The original file was lost in a sandbox wipe; this is a rebuild with the same scripts, validated by reproducing plain Q4_K_M's KLD (0.0907) within our gate (seereproduce/live/PROGRESS.md). The 12 standard / I-quant sets that use our imatrix were quantized with the original file;UD-Q4_K_MandUD-Q4_K_M-Pluswere built with the rebuild. - Used for: Q2_K, Q3_K_S, Q3_K_M, Q3_K_L, Q4_K_S, Q4_K_M, IQ2_XS, IQ2_M, IQ3_XXS, IQ3_M, IQ4_XS, IQ4_NL, UD-Q4_K_M, UD-Q4_K_M-Plus.
- Not used for: Q5_K_S, Q5_K_M, Q6_K, Q8_0 (deliberate stock / no calibration bias at high bits).
- UD-* files use Unsloth's published imatrix (
imatrix_unsloth.gguf_file) plus the per-tensor override maps, published inreproduce/recipes/(UD-*.txt).
Quantize commands
All quants are produced from the split BF16 with --keep-split, so the 2-shard layout is preserved.
Standard / I-quant example (Q4_K_M โ imatrix, Q5_0 engram, ggml-org BF16 overrides):
llama-quantize \
--imatrix imatrix-Qwen4-35B-A3B-calibv6.gguf \
--keep-split \
--tensor-type hc_=bf16 \
--tensor-type ssm_beta_alpha=bf16 \
--tensor-type ple_conv1d=bf16 \
--tensor-type per_layer_token_embd=q5_0 \
Qwen4-35B-A3B-BF16-00001-of-00002.gguf \
Qwen4-35B-A3B-Q4_K_M.gguf \
Q4_K_M
Stock high-bit example (Q5_K_M โ no imatrix, Q5_1 engram):
llama-quantize \
--keep-split \
--tensor-type hc_=bf16 \
--tensor-type ssm_beta_alpha=bf16 \
--tensor-type ple_conv1d=bf16 \
--tensor-type per_layer_token_embd=q5_1 \
Qwen4-35B-A3B-BF16-00001-of-00002.gguf \
Qwen4-35B-A3B-Q5_K_M.gguf \
Q5_K_M
Q6_K and Q8_0 are the same pattern with --tensor-type per_layer_token_embd=q8_0 and no --imatrix.
Unsloth Dynamic example (UD-Q4_K_XL โ Unsloth imatrix + tensor-type file; base ftype Q4_K_M):
llama-quantize \
--imatrix imatrix_unsloth.gguf_file \
--keep-split \
--tensor-type-file reproduce/recipes/UD-Q4_K_XL.txt \
Qwen4-35B-A3B-BF16-00001-of-00002.gguf \
Qwen4-35B-A3B-UD-Q4_K_XL.gguf \
Q4_K_M
Engram type policy
| Family | Q2 / Q3 / Q4 (and I-quants) | Q5 | Q6 / Q8 |
|---|---|---|---|
| Standard + I-quants | Q5_0 | Q5_1 | Q8_0 |
| UD (from Unsloth override files) | IQ4_NL | Q5_1 (UD-Q5_K_XL) |
Q8_0 |
Sensitive tensors on standard and I-quants, matching ggml-org: hc_*, ssm_beta_alpha, and ple_conv1d stay BF16. Router gates stay F32. UD files follow Unsloth's per-tensor map instead (for example, many hc_* / ssm_beta_alpha tensors are Q8_0 in the UD overrides, not BF16).
Quickstart
Requires llama.cpp b12969 or newer. These flags were verified in the b12973 sources / CLI: --load-mode, --lazy-mode, -ot / --override-tensor, -ngl, --spec-type, --spec-draft-n-max, --mmproj, --reasoning, --reasoning-effort, --temp, --top-p, --top-k, --min-p, --presence-penalty.
1. Download one quant + the vision projector
hf download SolsticeAI/Qwen4-35B-A3B-GGUF \
--include "UD-Q4_K_XL/*" "mmproj-BF16.gguf" \
--local-dir ./qwen4-35b-a3b
Swap the include pattern for any other quant folder, e.g. "Q4_K_M/*". Files land in a sub-folder named after the quant.
2. Serve with llama-server
llama-server \
-m ./qwen4-35b-a3b/UD-Q4_K_XL/Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf \
--load-mode mmap \
--lazy-mode on \
-ot per_layer_token_embd=CPU \
-ngl 99 \
--spec-type draft-mtp \
--spec-draft-n-max 3 \
--mmproj ./qwen4-35b-a3b/mmproj-BF16.gguf \
--host 0.0.0.0 --port 8080
Drop --mmproj for text-only. Add --reasoning off for non-thinking mode, or set --reasoning-effort to low, high, or xhigh (Qwen's official levels are off, low, high (default), and xhigh).
3. Official sampling
From the official Qwen4-35B-A3B card:
| Parameter | Thinking | Non-thinking |
|---|---|---|
temperature |
1.0 | 0.7 |
top_p |
0.95 | 0.80 |
top_k |
20 | 20 |
min_p |
0.0 | 0.0 |
presence_penalty |
0.0 | 1.5 |
repetition_penalty |
1.0 | 1.0 |
# thinking
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0
# non-thinking (also pass --reasoning off)
--temp 0.7 --top-p 0.80 --top-k 20 --min-p 0 --presence-penalty 1.5
Qwen also recommends, within the 1M context, allowing up to 262,144 tokens for reasoning content and 131,072 tokens for the final response on agentic tasks. Qwen notes that presence_penalty may be adjusted between 0 and 2 to reduce loops, with a possible trade-off in language mixing and quality.
4. MTP speed (indicative)
Three separate runs, with different settings. They are not repeats of the same test and should not be averaged.
All GGUF sets โ two prompts, temp 0, draft depth 2 (2026-12-06) โต
llama-server from prebuilt llama.cpp b12973, on an NVIDIA RTX PRO 6000 Blackwell Server Edition (96 GB), with -ngl 99 -ot per_layer_token_embd=CPU -fa on -c 8192 --jinja. MTP off vs --spec-type draft-mtp --spec-draft-n-max 2 (draft depth 2). Two greedy chat requests (temperature 0, reasoning_effort off, max_tokens 256): code = a Python Fibonacci function, prose = a short paragraph on why the sky is blue. tok/s is the server timings.predicted_per_second; acceptance is draft_n_accepted / draft_n. Single request each, no warm-up โ indicative only.
At temperature 0, the MTP-on output was not byte-identical to MTP-off for most quants in this run. The code prompt matched only for Q3_K_L, Q6_K, and Q8_0; no quant matched on the prose prompt.
| Quant | Code off (tok/s) | Code on (tok/s) | Code accepted | Prose off (tok/s) | Prose on (tok/s) | Prose accepted |
|---|---|---|---|---|---|---|
| UD-IQ2_M | 138.1 | 198.0 | 156/196 (80 %) | 138.9 | 161.9 | 75/150 (50 %) |
| UD-Q2_K_XL | 134.1 | 207.3 | 158/192 (82 %) | 137.0 | 166.0 | 59/114 (52 %) |
| UD-IQ3_XXS | 137.8 | 215.1 | 161/188 (86 %) | 139.0 | 156.9 | 65/136 (48 %) |
| UD-Q3_K_XL | 136.0 | 200.3 | 161/187 (86 %) | 137.4 | 162.8 | 78/142 (55 %) |
| UD-Q4_K_XL | 132.5 | 201.0 | 159/191 (83 %) | 133.4 | 156.2 | 61/120 (51 %) |
| UD-Q5_K_XL | 130.4 | 192.4 | 160/188 (85 %) | 130.5 | 159.1 | 56/98 (57 %) |
| UD-Q6_K_XL | 129.7 | 196.2 | 162/185 (88 %) | 132.5 | 147.2 | 88/170 (52 %) |
| UD-Q8_K_XL | 103.5 | 173.7 | 162/186 (87 %) | 103.5 | 130.0 | 62/124 (50 %) |
| UD-Q4_K_M | 131.3 | 198.4 | 160/189 (85 %) | 131.7 | 152.0 | 48/102 (47 %) |
| UD-Q4_K_M-Plus | 116.9 | 192.0 | 162/185 (88 %) | 117.5 | 146.3 | 69/132 (52 %) |
| Q2_K | 131.4 | 207.2 | 153/204 (75 %) | 131.3 | 149.5 | 45/126 (36 %) |
| Q3_K_S | 130.0 | 208.2 | 157/196 (80 %) | 130.5 | 160.3 | 71/154 (46 %) |
| Q3_K_M | 131.6 | 217.0 | 161/187 (86 %) | 132.4 | 167.2 | 63/126 (50 %) |
| Q3_K_L | 129.1 | 208.4 | 160/188 (85 %) | 129.4 | 169.6 | 52/96 (54 %) |
| Q4_K_S | 135.8 | 215.0 | 161/187 (86 %) | 137.5 | 169.5 | 83/156 (53 %) |
| Q4_K_M | 129.8 | 213.4 | 162/186 (87 %) | 133.1 | 182.9 | 64/110 (58 %) |
| Q5_K_S | 127.4 | 204.1 | 158/193 (82 %) | 128.4 | 169.9 | 54/98 (55 %) |
| Q5_K_M | 126.4 | 202.8 | 159/191 (83 %) | 127.5 | 172.7 | 52/88 (59 %) |
| Q6_K | 122.7 | 196.9 | 160/188 (85 %) | 117.9 | 148.8 | 69/150 (46 %) |
| Q8_0 | 116.3 | 188.9 | 161/187 (86 %) | 116.3 | 152.9 | 72/128 (56 %) |
| IQ2_XS | 131.0 | 191.7 | 146/217 (67 %) | 132.5 | 157.6 | 66/150 (44 %) |
| IQ2_M | 129.2 | 194.5 | 149/210 (71 %) | 129.3 | 166.0 | 69/142 (49 %) |
| IQ3_XXS | 127.8 | 198.7 | 155/200 (78 %) | 128.9 | 165.6 | 73/148 (49 %) |
| IQ3_M | 125.7 | 200.6 | 155/198 (78 %) | 127.2 | 151.5 | 63/148 (43 %) |
| IQ4_XS | 129.4 | 208.7 | 159/190 (84 %) | 129.1 | 153.1 | 43/102 (42 %) |
| IQ4_NL | 132.3 | 212.6 | 161/188 (86 %) | 131.3 | 160.6 | 62/128 (48 %) |
Source: reproduce/live/bench-2026-12-06/ (mtp.tsv and per-quant logs).
UD-Q4_K_XL โ two prompts, temp 0 (2026-12-04) โด
llama.cpp b12973 speculative decoding, MTP off vs on, 4 threads, low priority, temperature 0. Two prompts, one short run each. The generated output was identical with MTP on and off.
| Prompt | MTP off (tok/s) | MTP on (tok/s) | Drafts accepted |
|---|---|---|---|
| Code | 131 | 190 (~1.45ร) | 159/191 (83 %) |
| Prose | 131 | 164 (~1.25ร) | 116/178 (65 %) |
โด measured 2026-12-04, single short run per prompt, temp 0; raw log pending upload from the build box. Write-up: reproduce/results/mtp_udq4kxl_2026-12-04.md.
Earlier run โ one Fibonacci request, --spec-draft-n-max 2
Greedy single request (a Python Fibonacci function, max 256 tokens), llama-server with -ngl 99 -ot per_layer_token_embd=CPU -fa on, MTP off vs --spec-type draft-mtp --spec-draft-n-max 2, on an RTX PRO 6000 (96 GB). About 85 % of drafted tokens were accepted.
| Quant | MTP off (tok/s) | MTP on (tok/s) |
|---|---|---|
| Q4_K_M | 72.4 | 159.2 |
| Q8_0 | 53.4 | 145.1 |
| UD-Q4_K_XL | 86.9 | 145.4 |
Source: reproduce/results/mtp_speeds.md. One short request per config, recorded at the time of the run and not re-checked against raw logs (lost in a sandbox wipe), and the draft depth was 2, not the 3 used in the example above. The UD-Q4_K_XL row here (86.9 โ 145.4 tok/s) is this run, not the 2026-12-04 two-prompt run above, and not the 2026-12-06 table (which covers every quant).
Architecture
Quoted from the official model card. This is a quantization of those weights, not a fine-tune.
| Type | Causal language model with vision encoder |
| Parameters | 35B with 3B activated, plus 20B n-gram embedding and 2B MTP |
| Hidden dimension | 2048 |
| Token embedding | 248,320 (padded) |
| N-gram embedding | 10,000,000 (bigrams/trigrams at layer 2) |
| Layers | 40 |
| Hidden layout | 10 ร (3 ร (Gated DeltaNet โ MoE) โ 1 ร (Qwen Sparse Attention โ MoE)) |
| Gated DeltaNet | 32 V heads / 16 QK heads, head dim 128 |
| Qwen Sparse Attention | 16 Q heads / 2 KV heads, head dim 256; RoPE dim 64; indexer is MQA (4 query heads, 1 shared key, dim 128); budget 512 blocks or 2,048 tokens |
| MoE | 256 experts, 8 routed + 1 shared active, expert intermediate dim 512 |
| Gated residual | 4 branches, bottleneck rank 256 |
| MTP | 1 layer, trained with multi-steps |
| Context | 1,048,576 tokens, native |
| llama.cpp arch | qwen4exp (b12969+) |
Official Benchmarks
Qwen publishes a benchmark table on the official card:
Qwen/Qwen4-35B-A3B โ Benchmark Results
Those scores are Qwen's measurements of the official BF16 / native weights, not measurements of these GGUFs. This card does not copy scores from that image. Our own PPL and KLD figures against the BF16 are in the picker tables above and in the quality section below. A broader comparison versus other public GGUF suites is planned as a separate evaluation write-up.
Quality Metrics
Method: llama-perplexity b12973, wikitext-2 test, 40 ร 512 tokens, KLD against our BF16 (BF16 PPL = 6.5177 ยฑ 0.1701). Lower KLD is better; "same top" is how often the quant picks the same most-likely token as BF16. Footnote markers ยน ยฒ โต are explained under the picker tables.
| Quant | Size | PPL | Mean KLD | Same top token | Notes |
|---|---|---|---|---|---|
| BF16 | 112.81 GB | 6.5177 ยฑ 0.1701 ยน | โ | โ | Reference |
| Unsloth UD-Q4_K_M (their file, for reference) | 35.18 GB | 6.474 ยฒ | 0.0507 ยฒ | 91.03 % ยฒ | Measured by us on the same setup; not part of this repo |
| UD-Q4_K_M-Plus (ours) | 40.15 GB | 6.4889 ยฑ 0.1696 ยน | 0.0399 ยฑ 0.0012 ยน | 92.225 ยฑ 0.265 % ยน | Tuned variant; โ โ21 % KLD vs Unsloth's UD-Q4_K_M for +4.96 GB |
| UD-Q4_K_XL | 36.24 GB | 6.486 ยฒ | 0.0522 ยฒ | 90.89 % ยฒ | Unsloth's map + Unsloth's imatrix |
| UD-Q4_K_M (ours) | 35.18 GB | 6.5112 ยฑ 0.1701 ยน | 0.0555 ยฑ 0.0016 ยน | 90.873 ยฑ 0.285 % ยน | Unsloth's types 1:1 + our v6 imatrix |
| Q4_K_M | 36.60 GB | 6.5536 ยฑ 0.1711 ยน | 0.0907 ยฑ 0.0022 ยน | 88.284 ยฑ 0.318 % ยน | Standard imatrix 4-bit |
| Q8_0 | 60.33 GB | 6.522 ยฒ | 0.0248 ยฒ | 94.04 % ยฒ | Stock 8-bit; near the noise floor |
| IQ2_M | 26.89 GB | 7.7864 ยฑ 0.2093 โต | 0.4584 ยฑ 0.0075 โต | 73.520 ยฑ 0.437 % โต | 2-bit I-quant |
The table below is the complete 2026-12-06 pass (every GGUF set in this repo), sorted by mean KLD. The curated comparison above keeps the earlier ยน / ยฒ figures and notes; where a set appears in both, the rounded values match.
| Quant | Size | PPL | Mean KLD | Same top token | Notes |
|---|---|---|---|---|---|
| BF16 | 112.81 GB | 6.5177 ยฑ 0.1701 ยน | โ | โ | Reference |
| UD-Q8_K_XL | 62.29 GB | 6.4986 ยฑ 0.1695 โต | 0.0217 ยฑ 0.0006 โต | 94.402 ยฑ 0.228 % โต | |
| Q8_0 | 60.33 GB | 6.5220 ยฑ 0.1705 โต | 0.0248 ยฑ 0.0008 โต | 94.039 ยฑ 0.234 % โต | |
| UD-Q6_K_XL | 52.21 GB | 6.4913 ยฑ 0.1692 โต | 0.0325 ยฑ 0.0011 โต | 92.873 ยฑ 0.255 % โต | |
| Q6_K | 51.73 GB | 6.5571 ยฑ 0.1723 โต | 0.0365 ยฑ 0.0012 โต | 92.716 ยฑ 0.257 % โต | |
| UD-Q5_K_XL | 43.20 GB | 6.4846 ยฑ 0.1690 โต | 0.0380 ยฑ 0.0012 โต | 92.441 ยฑ 0.262 % โต | |
| UD-Q4_K_M-Plus | 40.15 GB | 6.4889 ยฑ 0.1696 โต | 0.0399 ยฑ 0.0012 โต | 92.225 ยฑ 0.265 % โต | |
| UD-Q4_K_XL | 36.24 GB | 6.4856 ยฑ 0.1689 โต | 0.0522 ยฑ 0.0016 โต | 90.892 ยฑ 0.285 % โต | |
| Q5_K_M | 41.49 GB | 6.5856 ยฑ 0.1740 โต | 0.0548 ยฑ 0.0015 โต | 90.441 ยฑ 0.291 % โต | |
| UD-Q4_K_M | 35.18 GB | 6.5112 ยฑ 0.1701 โต | 0.0555 ยฑ 0.0016 โต | 90.873 ยฑ 0.285 % โต | |
| Q5_K_S | 40.68 GB | 6.5314 ยฑ 0.1715 โต | 0.0578 ยฑ 0.0016 โต | 90.333 ยฑ 0.293 % โต | |
| Q4_K_M | 36.60 GB | 6.5536 ยฑ 0.1711 โต | 0.0907 ยฑ 0.0022 โต | 88.284 ยฑ 0.318 % โต | |
| UD-Q3_K_XL | 30.88 GB | 6.6036 ยฑ 0.1727 โต | 0.0920 ยฑ 0.0024 โต | 88.088 ยฑ 0.321 % โต | |
| Q4_K_S | 35.21 GB | 6.5556 ยฑ 0.1710 โต | 0.0985 ยฑ 0.0023 โต | 87.392 ยฑ 0.329 % โต | |
| IQ4_NL | 35.13 GB | 6.6543 ยฑ 0.1749 โต | 0.1091 ยฑ 0.0027 โต | 87.098 ยฑ 0.332 % โต | |
| IQ4_XS | 34.06 GB | 6.6541 ยฑ 0.1747 โต | 0.1105 ยฑ 0.0026 โต | 86.500 ยฑ 0.338 % โต | |
| UD-IQ3_XXS | 28.74 GB | 6.7066 ยฑ 0.1758 โต | 0.1299 ยฑ 0.0033 โต | 86.088 ยฑ 0.343 % โต | |
| UD-Q2_K_XL | 27.68 GB | 6.8128 ยฑ 0.1804 โต | 0.1649 ยฑ 0.0044 โต | 84.216 ยฑ 0.361 % โต | |
| Q3_K_L | 33.45 GB | 6.8619 ยฑ 0.1836 โต | 0.1772 ยฑ 0.0042 โต | 83.716 ยฑ 0.366 % โต | |
| UD-IQ2_M | 26.61 GB | 6.8996 ยฑ 0.1823 โต | 0.1907 ยฑ 0.0046 โต | 83.598 ยฑ 0.367 % โต | |
| Q3_K_M | 32.04 GB | 6.8028 ยฑ 0.1807 โต | 0.1911 ยฑ 0.0043 โต | 83.118 ยฑ 0.371 % โต | |
| IQ3_M | 30.68 GB | 6.7931 ยฑ 0.1761 โต | 0.1942 ยฑ 0.0041 โต | 82.873 ยฑ 0.373 % โต | |
| Q3_K_S | 30.38 GB | 7.1071 ยฑ 0.1902 โต | 0.2823 ยฑ 0.0057 โต | 79.343 ยฑ 0.401 % โต | |
| IQ3_XXS | 28.83 GB | 7.1544 ยฑ 0.1891 โต | 0.3032 ยฑ 0.0063 โต | 78.833 ยฑ 0.404 % โต | |
| Q2_K | 28.14 GB | 7.7686 ยฑ 0.2127 โต | 0.4468 ยฑ 0.0082 โต | 74.735 ยฑ 0.430 % โต | |
| IQ2_M | 26.89 GB | 7.7864 ยฑ 0.2093 โต | 0.4584 ยฑ 0.0075 โต | 73.520 ยฑ 0.437 % โต | |
| IQ2_XS | 25.68 GB | 8.6660 ยฑ 0.2330 โต | 0.6374 ยฑ 0.0099 โต | 69.402 ยฑ 0.456 % โต |
Honest notes
- Our plain Q4_K_M is the weak spot: KLD 0.0907 is about 1.8ร Unsloth's UD-Q4_K_M (0.0507). The imatrix helped (0.0979 โ 0.0907 without vs with), but the gap comes from the recipe: stock Q4_K_M keeps attention, shared-expert and
ssm_outtensors at 4-bit, while the UD maps pin those higher. Seereproduce/results/kld_comparison.md. - Same tensor types as Unsloth's UD-Q4_K_M with our imatrix gave KLD 0.0555 vs their 0.0507, i.e. on this test Unsloth's imatrix is a bit better than ours; a longer-context v7 corpus did not close the gap (
UD-Q4_K_M-U-v7: 0.0546,reproduce/live/results.tsv). - On this MoE family any tiny numeric change gives roughly 0.02 KLD / ~94 % top-1 agreement because of router flips, so Q8_0-class numbers sit near the noise floor.
- One configuration only (512-token context, wikitext-2). Other text or longer context may rank files differently.
- A vLLM BF16 reference (PPL 7.895, wikitext-2, 40 ร 1024 tokens,
summary_bf16.json) belongs to our MLX / FP4 evaluations. Different engine and context length, so it is not comparable to the llama.cpp numbers above.
Other Formats
- MLX (Apple Silicon):
SolsticeAI/Qwen4-35B-A3B-MLX
Responsible Use
These files are a direct quantization of official Qwen/Qwen4-35B-A3B weights and are released under the same Apache License 2.0. Please follow Qwen's usage terms and ethics statement on the official card. This suite does not add or remove alignment training.
Credits
- Qwen Team โ Qwen4-35B-A3B architecture, training, and official weights.
- ggml-org / llama.cpp โ
qwen4expsupport (PR #33626), prebuilt binaries, and the Q4_K_M imatrix + BF16-override approach documented on ggml-org/Qwen4-35B-A3B-GGUF. - Unsloth โ Unsloth Dynamic (UD) recipe, published imatrix, and per-tensor override maps used for eight of the UD sets (
UD-Q4_K_M/-Plusreuse Unsloth's tensor types with our own imatrix). MTP-baked-in convention also follows Unsloth. - bartowski โ calibration corpus v6, used for our imatrix.
Citation
If you use the official model, please cite the Qwen Team:
@misc{qwen4-35ba3b,
title = {{Qwen4-35B-A3B}},
author = {{Qwen Team}},
month = {November},
year = {2026},
url = {https://qwen.ai/blog?id=qwen4-35b-a3b}
}
If you use this GGUF suite specifically, please also link or cite:
- Downloads last month
- 13,088
Model tree for SolsticeAI/Qwen4-35B-A3B-GGUF
Base model
Qwen/Qwen4-35B-A3B