A 24KB 'LLM-Only OS' Emerges: Bypassing Linux with Pure Assembly for Up to 54% Faster Inference Than llama.cpp
Developer Alexey Fateev has released 'asm-llm-os.elf', a 24KB operating system written entirely in x86-64 assembly that runs the Qwen3-0.6B language model direc
The software layers accumulated by computing ecosystems over decades have been radically stripped away in a new minimalist operating system optimized exclusively for running artificial intelligence models. Independent developer Alexey Fateev officially introduced 'asm-llm-os.elf', a specialized operating system built to execute the small language model (sLLM) 'Qwen3-0.6B' directly on bare hardware without relying on conventional general-purpose kernels.

Image source: https://www.techno-edge.net/article/2026/11/26/5824.html
The newly unveiled project discards the complex architecture traditionally required to bridge general-purpose operating systems with hardware, instead tailoring system resources strictly to the singular purpose of AI inference. Upon booting a virtual machine or PC, an interactive chat prompt launches instantly. The entire operating system binary weighs in at a mere 24,252 bytes—approximately 24 kilobytes.
A 24KB Low-Level Implementation Free of Linux and Windows
Running software in modern computing environments typically requires navigating numerous stacked abstractions, including kernels, device drivers, file systems, and language runtimes like C or Rust. This new operating system departs entirely from that established paradigm.
The developer authored every component from the boot sequence and hardware drivers to the AI inference engine entirely in Intel x86-64 assembly language using NASM (Netwide Assembler). The codebase contains no C or Rust code and has zero dependency on standard runtime libraries such as libc.
Supported hardware drivers are intentionally minimal: an 80x25 character VGA text display for visual output, a COM1 serial port for communication, a PS/2 keyboard driver, hardware timing routines, and ACPI-based power shutdown. By eliminating non-essential capabilities, the system achieves extreme lightweight execution and high execution speed.
Omitting Disk Drivers and Direct RAM Loading Architecture
asm-llm-os includes no file system or disk drivers for reading physical or virtual storage media. Instead, it adopts an architecture that loads both the operating system image and the AI model weights directly into system RAM.
Consequently, the OS can boot smoothly even inside virtual machine instances provisioned with 0GB of disk storage. Direct memory residency yields exceptionally fast startup times. The duration from initial kernel boot to the appearance of an interactive chat prompt spans only 74 to 94 milliseconds.
During conversations, the context length defaults to 2,048 tokens. When approaching this ceiling, the OS automatically clears previous conversation histories to maintain continuous, uninterrupted dialogue interaction.
Up to 54% Faster Inference Performance Compared to llama.cpp
The developer benchmarked performance against llama.cpp (running the Q8_0 quantized model on CPU), a widely adopted CPU-based inference framework running on Linux atop an AMD EPYC 7642 processor. The assembly-implemented bare-metal OS demonstrated superior token throughput across all thread configurations:
- 1 Thread: 23.67 tokens/sec (compared to 16.63 for llama.cpp, roughly 42% faster)
- 4 Threads: 78.89 tokens/sec (compared to 51.08 for llama.cpp, roughly 54% faster)
- 8 Threads: 118.08 tokens/sec (compared to 80.79 for llama.cpp, roughly 46% faster)
- 16 Threads: 134.94 tokens/sec (compared to 103.03 for llama.cpp, roughly 31% faster)
The developer attributes this performance advantage primarily to mapping up to 4GiB of memory space using massive 2MiB huge pages. When reading the 614MiB model payload, the system bypasses the intricate page-table traversal overhead typical of general-purpose operating systems, dramatically minimizing memory access latency.
Significance of the Experimental Implementation and System Requirements
This project is not positioned as a commercial replacement for general-purpose operating systems, but rather as an experimental implementation demonstrating how small language models can be driven with extreme efficiency.
Actual execution requires an x86-64 CPU supporting advanced instruction sets including AVX2, FMA, and F16C. In addition to the 614MiB model payload itself, roughly 449MiB of RAM is utilized for components such as the KV cache (the temporary memory space where the model stores prior computation states).
The source code is published under the MIT license within the open-source ecosystem. The repository includes step-by-step instructions for creating bootable ISO images supporting both BIOS and UEFI, alongside deployment guides for the Proxmox VE virtualization platform.
This project represents the second installment in a three-part assembly LLM trilogy by Alexey Fateev. Alongside previously released Linux inference engines and forthcoming codebases for training compact GPT models from scratch, it offers a compelling glimpse into how the relationship between software and hardware may be re-architected in the age of artificial intelligence.
Sources
- TechnoEdge: 24KBの「LLM専用OS」が登場 全てアセンブリでLinuxを排し、llama.cppより最大54%高速
- Developer Alexey Fateev via X: X (@ID_JAPAN_AO Reference)
- GitHub Repository: alesha-pro/llm.asm (02-baremetal-os)