This 24 KB Assembly OS Boots Straight Into an AI Chatbot and Beats llama.cpp by Up to 54%
A developer deleted Linux and wrote a 24 KB pure x86-64 assembly OS that boots in 74 ms into a Qwen3 chatbot, up to 54% faster than llama.cpp.

Most people run a local AI model on top of Windows, macOS or Linux, which take up gigabytes of disk and seconds to boot. One developer decided the operating system was in the way, so he deleted Linux entirely and wrote his own.
The result is a 24 KB operating system written in pure x86-64 assembly that boots in 74 milliseconds and drops you straight into a chat with Qwen3-0.6B, Alibaba's small open AI model. On the same server, it generates text up to 54% faster than llama.cpp, the most popular way to run models like this on a CPU.
The project is called llm.asm, it's open source under the MIT license, and it has already picked up more than 2,600 stars on GitHub in three days.
Quick facts
- Developer: Alexey Fateev (alesha-pro on GitHub, @superalesha on X)
- Project: llm.asm, created November 25, 2026
- OS size: 24,252 bytes (
asm-llm-os.elf) - Language: 100% hand-written x86-64 NASM assembly. No C, no Rust, no libc, no Linux, no Windows
- Boot time: 74 to 94 milliseconds straight to the chat prompt
- AI model: Qwen3-0.6B in Q8_0 format (about 614 MiB), roughly 28,000 times bigger than the OS that runs it
- Speed vs llama.cpp: +31% to +54% faster text generation on an AMD EPYC 7642
- Accuracy: output matches PyTorch FP32 on 64 out of 64 test tokens
- License: MIT, free to use and modify

The bare-metal OS right after booting: 16 CPU cores online, Qwen3-0.6B loaded, "ready 84.89 ms", and a chat prompt waiting. (Screenshot: Alexey Fateev, llm.asm, MIT license)
"I deleted Linux completely"
Fateev announced the project on November 25 with a post that went viral among AI and low-level programming fans:
I deleted Linux completely, baked Qwen3-0.6B into a 24 KB pure x86-64 assembly OS, and it runs up to 54% faster than native Linux llama.cpp.
He wasn't exaggerating about "from scratch". According to the project, everything is hand-written assembly: the code that boots the PC, switches the processor into 64-bit mode, wakes up every CPU core, reads the keyboard, draws text on screen, splits your words into tokens, and does all of the AI math.
There is no file system and no disk driver. The model weights are loaded into memory and the OS reads them directly from physical RAM.
How tiny is 24 KB?
To put 24,252 bytes in perspective:
- A single photo from your phone is usually 2,000 to 5,000 KB, about 100 to 200 times bigger.
- The Windows 11 install is more than 20 GB. That's roughly a million times larger.
- The legendary Commodore 64 from 1982 came with about 20 KB of ROM, which held its kernel, its BASIC programming language and its character set. Fateev's OS is in the same ballpark, but it runs a modern AI model.

The Commodore 64 shipped with roughly 20 KB of ROM. Forty-four years later, a 24 KB OS can chat with an AI model. (Photo: Evan-Amos, public domain, via Wikimedia Commons)
The AI model is the big part. Qwen3-0.6B in 8-bit format weighs about 614 to 649 MB, around 28,000 times the size of the OS. As Tom's Hardware joked, that's how it should be: you bought your computer to run apps, not to run the operating system.
What happens when you switch it on
Here is what the OS does in under a tenth of a second, based on the project's description:
- Boots through the standard Multiboot loader, the same way many hobby operating systems start
- Switches the CPU into 64-bit Long Mode
- Turns on the processor's fast math features: AVX2, FMA and F16C
- Uses ACPI and APIC to find and wake every CPU core
- Maps the Qwen3 weights straight from RAM
- Opens a multi-turn chat with memory of the conversation (a KV cache), using VGA text mode, a PS/2 keyboard and a serial port
There are also a few built-in commands, including /think to switch Qwen3's reasoning mode on and off, /bench to run a speed test, and /clear to start a new chat.

Running live in a Proxmox virtual machine with a 0 GB disk on an older 12-core Xeon. Qwen3 works through a simple word problem and prints its speed. (Screenshot: Alexey Fateev, llm.asm, MIT license)
The benchmark: up to 54% faster than llama.cpp
llama.cpp is the standard tool for running AI models on ordinary CPUs, and it's already heavily optimized. Beating it is not easy.
Fateev ran both on the same machine, an AMD EPYC 7642 server processor, using the same Qwen3-0.6B model in 8-bit (Q8_0) format, with the GPU switched off. Here are the text-generation speeds he reported for the bare-metal OS:
| CPU threads | llama.cpp | Bare-metal llm.asm OS | Difference |
|---|---|---|---|
| 1 | 16.63 tok/s | 23.67 tok/s | +42% |
| 4 | 51.08 tok/s | 78.89 tok/s | +54% |
| 8 | 80.79 tok/s | 118.08 tok/s | +46% |
| 16 | 103.03 tok/s | 134.94 tok/s | +31% |
tok/s = tokens per second. A token is roughly three-quarters of an English word.
So with four threads, the tiny OS writes about 79 tokens a second versus about 51 for llama.cpp. The best peak he saw was 136.6 tokens per second.

