Qwen4-35B-A3B landed with barely any warning, and my feed filled up with “how do I run it” questions. So I spent an evening measuring it on the box I actually run my local AI on: one RTX 5090 (32 GB VRAM) and 128 GB of system RAM, Windows 11, llama.cpp build b12977 (December 2026). Every number in this article came off that machine and that build - older builds lack some of the flags I use, so update before copying commands. The short verdict up front, because I owe you honesty before architecture: Qwen4 runs beautifully once configured - and it still is not what I keep loaded as my daily driver. Qwen3.8-Flash-Next on the Basalt engine is faster on the same hardware - about twice so at the long-context agent workloads I actually run - and in the main tests I run it has been the better model at this stage too. The long version follows.


What Qwen4-35B-A3B actually is

A 35-billion-parameter mixture-of-experts model that activates roughly 3 billion parameters per token, with a few architectural choices that matter a lot when you run it at home:

  • Hybrid attention. Only 10 of its 40 layers keep true attention KV cache; the rest run linear (DeltaNet-style) state whose size does not grow with context. This is why 512K-token context is affordable at all - the KV cache for half a million tokens costs single-digit gigabytes, not the tens of gigabytes a dense model would demand.
  • A huge n-gram embedding table. Most of the non-expert weights live here, and it barely shrinks with quantization. This is why even the tiny quants of this model are unexpectedly chunky - the quantizer keeps the embedding at high precision, so cutting experts harder barely moves total size.
  • MTP drafter in the pack. A built-in multi-token-prediction head gives free speculative decoding: llama.cpp just needs --spec-type draft-mtp and decode gets a visible boost.
  • Routed experts are the bulk of the weights - and experts are the sane thing to spill into system RAM, because only a few fire per token (more on that below).

Unsloth’s GGUF port is what most of us will run: the full Dynamic quantization ladder (from ~1 GB-per-10B territory up to BF16), vision projector files, and the MTP drafter included.


The hardware - and why RAM now matters more than VRAM

My machine: RTX 5090 (32 GB), 128 GB DDR5, Windows 11. For classic dense models the rule was simple: weights either fit on the GPU or you suffer. MoE models with linear attention quietly change that rule:

  • Only ~3B parameters are active per token, so expert weights that live in system RAM and stream over PCIe are not the catastrophe they would be for a dense model.
  • llama.cpp exploits this directly: --n-cpu-moe N (or --cpu-moe for all layers) offloads only routed experts from the first N layers to CPU while the attention/dense/shared-expert weights - the parts every token touches - stay in VRAM.
  • The practical consequence: a 32 GB card plus generous RAM runs a 34 GiB model at usable speed, and huge contexts stop being VRAM-bound. If you are buying a box for local AI in late 2026, spend on RAM.

The quantization ladder Unsloth ships

Sizes verified from the Hugging Face repo (December 2026, both shards, GiB, approx.):

QuantSizeQuantSize
UD-IQ1_S19.8 GiBUD-Q4_K_XL33.8 GiB
UD-IQ2_XXS21.8 GiBUD-Q5_K_XL40.2 GiB
UD-IQ2_M24.8 GiBUD-Q6_K_XL48.6 GiB
UD-Q2_K_XL25.8 GiBQ8_055.9 GiB
UD-Q3_K_XL28.8 GiBUD-Q8_K_XL58.0 GiB
UD-IQ4_XS29.8 GiBBF16105.1 GiB

Plus the fine middle rungs nobody remembers by name (IQ2_XS/S, IQ3_XXS/S, IQ4_NL, Q4_K_M/S, Q5_K_M/S, Q6_K). Two things to notice:

  1. The floor is high. Even IQ1_S is ~20 GiB, because the n-gram embedding table refuses to shrink. Plan for that floor before dreaming about smaller.
  2. The Unsloth Dynamic (UD) XL quants are the sweet spot - Q4_K_XL was my daily choice for this model: 33.8 GiB of weights with attention-critical layers kept sharper than standard Q4.

The llama.cpp config that actually works (including 512K context)

The control: 32K context, no cleverness

Default offloading, everything that fits on the card, MTP on:

llama-server -m Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf -c 32768 -ngl 99 \
  --spec-type draft-mtp --spec-draft-n-max 3

Measured on that 5090: conversation 140 / structured 182 / prose 133 tok/s decode, ~6,400 tok/s prefill. Genuinely fast for a 35B MoE.

Going to 512K: the sweep

