# llm.asm — Qwen3-0.6B runs on a 24 KB bare-metal OS in pure assembly

> A Qwen model that boots like an operating system, written entirely in assembly.

- Org: alesha-pro
- Date: 2026-11-25
- Category: showcase, repo
- Source: https://github.com/alesha-pro/llm.asm
- Canonical page: https://ai-tldr.dev/releases/alesha-pro-llm-asm-bare-metal-qwen/

## In short

llm.asm runs Qwen3-0.6B in 100% x86-64 NASM assembly, with no C or libc. It ships a 14.7 KB Linux inference binary, a 24 KB bootable OS that boots to a prompt in under 100 ms, and a small GPT trainer.

## What it is

llm.asm is a set of three LLM projects written in pure x86-64 NASM assembly. The one on the Hacker News front page is a bootable bare-metal OS that runs Qwen3-0.6B (Q8_0) with no Linux or Windows underneath; the repo also has a static Linux inference binary and a from-scratch Mini-GPT trainer with a Braille terminal UI.

## How it works

The 24,252-byte kernel brings its own boot code, memory management, multi-core support and serial, VGA and keyboard drivers, and loads the ~614 MiB model file as an initrd. Decoding uses AVX2/FMA matrix-vector kernels token by token. The README reports 134.9 tok/s on KVM with 16 vCPUs of an AMD EPYC 7642 and output that matches the Linux build byte for byte.

## Why it matters

The project shows how little software an LLM actually needs to run. Its author reports the Linux binary decodes 18% to 36% faster than llama.cpp on CPU for this model, though llama.cpp still wins on batched prompt prefill. HN commenters debated its practical use, from a smaller attack surface to a 'brain in a jar'.

## Who it's for

systems programmers, inference engineers, hobbyists

## Try it

make os FAST_Q8=1 && make os-run MODEL=models/qwen3-0.6b-q8_0.asmbin SMP=16

## Links

- [GitHub Repo](https://github.com/alesha-pro/llm.asm)
- [Bare-Metal OS README](https://github.com/alesha-pro/llm.asm/tree/main/02-baremetal-os)
- [HN Discussion](https://news.ycombinator.com/item?id=50648365)