An Intel Xeon E5-2670. Fateev also ran the OS on a 2014-era 12-core Xeon E5-2670 v3 virtual machine with 2 GB of RAM and no disk at all. (Photo: Porsche613, CC BY-SA 4.0, via Wikimedia Commons)
Where does the extra speed come from?
Part of the gain comes from cutting out the operating system. With no Linux underneath, nothing else is competing for the CPU, and memory can be mapped in large 2 MB "huge pages", which the developer says adds about 10% on its own.
But most of it comes from the math code. The repository describes:
- 8-bit integer math using the AVX2 instructions
vpmaddubswandvpmaddwd, so the CPU multiplies many small numbers per instruction - 16-bit scale values converted on the fly with F16C
- Prefetching the next row of weights before it's needed, so the CPU isn't left waiting on memory
- A KV cache laid out so each attention head reads memory in order
There's also a Linux version of the same inference engine. It's even smaller at 14.7 KB, because it skips all the boot and hardware code. That version still beats llama.cpp by 18% to 36% across 1 to 40 threads, which shows the speedup isn't only about removing Linux.
One important caveat from the README: for the prompt (the "prefill" step), llama.cpp processes tokens in batches, while llm.asm goes one token at a time. The headline numbers are for generating text, which is the part you wait on in a chat.

Server racks at NOIRLab's headquarters. Bare-metal AI tricks like this are most interesting for dedicated machines that only ever run one model. (Photo: NOIRLab/NSF/AURA/T. Slovinský, CC BY 4.0, via Wikimedia Commons)
Is the AI still accurate?
Speed is useless if the answers get worse. Fateev compared the output against the reference version of Qwen3 running in PyTorch at full 32-bit precision:
- All 64 out of 64 greedy test tokens matched exactly
- The internal numbers matched with a cosine similarity of 0.99965 (1.0 would be identical)
- Results were bit-exact across thread counts, so you get the same answer whether you use 1 core or 16
In other words, it's not cutting corners on quality to go faster.
Not just one project: there are four
The GitHub repository actually contains four pieces, all in assembly:
- Qwen3 inference for Linux: a 14.7 KB program with a chat mode
- The bare-metal OS: the 24 KB bootable system that made headlines
- A Mini-GPT trainer: a 33 KB program that trains a small GPT model from scratch on Shakespeare, with a live text-based progress chart drawn in Braille characters
- "Ring -1 kernel surgeon": an experimental hypervisor that runs underneath an unmodified Linux kernel with a 2B-parameter model watching it
Altogether, the project says it's 17,252 lines of hand-written assembly.

Tux, the Linux mascot. The project's pitch was "I deleted Linux completely", though its Linux build is still the easiest way to try the inference engine. (Photo: Renato.pierri, CC BY-SA 4.0, via Wikimedia Commons)
Should you delete Linux too?
Probably not. This is an impressive experiment, not a replacement for your daily OS. Keep in mind:
- It runs one small model, Qwen3-0.6B. Bigger models with billions more parameters are far more capable, and need far more memory.
- It's CPU only. A decent graphics card will still run most models much faster.
- There's no networking, no files, no apps. It does one job.
- It supports x86-64 CPUs with AVX2, so it won't run on Apple Silicon Macs or phones.
What it does show is how much speed is still left on the table in everyday AI software. If one developer working in raw assembly can beat a mature tool like llama.cpp by up to 54% on the same chip, there's room for the mainstream tools to get faster too. It's also a glimpse of a possible future where small, dedicated AI boxes boot instantly into a model with nothing else in the way.
How to try it
The full source, an ISO builder for BIOS and UEFI, and a Proxmox setup guide are on GitHub at github.com/alesha-pro/llm.asm. You'll need:
- An x86-64 CPU with AVX2, FMA and F16C (most Intel and AMD chips from the last decade)
- Enough RAM to hold the model, around 1 GB free
- The NASM assembler and a Linux machine or VM to build it, or a virtual machine like QEMU or Proxmox to boot it safely
Start with the 14.7 KB Linux build if you just want to see the speed, then try the bare-metal ISO in a virtual machine before you go anywhere near real hardware.
Sources
- llm.asm repository on GitHub (MIT license): https://github.com/alesha-pro/llm.asm
- Alexey Fateev's announcement on X (Nov. 25, 2026): https://x.com/superalesha/status/2125682626056839259
Also reported by Tom's Hardware.


