Skip to main content
AI RADARGitHub
4•11/27/2026, 21:38•3 min read

Developer Runs Qwen3-0.6B in a 24 KB OS Written in Pure x86-64 Assembly

Executive TL;DR30s read

The asm-llm-os project shows that a minimal bare-metal OS can run a small AI model faster than llama.cpp on Linux.

A developer has fully abandoned Linux and run Qwen3-0.6B in a 24 KB operating system written in pure x86-64 assembly. According to the author, the model runs up to 54% faster than llama.cpp on Linux.

The Multiboot-compatible binary OS (asm-llm-os.elf) occupies 24,252 bytes. It was built from scratch without Linux, Windows, C, Rust, or libc. It boots in 74–94 ms, switches to 64-bit Long Mode, activates all CPU cores through APIC, maps 614 MiB of Q8_0 weights directly from physical memory, and starts an interactive chat with KV-cache, multi-turn dialogue, VGA, PS/2 keyboard, and serial port support.

Benchmark results against llama.cpp (Q8_0, -ngl 0) on an AMD EPYC 7642:

  • 1 thread: 23.67 vs 16.63 tokens/s (+42%).
  • 4 threads: 78.89 vs 51.08 tokens/s (+54%).
  • 8 threads: 118.08 vs 80.79 tokens/s (+46%).
  • 16 threads: 134.94 vs 103.03 tokens/s (+31%, peak 136.6).

On a diskless Proxmox VM with a 12-core 2014 Intel Xeon E5-2670 v3 and 2 GiB RAM, the system reaches the input prompt in under 5 seconds (kernel itself: 95 ms). The model runs directly from RAM, producing 78 tokens/s during generation and up to 111.5 tokens/s during input processing.

Results are bit-exact across thread counts. All 64 tokens generated with greedy decoding match PyTorch FP32 outputs (cosine similarity 0.99965).

A 14.7 KB ELF build for Linux (FAST_Q8=1, INT8×INT8, AVX2+F16C) also outperforms llama.cpp by 18–36% with 1 to 40 threads, while running directly on hardware with 2 MiB memory pages gives another 10% gain.

The OS source code, a tool for building a hybrid BIOS/UEFI ISO image, and instructions for configuring Proxmox without a disk are available under the MIT license.

GitHub repository

Why it matters

Analysis

It demonstrates how removing OS and runtime layers can reduce overhead and accelerate local AI inference on minimal or specialized hardware.

Discuss in community

Share your questions and insights with developers

Join Telegram
+5 Points
← Back to news feed

Related in Ecosystem

Practical guides, core terminology, and agent skills