Getting a 35B MoE model with full 200k context running fast on a single 16 GB GPU โ
the settings, the science, and the things that didn't work so you don't have to.
8 P-cores used; 16 E-cores deliberately idle for LLM work
RAM
96 GB DDR5
5600 MT/s (XMP wouldn't post on the Z890 Taichi OCF; 5600 is manual + stable)
OS
CachyOS
Arch-based ยท CUDA 13.5 ยท driver 620.85.02
๐ก RAM was XMP-failing, so it was hand-set to 5600 MT/s. The bandwidth headroom showed up as stability more than speed โ the true bottleneck is expert reads from DRAM, and quant-level overhead eats most of the 4800โ5600 difference.
40 layers: 10 ร (3ร Gated DeltaNet linear attention + 1ร Qwen Sparse Attention) โ only the 10 QSA layers hold a growing KV cache, which is why 200k context is cheap.
Contains a ~20.5B n-gram embedding (PLE/Engram) table designed to live in host RAM โ --load-mode none makes llama.cpp stop fighting that and was the single biggest win.
Ships a 2B MTP head for speculative decoding โ works, but see ยง06 for why it lost.
Needs llama.cpp >= ~b12973. The distro pacman build (b10488) cannot load this model at all โ instant "failed to load model".
Flash attention + quantized K/V make the full 204800 context affordable on 16 GB.
04Benchmarks โ Measured, Not Estimated
Fresh cache every shot, hitting the live server on the exact config above. Days: 2026-12-04.
chat prompt
46 tok/s gen
~100k tokens
29 tok/s gen ยท ingest 2480 tok/s
~180k tokens
23 tok/s gen ยท ingest 2310 tok/s
Scenario
Generation
Prompt processing
Verdict
Short chat turn (fresh cache)
45โ47 tok/s
โ (too short to measure)
daily-driver speed
~100k-token prompt
27โ30 tok/s
~2480 tok/s
usable deep context
~180k-token prompt
22โ24 tok/s
~2310 tok/s
~half speed โ real cost of a whole book
๐ The decay curve is the honest headline: deep context costs roughly a third to a half of chat speed. The GDN/q4_0 architecture keeps it usable โ this is a tradeoff to know about, not a bug. (Filler text is repetitive, which is kind to PP; unique text lands 5โ15% lower.)
05Debunked โ Measured Losses, Don't Repeat
Attempt
Result
Why it failed
MTP speculative decoding --spec-type draft-mtp
29.6 tok/s, 11% draft acceptance
Draft context needs VRAM headroom a fully-packed 16 GB card doesn't have; free spark-headroom the draft loses more than it earns.
--prio 2 thread priority
โ30% (32 vs 46 tok/s)
Untested flag added on a hunch; A/B proved it. Debunked.
More threads (โt 12 / โt 16)
39 / 28 tok/s
E-cores steal DRAM bandwidth from P-core expert reads.
Big batches -b 4096 -ub 2048
PP unchanged at depth
Pipeline already saturated at 100k; earlier "gain" was a short-prompt measurement artifact.
ncmoe sweep 24/26 without matched -ot
invalid runs
Changing the MoE split without moving the CPU-pinning regex produces a broken hybrid.
Pacman llama.cpp-cuda b10488
can't load the model
Pre-dates Qwen4 arch support (~b12973+). Must build from source.
06Boot Persistence โ Reboot-Verified
Boot stage
Mechanism
Verification
Kernel โ GPU clocks pinned
/etc/systemd/system/nvidia-clock-lock.service
system, enabled ยท both ExecStart SUCCESS at boot
Login โ model server up (~90 s)
qwen4.service โ ~/qwen4-run.sh
user, enabled ยท Restart=on-failure
Speed check
fresh curl, cold cache
45.9 tok/s post-reboot โ
The reboot lesson: the first post-RAM-upgrade boot looked "slow" โ but the culprit was this conversation's own depth, not the config. Fresh short prompt: 45.9 tok/s. The decay curve from ยง04 was playing out live. Measurement saves you from "fixing" what isn't broken.
07Filesystem MCP โ The Assistant That Touches Files
Proven live in-session: write_file โ ยท read_file โ ยท edit_file (surgical string-replace with diff) โ
Zero VRAM/speed cost โ MCP runs CPU-side.
Security = scope discipline: only the listed dirs are visible; widen deliberately, one folder at a time, never $HOME. Loopback-only binding; MCP proxy is experimental โ don't expose untrusted environments.
One model, one service, one script, one source tree (~/src/llama.cpp), ~47 tok/s, boot-persistent.
๐ Monthly habit: git pull + rebuild in ~/src/llama.cpp (install ccache) โ Qwen4/GDN kernels are improving fast; a build from a month ago can be meaningfully slower.