Technical Deep-Dive · November 2026 · llama-modchip v3.1.1

Running Qwen3.8-176B in a 28.5 GiB Cgroup on CPU (0 GPU) via Lazy-Paged PLE

How co-designing donor-free quantization, lazy NVMe Per-Layer Embeddings, zero-copy 3D MoE memory mapping, and an 832-byte L1 SIMD speculative arbiter breaks the capacity and DDR5 bandwidth walls for 30B–284B Sparse MoE models.

Live 1.0× Uncut 4-Pane Linux Terminal Capture (64 GB Tier Demo — see Section 2 for the 28.5 GiB MaxQ-32GB lazy-PLE proof): Captured immediately after llama-server's 26.5 s cold load into a 60 GiB Cgroup v2 (Swap=0, --list-devices = (none)). Stock top (1602% CPU, 45.5g RES), raw /sys/fs/cgroup (45.68 GiB ≤ 60 GiB, pgsteal=0), live llama-server stderr, and interactive bash (commands pasted) generating a 360-token greenfield C11 lock-free SPSC ring buffer from 176.5B Qwen3.8-MaxQ-64GB at 12.97 tok/s (tg_3s up to 16.08 t/s; 259/329 = 78.7% draft acceptance, mean len 3.59, truncated=0).

1. The Four Engineering Walls

Sparse Mixture-of-Experts (MoE) architectures paired with hybrid linear-attention or state-space layers (Qwen3.8-Flash-Next 176.5B/5B active, DeepSeek-V4-Flash-0731 284.3B/13.2B active, NVIDIA-Nemotron-3.5-30B-A3B 30.2B/3B active) decouple total knowledge capacity from per-token FLOPs. Yet running them cleanly inside commodity 16–64 GB RAM budgets with zero GPU hits four hard walls:

  1. The Donor-Free Capacity Wall: Across 18 published Qwen3.8-Flash-Next GGUFs (54.40–329.72 GiB), 0 / 18 fit inside a 28.5 GiB ceiling because keeping the 320M-row Per-Layer Embedding (PLE) table in IQ4_NL consumes 26.82 GiB alone, leaving < 1.7 GiB for the 48-layer MoE trunk.
  2. 3D MoE Repack Memory Blowup: Default heap repacking on 3D routed MoE tensors destroys zero-copy mmap sharing, inflating RssAnon 5.4× (from 1.81 GiB to 9.81 GiB) and pushing 64 GB machines into swap.
  3. ggml ABI Collisions: Overwriting upstream ggml type enum IDs breaks compatibility every time upstream adds standard formats like Q1_0 (41), Q2_0 (42), or F8_E4M3 (43).
  4. CPU-MoE Speculative Cost Asymmetry: On GPUs, verifying k draft tokens costs almost the same as verifying 1 token. On DDR5-bound MoE CPUs, distinct draft tokens activate extra experts from RAM (+0.285–0.395× single-token latency per draft step), while chaining a 248K-vocab NextN MTP head burns ~15 ms per extra step.
llama-modchip v3.1.1 architecture diagram
End-to-end llama-modchip v3.1.1 co-design: Three-tier donor-free MaxQ fleet over a zero-collision ggml ABI (41..45), multi-ISA SIMD/Metal kernels with zero-copy 3D MoE --repack, and RouteCrack 2.0.

2. Breaking the 32 GB & 64 GB Walls Without Donor Weights

Every flagship checkpoint in our v3.1.1 fleet is compiled 100% donor-free directly from upstream BF16/MXFP4 weights (reference Zen 5 benchmarks run on a 16-core AMD Ryzen 9 9955HX Linux container with 74.0 GiB RAM, Swap=0, 0 GPU, with tier RAM caps enforced independently via Linux Cgroup v2 MemorySwapMax=0):

Disk footprint vs blind perplexity Pareto frontier
Blind wiki-alt.txt Pareto frontier across Qwen3.8 (64 GB & 32 GB), DeepSeek-V4 284B (64 GB), and Nemotron-3.5 30B (16 GB).

3. RouteCrack 2.0 & the 832-Byte L1 Micro-Arbiter

On DDR5-bound Sparse MoE models, drafting token td adds marginal cycle cost ΔCd = Ctot(d+1) − Ctot(d), where Ctot(k) = Cbatch(k) + nmtp(k)·Cmtp + 1k>0·Crb·(1 − psurv,k) (Cbatch(0) = 1.035 on MTP profiles, 1.000 on draftless profiles) and R(k) = E[Ak] / Ctot(k). In rc_arbiter_l1.h, the conservatism guard κ ∈ [1.0376, 1.0844] scales only the marginal cost increment ΔCd, admitting td iff E[Ad+1] / (Ctot(d) + κ·ΔCd) > R(d) (equivalently psurv,d+1 / ΔCd > κ·R(d) for ΔCd > 0). RouteCrack 2.0 (--spec-type routecrack2) solves this with three unified phases:

  1. Sub-250 ns Fast-Path Two-Zone Suffix Bypass: An O(1) 3-gram hash-chain index spanning a 16K Hot Zone + 24K Prefix Zone with O(1) rollback undo. Whenever context consensus exceeds the arbiter's confidence gate and is unrefuted in Stockfish TT, it drafts up to 5 tokens in under 250 ns — skipping the ~15 ms 248K MTP lm_head pass completely.
  2. Single-Pass Neural MTP / RCPredictor Anchor + Stockfish-PVS 192 KB Zobrist TT: On MTP models (Qwen3.8), runs a single d=0 NextN pass and anchors it back into Two-Zone Suffix and three lockless 4-way 64 KB transposition tables with 28-bit Tagged Mode Refutation (isolating JSON, Code, and Prose syntax modes so mode transitions never poison refutations).
  3. 832-Byte L1-Resident SIMD Micro-Arbiter: A cache-line-aligned [10 → 16 → 1] ClippedReLU MLP with pre-sanitized NaN/±Inf guards and a degree-5 Remez minimax sigmoid (< 3×10-6 error). At exactly 13 cache lines (832 bytes), it never leaves L1d and runs bit-identically across AVX-512F, AVX2+FMA, ARM64 NEON, and scalar C++17.
