Nandai AI
Sign In
GGF-37 · PCIE 4.0/5.0 X16 HOST-RAM MOE EXPERT (-OT) VS 0 MB-VRAM ENGRAM MATH

PCIe Host-RAM MoE Offloading: O(1) Engram Lookups vs Cold Routed Expert CPU Evaluation (DDR5 Roofline)

Understand why offloading Qwen 4’s 20.5B Engram table to Host RAM costs virtually zero speed, whereas offloading active MoE routed experts (-n-cpu-moe / -ot) throttles decode to host DDR5 bandwidth.

Hybrid Math Disclosure: Dual-channel DDR5-6000 theoretical ceiling is ~96 GB/s (typically ~70–82 GB/s practical STREAM bandwidth); hybrid decode times sum GPU and CPU critical-path steps.

GGF-37 · NVIDIA Workstation · Hybrid Offload Math⌘9 Model Manager

OS-Aware Studios & Tools

Verify memory fit before downloading weights, or launch zero-upload browser studios on macOS, Windows, and Linux:

02 · Hardware Memory-Bandwidth Roofline & KV Matrix

Exact Weight GiB, Active GB/Token, KV Scaling & Bandwidth Ceilings

Throughput sensitivity contrasting Host-RAM Engram offload against partial routed-expert CPU offload on an RTX 4090 (1,008 GB/s) paired with Dual-Channel DDR5-6000 (~96 GB/s raw).

Hardware TierQuant / ModeWeight GiBActive GB/tokKV @ 32KKV @ 128KKV @ 1MRoofline tok/sResidency Fit
Engram Offloaded Only (UD-IQ3_S)0.00006 GB/tok PCIe · 2.45 GB GPU12.90 GiB VRAM2.45 GB GPU1.50 GiB5.25 GiB40.25 GiB411.4 tok/s theoretical (GPU bound)Optimal 24 GB RTX strategy
25% Routed Experts on Dual-Ch DDR5~0.65 GB/tok CPU + 2.30 GB GPU15.50 GiB VRAM0.65 GB DDR51.50 GiB5.25 GiB40.25 GiB~110–147 tok/s DDR5 ceiling (96 / 0.65)Viable fallback for oversized quants
100% Routed Experts on Dual-Ch DDR5~2.50 GB/tok CPU + 0.45 GB GPU4.50 GiB VRAM2.50 GB DDR51.50 GiB5.25 GiB40.25 GiB~38.4 tok/s DDR5 ceiling (96 / 2.50)Runs 35B-A3B on 8 GB GPUs
Dense 32B 50% CPU Split (DDR5-6000)9.90 GB/tok CPU + 9.90 GB GPU10.50 GiB VRAM9.90 GB DDR52.00 GiB8.00 GiBN/A (128K)~9.7 tok/s DDR5 ceiling (96 / 9.90)Severe CPU memory choke
Variant / ModeMemory / ThroughputRecommended Hardware Configuration
Engram-Only Host Offload (-ot engram)~10–64 KB/tok across PCIePreserves 98%+ of pure GPU GDDR roofline
Partial MoE Layer Offload (-n-cpu-moe)0.5–2.0 GB/tok CPU DDR5 readsSpeeds capped by Dual/Quad-Channel DDR5 BW
NUMA Multi-Socket Tuning (--numa)Pins CPU expert pages per socketPrevents cross-UPI/Infinity Fabric stalls

Section 01 · GGF-37

Why Offloading Engram Costs Microseconds While Offloading Experts Costs Milliseconds

O(1) embedding table lookups transfer 100,000x fewer bytes across PCIe than FFN matrix multiplications.

Engineers frequently conflate "Host-RAM Engram offloading" with classic "CPU layer offloading" (-ngl 20). Classic offloading moves entire transformer attention or FFN matrices into system RAM, forcing the host CPU to stream gigabytes of weights across slow dual-channel DDR5 (~75–96 GB/s effective) for every single token—immediately throttling an RTX 4090 down to CPU speed.

Qwen 4 35B-A3B’s 20.5B Engram table is fundamentally different: it performs O(1) sparse row indexing, fetching ~10–64 KB per generated token across PCIe 4.0/5.0 x16 (~25–55 GB/s sustained DMA). Transferring 32 KB takes roughly ~1.3 microseconds—meaning Host-RAM Engram offloading keeps 100% of active GPU bandwidth working unthrottled on the MoE backbone.

Always monitor PCIe DMA throughput and CPU memory bandwidth utilization independently during hybrid tuning (using tools like nvidia-smi dmon and perf/likwid on Linux) so you verify whether CPU GEMV or PCIe link width is limiting your hybrid split.

Roofline / Allocation EquationHybrid_Step_Time = max(GPU_Bytes / GPU_BW) + (CPU_MoE_Bytes / Host_DDR5_BW) + (PCIe_Transfer_Bytes / PCIe_BW)

Section 02 · GGF-37

Selective MoE Expert Offloading (-ot "\.ffn_.*_exps\.=CPU") on 8–12 GB GPUs

