24 KB. That's the whole operating system, written in pure assembly, and its only job is to run an LLM.
It boots in under 100 ms on x86-64 and chats with Qwen3-0.6B. No Linux, no libc, no C, no Rust.
If you've ever wondered what an OS really does at boot, the repository is a lovely tour of bare-metal x86:
1. Multiboot 1 entry
2. Switch to 64-bit long mode
3. Identity mapping with 2 MiB huge pages
4. Every core brought up through Local APIC INIT-SIPI-SIPI
5. Drivers for COM1 serial, 80x25 VGA text, a PS/2 keyboard and PIT-calibrated timing
All in 4,167 lines of OS code, on top of the shared math and transformer routines.
The numbers: 134.9 tokens/s decode with 16 vCPUs under KVM, 23.5 tok/s on one. The output is byte-for-byte identical to the author's Linux build.
The author credits the huge pages for beating both that Linux build and llama.cpp. I'd like to see that comparison on more machines before I take it as general.
It's not embedded in the MCU sense: it needs AVX2 and a 614 MiB model in RAM. But to learn what happens between power-on and the first prompt, it's hard to beat.
Would you read 4,000 lines of assembly to see how an OS boots?
https://github.com/alesha-pro/llm.asm/tree/main/02-baremetal-os