54% faster LLM token generation by removing the Linux OS and llama.cpp twitter.c...

@best

54% faster LLM token generation by removing the Linux OS and llama.cpp twitter.com · 8 points · 1 comments · HN thread

TL;DR A developer built asm-llm-os, a 24,252-byte Multiboot x86-64 assembly OS with Qwen3-0.6B (Q8_0) baked in, which boots without Linux or libc and runs a multi-turn chat. The author reports CPU token generation 31% to 54% faster than llama.cpp on the same AMD EPYC 7642, with the same benchmark on a diskless Proxmox VM. The source is an X/Twitter thread, and the article text here is the thread's opening post.

  • The entire OS binary is 24,252 bytes, written in pure x86-64 assembly without Linux, Windows, C, Rust, or libc.
  • It boots in 74 to 94 ms into 64-bit Long Mode, wakes all CPU cores via APIC, and maps the 614 MiB Q8_0 weights directly from physical RAM.
  • On an AMD EPYC 7642, decode speed was 23.67 vs 16.63 tok/s at 1 thread (+42%) and 134.94 vs 103.03 tok/s at 16 threads (+31%), compared against llama.cpp with -ngl 0.
  • On a diskless 2 GiB Proxmox VM with a 2014 Xeon E5-2670 v3, it reaches the prompt in under 5 seconds and runs at 78 tok/s decode.
  • The author says output is bit-exact across thread counts and matches 64 greedy tokens against PyTorch FP32 (0.99965 cosine).
  • A 14.7 KB Linux ELF build beats llama.cpp by 18% to 36% and bare metal with 2 MiB huge pages adds about 10% more.

Discussion The thread has only one comment, a joke from ronsor saying it would be nice if NVIDIA drivers could be removed while still using a GPU. It is a light, tangential remark rather than a discussion of the benchmarks or the design.

  • Wants GPU support without NVIDIA driver stack (a few): Commenter ronsor jokes that the ideal would be dropping NVIDIA drivers while still using a GPU, pointing at the driver overhead that a bare-metal design sidesteps. No one else weighed in on the claims.

#llm #operatingSystems #x86Assembly #llamaCpp #benchmarks