Disk-based streaming inference solution for GLM-5.2
karminski3 · x · 2026-07-14
The focus here isn't the model's capability, but how to run a massive MoE model with just 25GB of RAM.
The author explains the intuitive impossibility: GLM-5.2 has 744B total parameters and 40B active parameters. Even counting just the active part, 8bit/4bit quantization creates immense memory pressure, and reading disk for every token would bottleneck speed on NVMe bandwidth.
Their approach splits the model:
- Resident in memory: Dense parts like attention, shared experts, and embeddings (17B, 9.9GB)
- On-demand loading: 21,504 routed experts (370GB) stored entirely on disk, streamed during inference
- Cache strategy: per-layer LRU + hot spot pinning + system page cache acting as L2
- Prefetch optimization: Experimental router-lookahead (PILOT) uses the current layer's state to predict the next layer's routing, hitting 71.6% accuracy
- Speculative decoding: Combined with GLM's built-in MTP, achieving a 39–59% acceptance rate, outputting 2.2–2.8 tokens per forward pass
Conclusion: If you lack GPUs but have a strong NVMe/disk array, this framework is worth trying.
Related event: COLIBRI Runs 744B GLM-5.2 Model on 25GB RAM Without GPU(3 posts)→
More from Infra
- RFD4-Proteina runs on an RTX 3060: protein design from $0.001 per design — AllThingsApx · 2026-10-27
- Nature Physics: reprogrammable refractive index enables arbitrary multimode wave control for ML — MarioKrenn6240 · 2026-10-27
- RTX Spark laptops impress analyst: 30B local model runs quiet with great battery life — Scobleizer · 2026-10-27
- Reflection AI's Beam-1.0 tops US open-weight models, hitting 88% of Qwen3.8-2.4T with 23B active params — ryanshrout · 2026-10-27
- Re-uploading a 239GB robot dataset moved only 2.6MB — inside a petabyte-scale data pipeline — mervenoyann · 2026-10-27
- Intel to acquire Classiq to build full-stack quantum computing platform — BenBajarin · 2026-10-27