uLLAMA: A Minimal C Runtime for Local LLM Inference

September 29, 2026

Why build it

I wanted to own the inference loop instead of treating it as a black box. The constraint was deliberate: an 8 GB, CPU-only laptop, no GPU. When memory and compute are that tight, every decision — context size, thread count, sampling strategy, model quantization — shows up immediately in how the model behaves, which makes it a good way to learn what actually happens between a prompt and a response.

It is also written in the same C discipline I practice at 42 São Paulo: the 42 Norm, manual resource management, and no framework between me and the model.

What it does today

The core is roughly a hundred lines of C. That is intentional: small enough to read in one sitting and reason about completely.

Where it is going

The repository is scaffolded for the next stages, which are planned rather than finished:

I’ll document each stage here as it becomes real, including the numbers, so the write-ups show what worked and what did not.


Code: github.com/drlandi/ullama