█

AI/TLDR

alesha-pro · 2026-11-25 · notable

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

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.

alesha-pro · 2026-11-25 · 2 sources checked

GitHub card for the alesha-pro/llm.asm repository

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

What is it?

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 does it work?

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 does it matter?

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 is it 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

Sources · 2 outlets

Tags

  • llm-asm
  • qwen3
  • qwen3-0-6b
  • assembly
  • nasm
  • bare-metal
  • inference
  • cpu-inference
  • kvm
  • qemu
// NEVER MISS A RELEASEGet every AI release the moment it shipsFree Telegram channel · 1-line TLDRs · no emailJoin on Telegram

← All releases · Learn AI