Offloading Qwen4-35B's 12GB n-gram table to SSD costs only ~5% speed, rasbt finds
rasbt · x · 2026-12-05
Sebastian Raschka continues his memory analysis of Qwen4-35B-A3B: it uses 12GB more RAM than Qwen3.8-35B-A3B (no n-gram), mostly due to a 20B-entry n-gram table.
He tested llama.cpp's --lazy-mode on to offload that table to SSD on a DGX Spark: loaded RAM dropped from 32.0 to 21.2 GiB (-10.8 GiB), peak inference RAM from 32.7 to 21.8 GiB. Speed cost was modest: generation fell from 57.5 to 54.7 tok/s (-5.0%) with 512-token input, and only -0.8% to -3.5% with 4096-token input. Conclusion: outsourcing the n-gram table incurs little token/sec penalty, making the model viable on memory-constrained hardware.
More from Infra
- NATS moves toward post-quantum crypto: ML-DSA signatures and X-Wing hybrid keys PR — tctjr · 2026-12-06
- Report: Nvidia lawyer ran $10M lobbying push; key Asian partner has China gov't, military ties — GarrisonLovely · 2026-12-06
- Liang Wenfeng: domestic GPU adaptation faces no obstacles, DeepSeek gets only ~16k Huawei cards — zephyr_z9 · 2026-12-06
- Permitting book author: BAAJA proves US infrastructure slowness isn't destiny — sebkrier · 2026-12-06
- Diamandis: Musk Is Vertically Integrating Every Bottleneck, From Rockets to AI Compute — PeterDiamandis · 2026-12-06
- Bitcoin OG Vinny Lingham Exits Crypto Commentary to Build Ternary AI Chip Startup Trinary.ai — marcvanderchijs · 2026-12-06