Qwen3-0.6B Runs Without Linux: The Assembly Kernel Takes Up 24 KB
Normally, a neural network sits on top of Linux, drivers and libraries. One enthusiast stripped all of that away and wrote a 24 KB mini-OS in assembly. After power-on, it launches a chat with Qwen3-0.6B, a small model with 0.6 billion parameters. The 649 MiB of weights are read directly from memory without copying, and in QEMU with KVM the system boots in about 85 ms. The takeaway: inference needs less software than it seems.
AI-processed from Hacker News AI; edited by Hamidun News
To run a language model on a computer, you usually need a whole mountain of software: the Linux kernel, drivers, libraries, a Python or C++ runtime. The Bare Metal Qwen project tests what remains when you strip out everything unnecessary. The author wrote a bootable 24 KB operating system in assembly, a language where each line is a single processor instruction. That is roughly the size of a small icon. As soon as the computer powers on, it launches a chat with Qwen3-0.6B, a compact model with 0.6 billion parameters. This is not a production product, but it is a very clear way to see how much code inference actually needs.
What was built
This is an operating system for x86-64 processors that includes no Linux, no Windows, no C, no Rust and no libc (the standard C library). The linked static kernel in Multiboot 1 format weighs 24,252 bytes and has no dynamic dependencies. Right after boot, the system switches to 64-bit mode and starts a chat with the model quantized to Q8_0. This means each weight is stored in one byte instead of four, as in standard FP32.
The model takes up about 649 MiB. It does not need to be loaded into memory separately: the system takes the file as a bootloader module and reads the weights directly from their physical addresses in RAM, without copying. Memory is mapped with large 2 MiB pages. According to the author, this means the processor does not have to frequently walk 4 KiB page tables while reading weights, which is why the system runs faster than Linux-based variants. The available description contains no concrete comparison figures, so the claim should be verified independently.
Another roughly 449 MiB is set aside for the KV cache (where the model stores the already processed dialogue context) and working buffers. The project as a whole needs 2 GiB of RAM.
How it works in practice
The system brings up all processor cores: it parses ACPI tables, wakes the remaining cores through the Local APIC, and synchronizes them with a lightweight lock-free barrier. The calculations require the AVX2, FMA and F16C vector instructions. So in a VM, you have to expose the host's native CPU type, otherwise these extensions will not appear.
The chat is multi-turn. The cache persists between messages: for a new question, the model processes only the new tokens rather than recomputing the whole conversation. When the context is nearly full, the cache is reset and a message to that effect appears on screen. There are commands for clearing history, toggling Qwen3's reasoning mode, running a built-in benchmark, and performing a clean ACPI shutdown. Input is accepted from both a PS/2 keyboard and the COM1 serial port.
It can be launched in three ways. The fastest is directly in QEMU with KVM: boot takes about 85 ms. You can build a hybrid ISO for BIOS and UEFI that packs in both the kernel and the model. The third option is a Proxmox VE virtual machine with no disk at all: the image is attached as a CD-ROM and everything lives in RAM. The author demonstrates a run on a Xeon E5-2670 v3 with 12 cores and 2 GiB of memory.
Verification and limitations
The author claims a full match with the reference implementation: the same tokens and the same response bytes across five test prompts, including English, Russian in UTF-8, and an arithmetic task. Verification is run with the verify_os.py script. The project contains about 4,167 lines of OS code, and the compute kernel is built from the same code as the regular version. Tests ran on an AMD EPYC 7642 with 16 virtual cores and on a Xeon E5-2670 v3.
The limitations are obvious. The model is small, so in terms of answer quality it is a toy, not a replacement for a serious LLM. There is no networking and no filesystem, and drivers for real hardware are few: testing was done in virtual machines. Russian text on the VGA screen is rendered with Cyrillic replaced by Latin characters, while the serial port outputs proper UTF-8.
The practical takeaway for developers: if you need extremely compact and predictable inference, for example in embedded systems or isolated environments, a substantial part of the usual stack is not required. Ideas such as zero-copy weights, large memory pages and KV-cache persistence across turns also apply to ordinary runtimes. The project itself is a good teaching resource on how neural network startup actually works.
- Nov 26, 2026FS-XML: How a Browser AI Chat Edits Your Project Code in One Click, With No Token Bills
- Nov 26, 2026Magnitude Engine Pushes 180B-Parameter Qwen to 56 Tokens/s on a MacBook
- Nov 26, 2026Utility-Sector Support Bot on Qwen3-14B in a Closed Network Resolves 72% of Requests Without an Operator
- Nov 25, 2026Chip Blocks and Anti-Copying Measures Could Push DeepSeek 9 Months Behind the US
Key Questions Answered
What was built?
This is an operating system for x86-64 processors that includes no Linux, no Windows, no C, no Rust and no libc (the standard C library). The linked static kernel in Multiboot 1 format weighs 24,252 bytes and has no dynamic dependencies. Right after boot, the system switches to 64-bit mode and starts a chat with the model quantized to Q8_0. This means each weight is stored in one byte instead of four, as in standard FP32. The model takes up about 649 MiB.
How it works in practice?
The system brings up all processor cores: it parses ACPI tables, wakes the remaining cores through the Local APIC, and synchronizes them with a lightweight lock-free barrier. The calculations require the AVX2, FMA and F16C vector instructions. So in a VM, you have to expose the host's native CPU type, otherwise these extensions will not appear. The chat is multi-turn. The cache persists between messages: for a new question, the model processes only the new tokens rather than recomputing the whole conversation.
What are the key details on Verification and limitations?
The author claims a full match with the reference implementation: the same tokens and the same response bytes across five test prompts, including English, Russian in UTF-8, and an arithmetic task. Verification is run with the verify_os.py script. The project contains about 4,167 lines of OS code, and the compute kernel is built from the same code as the regular version. Tests ran on an AMD EPYC 7642 with 16 virtual cores and on a Xeon E5-2670 v3. The limitations are obvious.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