Now -c 524288. Here the architecture does its trick - KV for half a million tokens is only about 5 GiB in q8 and ~10 GiB in f16 - but the 34 GiB of weights no longer share the card with it. I ran six configs back-to-back on the same build. Configs C-F share the same KV discipline (-fa on -ctk q8_0 -ctv q8_0) and differ only in expert placement:

Config at 512Kconvstructproseprefill
A. Everything on GPU, default f16 KVdid not load - KV buffer allocation failed
B. Everything on GPU, q8 KV + flash-attndid not load - compute buffers failed
C. All experts in RAM + 2 GiB expert cache22.224.027.2630
D. All experts in RAM (-cmoe)38.046.537.0595
E. Experts of first 20 layers in RAM (-ncmoe 20)59.078.461.51,529
F. -ncmoe 20 + 2 GiB expert cache50.971.471.41,835

Three lessons fell out. One: at 512K the all-GPU configs are not slow - they are dead; offloading experts to RAM is not an optimization, it is the ticket to entry. Two: the shape of the split beats its size - -ncmoe 20 (experts of half the layers in RAM) beat full offload by ~60% across the board. Three: the expert cache (--moe-cache-mib) hurt decode in both splits it was tested on - catastrophically with full offload (D → C), mildly with the partial split (E → F) - and only ever bought prefill (F is the fastest prefill of the sweep). Skip it unless you are strictly prefill-bound.

The flag that mattered most: --load-mode none

The load logs held a warning I nearly skipped: “tensor overrides to CPU are used with mmap enabled - consider…” When expert tensors are CPU-resident, the default memory-mapped file loading routes their reads through the OS page cache. I re-ran the winning split with the loading mode fixed:

llama-server -m Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf \
  -c 524288 -ngl 99 -fa on -ctk q8_0 -ctv q8_0 \
  --n-cpu-moe 20 --load-mode none \
  --spec-type draft-mtp --spec-draft-n-max 3
−ncmoe 20 at 512Kconvstructproseprefill
default loading (mmap)54.874.157.11,647
mmap + mlock64.775.558.81,647
--load-mode none72.5 (+32%)80.0 (+8%)65.6 (+15%)3,212 (+95%)

Same weights, same split, one flag: +21% average decode and nearly double the prefill. If llama.cpp warns you about mmap and CPU tensor overrides, believe it. One honesty note: the mmap baseline above is config E re-measured on a later day (originally 59.0 tok/s) - the same config drifted ~7% between sessions, so read every table in this article as ±10% box state, and compare configs run back-to-back, not across days.


Testing on your own box: the options ladder

Get a current build from the llama.cpp releases page (prebuilt CUDA binaries for Windows; I used b12977). Two flag-name traps: it is --load-mode, not --loading-mode, and both --load-mode and --spec-type draft-mtp simply error as invalid argument on older builds - update llama.cpp rather than hunting for alternatives. Then climb this ladder; each rung exists because the previous one failed in a specific, predictable way on my box:

  1. Rung 0 - fit check at a sane context. If this loads, the model is viable on your hardware at normal contexts:

    llama-server -m Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf \
      -c 32768 -ngl 99 --spec-type draft-mtp --spec-draft-n-max 3

    Out of VRAM at load? Jump straight to rung 2 with -ncmoe 30 - you need expert offload even at 32K.

  2. Rung 1 - demand 512K, keep KV cheap. Add the hybrid-context KV discipline (flash-attn is required for the q8 KV path):

    llama-server -m Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf \
      -c 524288 -ngl 99 -fa on -ctk q8_0 -ctv q8_0 \
      --spec-type draft-mtp --spec-draft-n-max 3

    On a 32 GB card this fails with a compute-buffer allocation error. That failure is your signal: the weights are hogging VRAM the KV needs.

  3. Rung 2 - spill experts, partially. Add --n-cpu-moe N and tune N (the log prints which layers’ experts moved to CPU). Rule of thumb from the sweep: start at 20 of 40 layers, raise N until the load succeeds with headroom, and prefer the smallest N that loads. Only fall back to full offload (--cpu-moe) if even N=40 OOMs - it runs at roughly half speed.

  4. Rung 3 - kill the mmap tax. The moment any experts are CPU-resident, llama.cpp logs a warning about mmap + tensor overrides. Add --load-mode none and re-measure - it is the single biggest free win in this article (+21% decode, +95% prefill).

  5. Rung 4 - leave the expert cache off (--moe-cache-mib) unless you measured prefill-bound workloads; and note the MTP drafter needs no second file - --spec-type draft-mtp uses the head shipped inside the main GGUF (Unsloth also publishes a standalone Q8_0 MTP file; I never needed it).