RouteCrack 2.0 per-workload speedup
Head-to-head uncapped throughput at T=0 on 16 Zen 5 cores (0 GPU, 74.0 GiB container): Qwen3.8 aligned rises +77.0% vs N=1 (15.34 agg / 21.38 W1 refactor tok/s, +10.1% vs v3.0 draft-mtp; separate cold-cache 60 GiB Cgroup v2 Swap=0 3-restart certification in qwen38_64gb_cgroup60g_v311.json records 8.78±0.02 t/s N=1 vs 15.64±0.05 t/s RC2 [W1 22.00±0.19] at 48.35 GiB cold cgroup peak, pgsteal=0); Nemotron-30B (Fractal-MXFP4 ref) reaches 28.20 agg / 42.18 W1 tok/s (MaxQ-16GB N=1 hits 22.64±0.03 at 15 GiB cgroup with 0.2 GiB refault; RC2 exceeds 15 GiB via ARC reclaim); DeepSeek-V4 284B hits 7.79 agg / 12.31 W1 uncapped (exceeds 60 GiB at 32K context, needing ≥61 GiB free RAM).

4. Honest Limitations & Trade-offs

What does NOT win everywhere (verified numbers, no cherry-picking):
  • High-entropy prose on 284B non-MTP MoE & single-run parity vs v3.0: On DeepSeek-V4 MaxQ-v4, free bilingual prose (W4) runs -7.4% slower than pure N=1 (6.49 vs 7.01 tok/s) because 256-expert DDR5 pull cost dominates whenever context n-grams miss (aggregate still wins +14.5% thanks to +90.0% on W1 refactor). Furthermore, aggregate RouteCrack 2.0 deltas over v3.0 ngram-map-k on non-MTP models (+0.84% DeepSeek, +3.96% Nemotron) fall within single-run variance; the main non-MTP benefit is eliminating W2 JSON mode-bleed divergence and lifting Nemotron W2 by +10.5%.
  • Greedy T=0 parity & high-entropy drift: RouteCrack 2.0 (across all three models: Qwen3.8 254/254, DeepSeek 191/191, Nemotron 255/255) and MTP-1 / draft-mtp (evaluated on Qwen3.8) are 100% bit-exact vs N=1 on structured W1+W2, whereas v3.0 ngram-map-k diverged on W2 (DeepSeek 120/191, Nemotron 57/255). On high-entropy W3/W4, all speculative methods diverge from N=1 at near-tied logits, which we attribute to batched GEMM vs. GEMV FP32 accumulation order (not yet isolated with a deterministic-reduction kernel; common prefix: Qwen3.8 RC2 4/254 W3, 48/254 W4; DeepSeek 34/191 W3, 48/191 W4; Nemotron 17/253 W3, 173/255 W4).
  • Loader & kernel portability: Only Nemotron MaxQ-16GB uses standard ggml types (≤42, zero custom types, zero ConeCollapse bias) for unmodified execution on upstream llama.cpp (de32b268c+) and downstream runners supporting GGML_TYPE_Q2_0 = 42. Qwen3.8 MaxQ-64GB uses standard types (≤42) and requires --no-repack on unpatched upstream llama.cpp. Qwen3.8 MaxQ-32GB and DeepSeek-V4 MaxQ-v4 use zero custom tensor types but require the llama-modchip v3.1.1+ loader for ConeCollapse ffn_down_exps.bias. Custom FRACTAL_64 (44) supports CPU + Apple Metal and VQ3_64 (45) supports CPU SIMD only (no CUDA/Vulkan).
  • Greedy T=0 on 1.63 bpw 32 GB tier: At ultra-low effective bitwidth on MaxQ-32GB, greedy decoding can enter tail loops on long generations; standard sampling (--temp 0.6 --top-p 0.95 --top-k 20 --presence-penalty 0.2 --repeat-penalty 1.05, automated by ./modchip) restores clean loop-free output.

5. Reproducing Everything

Full unified patch (pinned to llama.cpp @ de32b268c), static Linux binaries, preflight SHA-256 checker, committed raw JSON benchmark logs (RouteCrack 2.0 head-to-head, all four cold-cache Cgroup v2 3-restart logs across 60 GiB / 28.5 GiB / 15 GiB, DeepSeek 51-chunk, Nemotron KLD/WT2), and the full LaTeX paper are open under Apache 2.0:

git clone https://github.com/synchopate/llama-modchip.git
cd llama-modchip
./modchip setup
./modchip bench

Download Technical Paper (PDF) · GitHub Repository · Aligned Hugging Face Fleet