The dive · Qwen4 sparse
Qwen4-35B-A3B
Three Unsloth tiers on one card, each scored against the same full-precision base.
Qwen's first Qwen4 release runs on the sparse path as a second shape of the same model code. This page follows it from UD-IQ4_XS to UD-Q8_K_XL: what each tier costs in memory and speed, and how far each sits from the BF16 weights.
The tiers
KLD to the BF16 base: 100eval wikitext chunks of 512eval tokens, Halocline with its int8 cache. The share of experts the card holds is at the full served context.
| Tier | Pack | Experts on the card | Mean KLD | Tail (p99) | Same first choice | PPL |
|---|---|---|---|---|---|---|
| UD-IQ4_XS | 31.54 GiB | 88.00%eval | 0.06587eval | 0.75740eval | 89.72%eval | 7.6005eval |
| UD-Q6_K_XL | 50.03 GiB | 78.00%eval | 0.02690eval | 0.28990eval | 93.33%eval | 7.5236eval |
| UD-Q8_K_XL | 61.29 GiB | 56.00%eval | 0.02164eval | 0.24002eval | 93.98%eval | 7.5387eval |
UD-Q6_K_XL cuts the mean KLD of UD-IQ4_XS by more than half and keeps its tail under two fifths of it. UD-Q8_K_XL stores every attention, GDN and shared-expert projection in BF16, and the engine reads them on their full-precision activations. It takes about a fifth off UD-Q6_K_XL's mean KLD and is the tier the engine serves by default.
Halocline against llama.cpp
One base, one GGUF (UD-Q6_K_XL), two engines. Unsloth's own figure for this tier comes from a different evaluation mix, so it is left out of the comparison.
| Engine | Mean KLD | Tail (p99) | Same first choice | PPL |
|---|---|---|---|---|
| llama.cpp (f16 cache) | 0.03053eval | 0.32380eval | 92.95%eval | 7.5244eval |
| Halocline (int8 cache) | 0.02690eval | 0.28990eval | 93.33%eval | 7.5236eval |
| Halocline (fp16 cache) | 0.02755eval | 0.29890eval | 93.02%eval | 7.5291eval |
On the same weights Halocline lands closer to the base than llama.cpp, and its int8 and fp16 caches differ by about one standard error of llama.cpp's mean.
Decode
The bench's three fixtures, tokens per second with the drafter on. Each table compares arms built from one tree.
| Tier | Conversation | Structured | Prose | Prefill |
|---|---|---|---|---|
| UD-IQ4_XS | 208.6eval | 246.5eval | 198.3eval | 11,550eval |
| UD-Q6_K_XL | 177.2eval | 207.6eval | 161.4eval | 10,669eval |
| Arm | Conversation | Structured | Prose | One-token window | Lossy flags |
|---|---|---|---|---|---|
| UD-Q6_K_XL | 223.2eval | 273.3eval | 205.2eval | 6.1 mseval | none |
| UD-Q8_K_XL | 171.3eval | 216.9eval | 161.5eval | 8.3 mseval | none |
| UD-Q8_K_XL, tensor cores | 145.8eval | 191.2eval | 130.5eval | 10.6 mseval | --bf16-tc |
Each step up in tier trades speed for fidelity. UD-Q8_K_XL's extra cost is its BF16 projections: nearly twice the bytes of the eight-bit ones, read on every pass, which the one-token window shows as a fixed extra time. The tensor-core option rounds the activations to BF16 and still decodes slower here, because these products wait on memory, not arithmetic. It stays an option, off by default.
Long context
UD-Q8_K_XL on the long profile: 500,000eval cells of k8v4 cache.
A prompt of 375,799eval tokens of source code hides one passphrase at 40.00%eval of its length. The answer is exact. Prefill runs at 8,049eval tokens a second and decode at 134.1eval at that depth.
Cache formats
Measured on the UD-IQ4_XS pack. Memory and expert residency at the long profile, then how far each format moves the next-token distribution from the most precise cache that fits.
| Cache | Cache size | Experts on the card | Decode at the long profile | Cache hit |
|---|---|---|---|---|
| int8 | 5.71 GiBeval | 86.00%eval | 119.0eval | 95.10%eval |
| k8v4 | 4.59 GiBeval | 93.00%eval | 124.6eval | 97.70%eval |
| q4_0 | 3.47 GiBeval | 98.00%eval | 135.6eval | 99.50%eval |
| Depth | Against | Cache | Same argmax | Mean KL |
|---|---|---|---|---|
| 250K | fp16 | int8 | 10/12eval | 0.097eval |
| 250K | fp16 | k8v4 | 12/12eval | 0.132eval |
| 250K | fp16 | q4_0 | 10/12eval | 0.289eval |
| 500K | int8 | k8v4 | 10/12eval | 0.191eval |
| 500K | int8 | q4_0 | 8/12eval | 0.257eval |
int8 and k8v4 sit within noise of each other; the rotated four-bit format costs two to three times their divergence and buys the most residency. The long profile serves k8v4.