Measure each rung the same way - llama-bench -m <gguf> -ngl 99 works, or three prompt archetypes (chat, structured extraction, prose) timed against /completion, which is what I used.

The final recommended config (RTX 5090 + 128 GB, llama.cpp b12977)

llama-server \
  -m Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf \
  -c 524288 -ngl 99 \
  -fa on -ctk q8_0 -ctv q8_0 \
  --n-cpu-moe 20 \
  --load-mode none \
  --spec-type draft-mtp --spec-draft-n-max 3

Loads in ~10 s, serves 72.5 / 80.0 / 65.6 tok/s decode (conversation / structured / prose) and ~3,200 tok/s prefill at a full 512K context window. For everyday use at 32K, drop the context and the offload entirely - rung 0 is the fast config (133-140 tok/s decode, ~6,400 prefill).


The same box, the other model: Flash-Next on Basalt

Now the uncomfortable comparison. The same machine, with Qwen3.8-Flash-Next’s NVFP4-DQ8 pack on the Basalt engine (int8 KV, MTP speculation, single session up to 262K tokens) - the setup I actually run my coding agent on:

Measured on RTX 5090 + 128 GB RAMQwen4-35B-A3B (llama.cpp)Flash-Next (Basalt)
Prompt processing, long real prompts~6,400 tok/s (32K class)9,000-10,000 tok/s on 170K+-token agent sessions
Token generation, sustained (agent workloads)133-140 tok/s (32K); 73-80 (512K)~170 tok/s average
Token generation, structured bursts182 tok/sup to ~410 tok/s (16K context benchmark pass)
Context per sessionup to 512K (proven above)262K

Roughly: Flash-Next on Basalt is about 1.4-1.6× faster on prompt processing and 1.2× faster on 32K decode (over 2× against Qwen4's 512K config) than Qwen4 on llama.cpp - and it holds ~170 tok/s inside 170K-token agent sessions while my agent actually works, where Qwen4 would be down in the 70s at that context. On the main tests I care about - my agent’s real work, code tasks, structured output, my own question batteries - Flash-Next has also been the better model at this stage. New flagship architectures usually start rough; this one is impressive but still ahead of me on the tuning curve, not ahead of Flash-Next on the results board.


So what should you run?

  • You do not have 32 GB of VRAM and 96+ GB of RAM. Good news: this is the model’s design target. Pick the largest Unsloth UD quant that fits your RAM with room for context, and let llama.cpp’s MoE CPU offload do the rest. 16-24 GB GPU + 48-64 GB RAM: UD-Q2_K_XL to UD-Q3_K_XL. 24-32 GB GPU + 64 GB RAM: UD-Q4_K_XL. Use the --load-mode none rule from above the moment you offload experts to CPU. 512K context gets harder the smaller your box is - the KV is cheap, but expert streaming is not free.
  • You have a 5090-class card and 96-128 GB of RAM. You can run Qwen4 at 512K context today with the config above - that is genuinely novel and nobody should take it lightly. But keep your expectations calibrated by the table: Flash-Next on Basalt will answer you twice as fast, and today it usually answers better. That is why Qwen4 lives on my box as an on-demand server (512K jobs, architecture experiments) while Flash-Next stays the loaded daily driver.
  • You want quality per watt and per dollar. MoE + hybrid attention + MTP means Qwen4 may be the best value-per-token model on a given machine the moment its engine ecosystem matures. It is six weeks old; the llama.cpp paths I exercised were days old. Re-measure before you believe any benchmark table, including this one.

Measurement lessons

  1. Config first, verdict second. Qwen4 went from “55 tok/s” to “72 tok/s and 2× the prefill” on one flag. My first draft of this article had the wrong number because I skipped a warning line in a log.
  2. Benchmarks rot - and drift. The winning sweep config measured 59.0 tok/s decode on day one and 54.8 on a later re-run with identical flags; a “reproduce the baseline” control at 32K came in ~15% under the previous day’s identical config - page/file-cache wear after a session of engine crashes and restarts, cured by a reboot. Compare configs back-to-back, and re-measure after rebooting, not just after changing things.
  3. Architecture changes the shopping list. Hybrid attention made 512K context cheap; MoE made VRAM optional. The constraint of late-2026 local AI is streaming bandwidth - RAM, and PCIe. Buy accordingly.

The models are getting strange in the best way. Run them, instrument them, and let your own hardware do the arguing.