A futuristic diagram shows an x86-64 processor running a compact Qwen3 model with AVX2, alongside boot code and a terminal.
Modern computing has a funny relationship with overhead. To get a modern desktop PC to print a single sentence from a local large language model (LLM), your prompt typically navigates an operating system kernel measured in tens of millions of lines, a C or C++ runtime, dynamic linkers, a Python interpreter, memory allocators, and gigabytes of frameworks before a single matrix multiplication ever touches your silicon. Now, an intrepid systems programmer named Alexey Fateev—known as alesha-pro on GitHub—has asked what happens when you take a digital blowtorch to the entire software stack.

On November 25, 2026, Fateev released llm.asm, an MIT-licensed collection of pure x86-64 NASM assembly projects. The headline act, asm-llm-os.elf, is a standalone, bootable bare-metal operating system built exclusively to run Alibaba’s Qwen3-0.6B language model without Linux, Windows, C, C++, Rust, libc, or a single runtime dependency. Weighing just 24,252 bytes—roughly 24 KB—the kernel boots from start to an interactive chat prompt in 74 to 94 milliseconds and generates text up to 54% faster than llama.cpp running on Linux in CPU-only benchmarks.

Before anyone formats their Windows 11 NVMe drive in a fit of minimalist nostalgia, let’s unpack what this 24 KB marvel actually accomplishes, where the numbers come from, and what every PC builder and systems tinkerer can learn from it.

A futuristic diagram shows an x86-64 processor running a compact Qwen3 model with AVX2, alongside boot code and a terminal. Inside the 24 KB Bare-Metal LLM Operating System​

First, let’s clear up the biggest misconception floating around social feeds: the entire AI is not compressed into 24 kilobytes.

That 24,252-byte binary (asm-llm-os.elf, containing 17,143 bytes of executable code in its default FAST_Q8=1 build, or 23,612 bytes in its legacy FP32-activation FAST_Q8=0 mode) is strictly the operating system kernel, hardware drivers, thread scheduler, tokenizer, and inference engine. The actual intelligence—the Qwen3-0.6B model weights quantized to 8-bit (Q8_0)—is loaded separately into physical RAM. Depending on the scale format, that payload measures 613.66 MiB (roughly 614 MiB) in the project’s .asmbin v2 format using FP16 block scales, or around 649 MiB in its legacy FP32-scale format, alongside roughly 449 MiB of working memory for the KV cache and runtime buffers.

As Tom's Hardware noted, that makes the model weights roughly 28,000 times larger than the operating system running them. For historical perspective, the iconic 1982 Commodore 64 packed its KERNAL operating routines, BASIC 2.0 interpreter, and character generator into 20 KB of ROM. Fateev’s kernel sits in that same retro weight class, yet it orchestrates 64-bit symmetric multiprocessing and modern SIMD vector math instead of an 8-bit 1 MHz processor.

What makes llm.asm especially compelling is that the bare-metal OS isn’t a one-off party trick; it shares a unified 3,857-line assembly core with a broader suite of low-level experiments totaling 17,252 lines of pure x86-64 NASM assembly:

  • Phase 1 (01-qwen3-inference): A 14,712-byte static Linux ELF executable (asm-llm) that runs Qwen3-0.6B with a built-in byte-pair encoding (BPE) tokenizer, Grouped-Query Attention (GQA), QK-Norm, RoPE, SwiGLU, and a multi-turn REPL. Removing bare-metal boot code and hardware drivers shaves about 10 KB off the OS binary size.
  • Phase 2 (02-baremetal-os): The 24,252-byte asm-llm-os.elf bare-metal kernel that recompiles the exact same math, matrix multiplication, tokenizer, and transformer files with a -DBARE_METAL flag, swapping Linux system calls for direct hardware control.
  • Phase 3 (03-minigpt-train): A 32,944-byte FP32 Mini-GPT trainer and sampler featuring analytical backpropagation, an AdamW optimizer, and a live 80×24 Unicode Braille terminal UI that trained on TinyShakespeare in four minutes at 27,662 tokens per second.
  • Bonus Phase 4 (04-ring1-kernel-surgeon): A separate 75,424-byte Ring -1 AMD SVM hypervisor experiment pairing NASM with freestanding zero-libc C to live-patch Linux kernel crashes.

Section Summary: asm-llm-os.elf does not shrink an LLM to 24 KB; rather, it shrinks the entire operating system, driver layer, and inference runtime to 24 KB while mapping the 614 MiB quantized model directly in RAM.

How It Boots in 74 Milliseconds—And What That Clock Actually Measures​

