How much operating system do you actually need to run a large language model? One developer decided to eliminate Linux entirely and run Qwen3-0.6B directly on a custom operating system written from scratch in pure x86-64 assembly. The result is a bootable operating system weighing just 24,252 bytes, delivering up to 54% higher token generation throughput than llama.cpp running under Linux in the developer's published benchmarks. No Linux. No Windows. No C. No Rust. No libc. Just assembly and the hardware. A 24KB Operating System for AI The project, called llm.asm, implements a bare-metal inference environment specifically designed to run a language model directly on x86-64 processors. Its capabilities include: - Multiboot-compatible ELF binary - Kernel initialization in approximately 74–94 milliseconds - 64-bit Long Mode operation - Multicore CPU initialization through APIC - Direct memory mapping of 614 MiB of Q8_0 model weights - KV cache support - Interactive multi-turn AI conversations - VGA output - PS/2 keyboard support - Serial port communication The 24 KB figure refers to the operating system binary itself, not the language model weights. Bare-Metal AI vs llama.cpp The developer compared Qwen3-0.6B inference performance against llama.cpp using Q8_0 quantization and CPU-only inference on an AMD EPYC 7642. Published results: 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 generation throughput reached approximately 136.6 tokens per second. Running AI on Hardware From 2014 The project was also tested inside a diskless Proxmox virtual machine running on a 12-core Intel Xeon E5-2670 v3 processor with just 2 GiB of RAM. Reported results: - Less than 5 seconds to reach the interactive prompt - Approximately 95 milliseconds for kernel initialization - 78 tokens per second during generation - Up to 111.5 tokens per second during prompt processing - Model inference directly from RAM Not bad for a processor released in 2014. Accuracy and Deterministic Inference According to the developer, inference results are bitwise identical across different thread counts. All 64 tokens generated during a greedy decoding test matched the PyTorch FP32 reference output, with a reported cosine similarity of 0.99965. Linux Assembly Version The project also includes a 14.7 KB Linux ELF implementation using optimized INT8 operations, AVX2, and F16C instructions. This version reportedly outperforms llama.cpp by 18–36% across configurations ranging from 1 to 40 threads. The fact that the optimized assembly implementation also performs well under Linux suggests that the speed improvements are not simply the result of removing the operating system. Why Does This Project Matter? While the AI industry continues to pursue increasingly large models and expensive computing infrastructure, projects like llm.asm explore the opposite direction: minimalism, hardware efficiency, and highly specialized inference environments. Potential applications include: - Bare-metal LLM inference - Embedded artificial intelligence - Lightweight AI appliances - CPU-based language model inference - Edge AI systems - Repurposing older server hardware - Low-level performance optimization - Specialized AI operating systems - Offline AI assistants The reported performance improvements apply to specific hardware, model configurations, quantization settings, and benchmark conditions. They should not be interpreted as a universal performance advantage over Linux or llama.cpp. Open-Source and MIT Licensed The source code, hybrid BIOS/UEFI ISO build tools, and diskless Proxmox deployment instructions are available under the MIT license. GitHub repository: https://github.com/alesha-pro/llm.asm/tree/main/02-baremetal-os Perhaps the most interesting question is not how much computing power artificial intelligence requires, but how much unnecessary software surrounds it. Would you run a dedicated AI operating system directly on your hardware? Share your thoughts in the comments. Subscribe for more local AI experiments, open-source language models, bare-metal programming, assembly optimization, AI inference, and unconventional software engineering projects. #Qwen3 #LocalAI #BareMetal #Assembly #LlamaCpp #OpenSource #LLM #AIInference #OperatingSystem