Developer Alexey Fateev, known online as alesha-pro, has released a bare-metal operating system designed specifically to run large language models with minimal overhead. The project, named asm-llm-os, is a 24,252-byte binary written entirely in x86-64 assembly language. It removes standard operating system layers to allow direct hardware access, resulting in significantly faster inference speeds for the Qwen3-0.6B model.
Qwen3 assembly OS Performance Gains
The primary goal of the project was to eliminate the resource consumption typically associated with general-purpose operating systems like Linux. Fateev reported that the custom OS boots in 74 to 94 milliseconds. This speed is achieved by waking all CPU cores via the Advanced Programmable Interrupt Controller (APIC) and mapping the 614 MiB Q8_0 model weights directly from physical RAM.

Benchmarks conducted on an AMD EPYC 7642 processor showed substantial performance improvements over a standard Linux setup running llama.cpp. The bare-metal system achieved 78.89 tokens per second with four threads, compared to 51.08 tokens per second on Linux. This represents a 54% increase in speed. Even with 16 threads, the assembly OS maintained a 31% advantage, reaching 134.94 tokens per second versus 103.03 tokens per second.
Fateev noted that the output remains bit-exact across different thread counts. The system matched all 64 greedy tokens against PyTorch FP32 with a cosine similarity of 0.99965. Additional optimizations, such as using 2 MiB huge pages, provided another 10% performance boost on bare metal.

Minimalist Design and Compatibility
The entire operating system binary is smaller than the ROM of a Commodore 64. Despite its tiny size, it supports modern symmetric multiprocessing and provides a user interface through 80×25 character color VGA displays, PS/2 keyboards, and serial communications. The system drops users directly into a live multi-turn KV-cache chat interface upon boot.
For users who prefer a hosted environment, Fateev also released a Linux ELF build. This version is 14.7 KB and saves space by removing the bare-metal boot code. It still outperforms standard llama.cpp by 18% to 36% across various thread counts. The project includes a hybrid BIOS and UEFI ISO builder, allowing enthusiasts to test the system on different hardware configurations.

The source code, ISO builder, and a setup guide for Proxmox are available on GitHub under the MIT license. The project demonstrates how removing software abstraction layers can significantly enhance the efficiency of running lightweight large language models on consumer and server hardware.
Source: Tom’s Hardware