In a standard Windows or Linux workstation, booting involves firmware initialization, storage drivers, filesystem mounts, user-space daemons, network stacks, and desktop compositors. Fateev threw virtually all of that overboard.

When asm-llm-os.elf starts, it relies on the Multiboot 1 specification—cleverly linking the kernel as a 64-bit ELF and wrapping it as an ELF32 binary via objcopy so standard Multiboot 1 bootloaders like GRUB or QEMU can load it cleanly. From there, boot.asm immediately configures four-level paging, drops the processor into 64-bit Long Mode, sets up an Interrupt Descriptor Table (IDT), and unlocks AVX2, FMA, and F16C vector extensions.

Because the bootloader places the .asmbin model payload directly in physical memory, the kernel performs zero-copy model loading—no disk driver, no filesystem parsing, and no memcpy shuffling hundreds of megabytes around. It parses ACPI MADT tables to wake every available CPU core over Local APIC (INIT-SIPI-SIPI), synchronizes threads with custom spin-barriers, and maps up to 4 GiB of memory using 2 MiB huge pages.

Its hardware support is deliberately Spartan:

  • Display: 80×25 color VGA text console
  • Input: PS/2 keyboard
  • Telemetry & Serial: COM1 serial port at 115200 baud
  • Timing & Power: PIT/RDTSC timers and ACPI power-off

No NVMe driver. No Wi-Fi. No USB stack. No GPU driver. Once initialized, it drops straight into a multi-turn KV-cache chat prompt supporting /clear, /think (toggling Qwen3’s reasoning mode), and /bench commands, with a default context window of 2,048 tokens that resets when filled.

Here is the crucial measurement boundary to keep in mind: the headline 74 to 94 milliseconds measures kernel entry to interactive prompt. It does not include physical motherboard POST, UEFI/BIOS initialization, or the time spent reading a 614 MiB model image off storage into RAM. On a diskless 0 GB Proxmox VE virtual machine powered by a 2014 12-core Intel Xeon E5-2670 v3 with 2 GiB of RAM booting from a hybrid BIOS+UEFI ISO, Fateev reported total boot-to-prompt time at under five seconds, with the kernel itself taking 95 ms.

Section Summary: By leveraging Multiboot 1, zero-copy RAM mapping, 2 MiB huge pages, and a handful of legacy hardware drivers, the kernel transitions from boot handoff to an active chat prompt in under a tenth of a second.