If you own an 8 GB RTX 4060 or 12 GB RTX 3060 + 64 GB DDR5, offload routed experts while pinning QSA/GDN/KV on GPU.

What if you only have an 8 GB or 12 GB discrete GPU paired with 64 GB of fast dual-channel DDR5-6400 RAM? Instead of abandoning Qwen 4 35B-A3B Q4_K_M/UD-IQ4_XS, keep all 10 QSA attention layers, 30 Gated-DeltaNet layers, shared experts, routers, and KV cache resident in VRAM (~4.5–6.0 GiB total!), while placing all 256 routed experts and Engram in Host DDR5 via llama.cpp -ot regex overrides.

Because Qwen 4 activates only 8 routed experts (~2.50 GB/tok) rather than 32B dense weights (19.80 GB/tok), even dual-channel DDR5 (~96 GB/s) still delivers a ~38 tok/s theoretical ceiling (~20–28 tok/s real-world) on an 8 GB GPU—whereas a dense 32B offloaded model crawls below 10 tok/s!

Notice why keeping the 30 Gated-DeltaNet blocks, 10 QSA attention layers, routers, shared expert, and KV cache on GPU is non-negotiable even during heavy MoE offload: QSA attention scans grow with prompt length (O(N)), so offloading KV cache to CPU RAM destroys performance far worse than keeping KV on GDDR VRAM while offloading cold routed experts.

Verification & Runtime Flagsllama-server -m Qwen4-35B-A3B-UD-IQ4_XS.gguf -c 65536 -fa on -ot "engram=CPU" -ot "\.ffn_(gate|up|down)_exps\.=CPU" -ngl 99

Section 03 · GGF-37

Dual-Channel Desktop DDR5 vs Quad/Octa-Channel Threadripper / EPYC Offload

Host RAM memory channels dictate exact hybrid MoE ceilings.

Consumer AM5 / LGA1851 desktops provide 2 memory channels (~90–100 GB/s peak DDR5-6000/6400). Workstation Threadripper / Xeon / EPYC platforms scale to 4, 8, or 12 DDR5 channels (200–460 GB/s)—turning hybrid 8-active MoE offload on a single 24 GB GPU into a silent high-capacity engine that rivals midrange Mac Max speeds.

On Linux hosts with dual-channel DDR5, check memory kit timing (XMP/EXPO DDR5-6000 CL30 vs JEDEC 4800) and lock hugepages / NUMA allocation cleanly: boosting host memory clock from 4800 MT/s to 6400 MT/s yields a direct +33% speed boost on CPU-offloaded MoE expert slices.

Interactive Sizing & Browser Studios

Verify Exact Memory Margins Before Downloading Multi-Gigabyte GGUFs

Plug your exact hardware SKU, KV quantization (--cache-type-k / -v), and context length into our zero-upload GGUF VRAM & Roofline Calculator. Explore full model cards at /models and Apple Silicon tier breakdowns at /apple-silicon, or draft and audit content inside /writing-engine and /seo-engine.

05 · Technical FAQ (1:1 JSON-LD Parity)

PCIe Host-RAM MoE & Engram Math — Frequently Asked Questions

Why doesn’t offloading Qwen 4’s 20.5B Engram table tank speed like offloading transformer layers?

Engram is an O(1) sparse embedding lookup (~10–64 KB per token), whereas transformer FFN layers multiply gigabytes of matrices across every token.

Can an 8 GB or 12 GB RTX GPU run Qwen 4 35B-A3B UD-IQ4_XS using CPU expert offload?

Yes—keeping attention, Gated-DeltaNet, shared expert, and KV cache (~4.5–6.0 GiB) on GPU while offloading routed experts to >=32 GB DDR5 yields ~20–30+ tok/s class bandwidth ceilings instead of <10 tok/s dense swaps.

Does PCIe 5.0 vs PCIe 4.0 matter much when only Engram is offloaded?

Barely for decode (~1–3 us per token), though PCIe 5.0 halves initial checkpoint load times from host RAM to GPU VRAM.

What command pins only routed MoE experts to CPU while keeping shared experts and KV on GPU?

Pass -ot "\.ffn_(gate|up|down)_exps\.=CPU" alongside -ot "engram=CPU" and -ngl 99 in llama.cpp.

Founder Pro $9.99/mo · 67% Off1-tap Stripe Checkout · Instant ?ref= Free Months · 40% Recurring Partner Payouts
1. Subscribe in 1 TapFOUNDER_999_LOCK

Unlock All 19 Pro Studios + Mac App

Lock $9.99/mo Founder Pro (reg. $29.99 — 67% off), $119/yr Web Annual (-34%), or $299/yr 5-Mac + Web Pro.

Redeem Code
2. Get 6 Months FreeZERO OTP

Mint Your ?ref= Link Instantly

Give friends 67% off ($9.99/mo). Every paid friend adds 30 days of Pro free to your account (up to 6 months).

Dashboard: /refer · Rules

3. Creator & Publisher Cash90-DAY COOKIE

Earn 40% Monthly · 30% Annual

Earn 40% recurring monthly until cancel + 30% annual & every renewal, or embed our free tools with data-ref.