All News
llm-inferenceassemblyqwenbenchmarksbare-metal

A 24 KB assembly OS boots Qwen3-0.6B in 74 ms and claims 54% over llama.cpp

A 24 KB hand-written x86-64 assembly OS runs Qwen3-0.6B and reports up to 54% faster CPU decoding than llama.cpp. Most of the gain looks like kernel work.

Vlad MakarovVlad Makarovreviewed and published
2 min read

Alexey Fateev, who posts as @superalesha, says he deleted Linux and rebuilt everything under Qwen3-0.6B himself: a 24,252-byte Multiboot binary in pure x86-64 assembly, no C, no Rust, no libc. It reaches 64-bit long mode in 74 to 94 milliseconds, maps 614 MiB of Q8_0 weights from physical RAM, and serves a multi-turn chat over VGA, PS/2 and serial. The post drew 14,768 likes. The 54% in the headline is real, but it is one rung of a ladder.

What the 24 KB actually contains

The repository, llm.asm on GitHub, holds three projects: the bare-metal OS, a Linux ELF inference binary at 14,712 bytes, and a small GPT trainer. Only the OS image is 24 KB, and the weights live outside it, so the size line is about code, not capability. Inside there is no runtime to lean on. The expf, sincosf, RMSNorm, RoPE and softmax routines are hand-written AVX2+FMA+F16C code, quantized matrix math runs through int8 vpmaddubsw and vpmaddwd, and threading uses clone() and futex(). On bare metal the SMP path wakes every core over APIC, and 2 MiB huge pages buy roughly another 10%.

Where the 54% comes from

Every figure comes from one AMD EPYC 7642 with Q8_0 weights, -ngl 0, a 34-token prompt, 64 generated tokens and a three-run average.

ThreadsAssembly OSllama.cppGain
123.67 tok/s16.63 tok/s+42%
478.89 tok/s51.08 tok/s+54%
8118.08 tok/s80.79 tok/s+46%
16134.94 tok/s103.03 tok/s+31%

The shape matters more than the peak. The lead opens at four threads and narrows as llama.cpp finds its footing, which is what a kernel tuned for one machine should look like. Then there is the number coverage tends to bury: Fateev's own non-OS Linux build, 14.7 KB and still assembly, beats llama.cpp by 18% to 36% from 1 to 40 threads. Superpower Daily led with 35.6%, the four-thread result for that Linux binary. If a build that still runs on Linux already wins by a third, the missing OS is not doing most of the work. The int8 kernel and the model format are.

What would settle it

None of this is replication. It is one author, one EPYC machine, his own harness. The correctness evidence is better than most: bit-exact output across thread counts, a 0.99965 cosine match against PyTorch FP32 over 64 greedy tokens. Decent hygiene, still self-reported. A third party rerunning the same quantization on the same CPU, with llama.cpp compiled the same way and the repository's harness, could settle it in an afternoon. Until then, 54% is a documented claim, not a property of assembly kernels in general.

Related Articles

Scroll down

to load the next article