Back to browse
GitHub Repository

Run GLM-5.2 (744B MoE) on a 25GB-RAM consumer machine — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦

139 starsC

Getting GLM 5.2 running on my slow computer

by vforno·Jul 9, 2026·1 point·0 comments

AI Analysis

●●●BangerWizardryBig BrainZero to One

Streams 744B MoE experts from disk to run on 25GB RAM—no GPU, pure C.

Strengths
  • Single 1,300-line C file with zero runtime dependencies beyond OS page cache.
  • 57× KV-cache compression via MLA attention validated token-exact against transformers.
  • Native MTP speculative decoding achieves 2.00 tokens/forward with 100% acceptance.
Weaknesses
  • 0.1 tok/s cold start and ~2 tok/s sustained—usable but not practical for production.
  • DSA sparse attention marked in-progress; full feature set not yet complete.
Category
Target Audience

ML engineers, hobbyists running local LLMs, constraint-focused developers

Similar To

llama.cpp · MLX · Ollama

Post Description

A few days ago I found myself trying out GLM 5.2 and was really positively impressed. The capabilities and security I was getting from this LLM are similar to those I've gotten from models like Claude or GPT, and this really surprised me. But then I thought, "I wonder how it would work on a normal computer like mine," and above all, "I wonder if it would work without going into OOM on a computer like mine." So I started working with the help of agents to test this possibility. I started converting the model to int4, understanding MTP usage, and if possible implementing DSA for long context. How it responds in int4 and whether the quality is maintained or not. Until I got to the point, on my computer with 32GB of RAM, I was able to communicate with GLM 5.2 with times that, of course, aren't high in cold start, but even then, we're talking about 0.1 tok/s, but that wasn't important to me. The important thing was the journey to reach this goal and, above all, changing the perspective on the project. I wanted it to work at all costs, even slowly. So I created Colibrì, which was born from a very simple idea, to be honest, but tested in every way, where a 744B Mixture-of-Experts model activates only ~40B parameters per token—and only ~11 GB of those change from token to token (the routed experts). So:

The dense part (attention, shared experts, embeddings—~17B params) stays resident in RAM at int4 (~9.9 GB); The 21,504 routed experts (75 MoE layers × 256 experts + the MTP head, ~19 MB each at int4) live on disk (~370 GB) and are streamed on demand, with a per-layer LRU cache, an optional pinned hot-store, and the OS page cache as a free L2.

The engine is a single C file (c/glm.c, ~1,300 lines) plus small headers. No BLAS, no Python at runtime, no GPU.

No GPU or serious hardware because I don't have that hardware so I can't test it on hardware that is more powerful than my computer.

Colibrì is a one-person project, written and tested entirely on a 12-core laptop with 25 GB of RAM — the numbers above are the ceiling of what I can measure at home. If this project is useful or interesting to you and you'd like to support its development (better hardware test translates directly into a faster engine for everyone: real NVMe scaling data, bigger pinned caches, int2/int3 quality sweeps on real benchmarks), you can:

star the repo and share it; open issues with benchmark numbers from your hardware; reach out via GitHub issues if you'd like to sponsor development or donate hardware.

Every contribution, from a datapoint to a disk, moves the ceiling.

Any feedback are welcome!

Repo: https://github.com/JustVugg/colibri

Similar Projects