A 24 KB operating system in pure assembly boots straight into an AI chat, no Linux needed

Developer Alexey Fateev has written a tiny operating system with one job: running the Qwen3-0.6B language model. The kernel is just 24 KB, boots into a chat in under 100 milliseconds and, by his own measurements, runs up to 54 percent faster than llama.cpp on Linux.

Tools Nov 26, 2026 6 min read Source: GeekNews (KR)
Illustrative image, AI-generated

What it's about

On November 26, developer Alexey Fateev showed off an unusual project on X: an operating system called asm-llm-os.elf whose only purpose is to run a single AI language model, Alibaba's Qwen3-0.6B. Boot a PC or virtual machine with it and you land straight in a chat window. There's no Linux or Windows underneath. According to Japanese tech magazine TechnoEdge and Korean portal GeekNews, the kernel is 24,252 bytes, or roughly 24 kilobytes. A single phone photo is usually a hundred times bigger.

The code is on GitHub under the MIT license, so you're free to use, modify and redistribute it.

All assembly, no helper libraries

What makes it special is how it's built. Fateev wrote everything in x86-64 assembly, using the NASM assembler: the boot process, the drivers and the actual compute engine for the language model (the inference engine). Assembly is the programming language closest to the processor's own instructions. Every single computational step is spelled out by hand. Normally you'd write something like this in C or Rust and let a compiler do the heavy lifting. Here there's no C or Rust code at all, and the system doesn't use a standard library like libc either, which usually provides basic functions for things like memory handling and text output.

The feature set is correspondingly sparse. According to TechnoEdge, the system only has a handful of drivers:

  • serial port (COM1)
  • VGA text display with 80 × 25 characters
  • PS/2 keyboard
  • timekeeping
  • power-off via ACPI, the standard power management interface

There's no disk driver. The OS and the model live entirely in RAM. That's why the system even boots in a virtual machine that has no disk at all.

How the model gets into memory

The model itself isn't part of the 24 KB. It's a separate 614 MiB file. According to GeekNews, it's mapped in via zero-copy: the system reads the model data directly from wherever it sits in physical memory instead of copying it somewhere else first. Access goes through 2 MiB huge pages. Some background: an operating system normally splits memory into small 4 KB pages. For every access, the processor has to look up in a kind of address book, the page tables, where the data actually lives. With large pages there are far fewer entries, and the processor has to look things up much less often.

Fateev cites exactly this as the main reason for the speed. He maps the first 4 GiB of memory with 2 MiB pages. As a result, reading the 614 MiB model no longer involves walking fine-grained page tables.

On top of the model, the system needs another 449 MiB, for example for the KV cache. That's where the model stores intermediate results for the words so far in the conversation, so it doesn't have to recompute them every time. The system keeps the cache between turns, so a new question doesn't trigger a full recomputation of the earlier history. The context window, the amount of text the model can take in at once, is 2048 tokens by default. A token is a chunk of a word. When the window is almost full, the system clears the conversation history and carries on.

Boot in under 100 milliseconds, plus benchmarks

According to Fateev, it takes 74 to 94 milliseconds from kernel start to the chat prompt, less than the blink of an eye. On a regular computer with an operating system and a chat app, you'd wait many seconds for that.

Fateev measured speed on a server with an AMD EPYC 7642 and compared it against llama.cpp, the popular open-source program for running language models locally. llama.cpp ran on Linux, CPU only, with Q8_0. That's a form of quantization: the model is shrunk by storing its numbers at lower precision, here at about 8 bits per value. The benchmark measured the generation of new tokens (decoding):

Threads asm-llm-os (tokens/s) llama.cpp (tokens/s) Lead
1 23.67 16.63 +42 %
4 78.89 51.08 +54 %
8 118.08 80.79 +46 %
16 134.94 103.03 +31 %

According to GeekNews, the 16-vCPU figure came from a virtual machine running under QEMU with KVM. A vCPU is a virtual processor core. There's also a correctness test: with 1 to 32 vCPUs, the generated tokens and output bytes matched "Phase 1" exactly. That presumably refers to the Linux version of the engine from the first part of the project. So the OS doesn't just compute faster, it also gives the same answers for the same inputs.

TechnoEdge explicitly points out that all the numbers come from Fateev himself. There are no independent measurements yet.

Requirements and installation

You need an x86-64 processor that supports the AVX2, FMA and F16C instruction sets. These are special instructions that let the processor crunch many numbers at once or work with 16-bit floating-point numbers. Most Intel and AMD processors from roughly the last ten years support them. Apple Macs with M-series chips and other ARM devices are out. You'll need just over 1 GB of RAM: 614 MiB for the model and 449 MiB for the cache and the rest.

The GitHub repository explains how to build an ISO image that boots on both older BIOS machines and modern UEFI systems. There's also a guide for Proxmox VE, a popular platform for running virtual machines.

Part of a three-part project

The operating system is the second part of the llm.asm project. Part one is a 14,712-byte inference engine for Qwen3-0.6B on Linux. Part three is a 32,944-byte program that trains a small GPT model from scratch. Together, the three parts add up to 17,252 lines of assembly code.

Our take

Hardly anyone will use this day to day. At 0.6 billion parameters, Qwen3-0.6B is a very small model. It can answer simple questions and write short texts, but it's nowhere near big chatbots like ChatGPT or Claude. The system is also hard-wired to this one model and has no disk access, no networking and no graphical interface.

As a proof of concept, though, it's remarkable. It shows how much compute time goes into the usual software layers, such as the operating system, memory management and libraries. If the developer's numbers hold up, a purpose-built system without those layers squeezes 30 to 50 percent more out of the same processor. Some of that could probably be achieved on Linux too, since huge pages exist there as well. The sources don't say whether llama.cpp was optimally configured for the comparison.

The approach is interesting for niche cases: devices that only handle one AI task and need to boot extremely fast with a small memory footprint, such as kiosk systems or embedded hardware. Maintainability is the open question. Hand-writing assembly for every new model and every processor type is a huge amount of work. For now, llm.asm is above all an impressive lesson in how a language model works, all the way down to the last processor instruction.

Sources

#assembly#qwen3#operating system#llama.cpp#inference
Read the original source

Ask the AI assistant

Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.

Connecting …

The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.

Comments

What do you think? Already tried it? Write it here, no sign-up needed.

  1. Loading comments …

Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.