Benchmark Breakdown: Where Pure Assembly Beats llama.cpp (and Where It Doesn't)​

So why does stripping out Linux and writing every math kernel by hand actually make an LLM run faster? Fateev’s head-to-head benchmarks on an AMD EPYC 7642 (47 cores online, 256 MiB L3 cache, DDR4) tested CPU-only inference (llama.cpp with -ngl 0) on Qwen3-0.6B Q8_0 across a 34-token prompt and 64 generated tokens, averaged over three runs.

Thread / vCPU Countllama.cpp (Linux, CPU Q8_0)Linux asm-llm (FAST_Q8=1, 14.7 KB)Bare-Metal asm-llm-os.elf (KVM)Bare-Metal Gain vs llama.cpp
1 Thread16.63 tok/s20.70 tok/s (+24.5%)23.67 tok/s+42%
4 Threads51.08 tok/s69.24 tok/s (+35.6%)78.89 tok/s+54%
8 Threads80.79 tok/s103.64 tok/s (+28.3%)118.08 tok/s+46%
16 Threads103.03 tok/s121.86 tok/s (+18.3%)134.94 tok/s (136.6 peak)+31%
24 Threads104.11 tok/s123.72 tok/s (+18.8%)132.90 tok/s+28%
32 Threads103.82 tok/s122.51 tok/s (+18.0%)133.75 tok/s+29%
40 Threads105.08 tok/s125.86 tok/s (126.81 peak, +19.8%)——

Looking closely at that middle column reveals a fascinating technical nuance that headlines easily gloss over. Simply deleting Linux did not magically create a 54% speedup. The Phase 1 Linux executable (asm-llm) was already 18% to 36% faster than llama.cpp across 1 to 40 threads while still running on top of Linux. Booting into the bare-metal OS added roughly another 10% on top, largely thanks to 2 MiB huge-page identity mapping that slashes TLB (Translation Lookaside Buffer) misses and page-table walks when streaming 614 MiB of weights from RAM.

The bulk of the speedup comes from relentless, model-specific optimization in FAST_Q8=1:

  • Hand-written INT8×INT8 AVX2 instructions (vpmaddubsw and vpmaddwd) paired with FP16 block scales converted on the fly via F16C (vcvtph2ps).
  • Monotonic next-row prefetching, a contiguous head-major KV-cache layout, and parallel Grouped-Query Attention across cores.
  • Bit-exact determinism across thread counts—matching 64 out of 64 greedy tokens against a PyTorch FP32 reference with a 0.99965 cosine similarity, and maintaining byte-for-byte parity between the Linux and bare-metal builds across 1 to 32 KVM vCPUs.

Now for the essential caveats—because objective journalism requires reading the fine print:

  1. Decode vs. Prompt Prefill: The 54% headline applies strictly to autoregressive token decode (tg64)—generating new tokens one by one. For prompt ingestion (pp34), llama.cpp uses batched GEMM matrix-matrix multiplication, whereas llm.asm processes prompt tokens sequentially using GEMV. In other words, llm.asm actually ingests prompts more slowly than llama.cpp.
  2. Test Environment & Verification: All numbers are self-reported by Fateev, and as of November 27, 2026, no independent third-party benchmark replication had been published. Moreover, the main AMD EPYC comparisons ran inside a QEMU/KVM virtual machine rather than on unvirtualized bare metal, while the separate Proxmox VE VM test on an older Xeon E5-2670 v3 hit 55.4 tok/s in the repository’s main summary table (with Fateev also citing 78 tok/s decode and 111.5 tok/s prefill in his announcement).
  3. Hyper-Specialization: llm.asm is hard-wired around Qwen3-0.6B’s exact 28-layer, 16-query-head / 8-KV-head architecture. Meanwhile, llama.cpp is a portable, general-purpose C/C++ engine supporting dozens of model architectures, GPUs, NPUs, and operating systems.

Section Summary: Most of the performance uplift stems from hand-coded AVX2/F16C kernels tailored solely to Qwen3-0.6B, while bare-metal 2 MiB huge pages contribute an extra ~10% boost on token generation—though prompt prefill remains slower than llama.cpp.

What This Means for Windows PC Builders, Homelabbers, and AI Tinkers​

If you run local models on a Windows 11 desktop with an NVIDIA RTX or AMD Radeon GPU, asm-llm-os.elf isn't replacing your daily driver. Even a modest discrete GPU effortlessly eclipses CPU-only token throughput, and Qwen3-0.6B—while surprisingly nimble for basic reasoning and lightweight text tasks—is a tiny edge model compared with 7B, 14B, or 70B parameters. Nor does this run on ARM-based Copilot+ PCs or Apple Silicon; it strictly requires an x86-64 processor with AVX2, FMA, and F16C support (Intel Haswell / 4th-gen Core or AMD Excavator and newer).

Yet for Windows power users, homelab administrators, and low-level developers, Fateev’s project shines a bright spotlight on two practical realities:

  • Memory Layout Matters More Than You Think: On CPU inference, token generation is overwhelmingly memory-bandwidth and latency bound. Using 2 MiB huge pages instead of standard 4 KB pages reduces TLB pressure dramatically—a reminder of why enabling Large Pages in Windows enterprise workloads (like SQL Server or Hyper-V) or hugepages in Linux/WSL2 yields measurable real-world gains.
  • A Safe Sandbox for Homelabbers: Because the repository includes a hybrid BIOS+UEFI ISO builder (mkiso.sh), you don't need to wipe a PC to see it work. Windows enthusiasts can build the project inside WSL2 (using nasm, GNU binutils, grub-mkrescue, xorriso, and mtools, plus python3 and numpy once to convert Hugging Face Qwen3-0.6B weights into .asmbin) and boot the resulting diskless ISO inside VirtualBox, QEMU, or a Proxmox VE homelab VM with 2 GiB of RAM and 0 GB of virtual disk. Just remember to pass host CPU flags (like -cpu host in QEMU) so AVX2, FMA, and F16C are exposed to the guest.

Final Verdict​

Alexey Fateev’s 24 KB assembly OS isn’t a practical desktop operating system, and it isn't dethroning GPU inference anytime soon. What it is, however, is a tour de force of mechanical sympathy: a crystal-clear demonstration of how fast modern x86-64 silicon can move when you strip away decades of software abstractions and talk directly to the hardware. For any PC enthusiast who has ever wondered how much performance gets lost between your keyboard and your CPU cores, llm.asm is a 24-kilobyte answer worth studying.

 

References

  1. AI enthusiast deletes Linux for a 24KB pure assembly OS that boots in 74 milliseconds Tom's Hardware 2026-11-28T12:00:00+00:00
  2. llm.asm github.com
  3. github.com github.com