Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseCode / SDK · ActionableHacker News AI→ original

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
Qwen3-0.6B Runs Without Linux: The Assembly Kernel Takes Up 24 KB
Source: Hacker News AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHacker News AI ↗
Editor-in-Chief
Key metric #1Requires a CPU with AVX2, FMA and F16C; tests ran on an EPYC 7642 and a Xeon E5-2670 v3
Key metric #2The model ISO runs from RAM, so the Proxmox VM needs no disk
Key metric #3449 MiB of the 2 GiB of RAM is allocated for the KV cache (dialogue memory) and buffers

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.

Story

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.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

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.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — Qwen3-0.6B Runs Without Linux: The Assembly Kernel Takes Up 24 KB https://news.hamidun.com/en/news/18274/qwen3-0-6b-runs-without-linux-the-assembly-kernel-takes-up-2

What do you think?
Loading comments…