Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseAPI / Product · ActionableX: @ai_researchad→ original

A Russian developer wrote a 24 KB OS where Qwen3 generates text 54% faster than llama.cpp

A Russian developer has written llm.asm, a 24 KB operating system in assembly that opens a chat with the Qwen3-0.6B model as soon as it boots. On 4 threads of an AMD EPYC 7642, it generates 78.89 tokens per second against 51.08 for llama.cpp, a popular tool for running models locally. That is 54% faster. The author ran the measurements himself, on a small model. The takeaway: the usual CPU software stack leaves room for more speed, and the code, released under MIT, can be checked by anyone.

AI-processed from X: @ai_researchad; edited by Hamidun News
A Russian developer wrote a 24 KB OS where Qwen3 generates text 54% faster than llama.cpp
Source: X: @ai_researchad. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceX: @ai_researchad ↗
Editor-in-Chief
Three partsa 14.7 KB inference engine, a 24.3 KB OS, and a 32.9 KB mini-GPT training engine
Key metric #2An old 2014 Xeon with 2 GiB of RAM delivers 78 tokens per second
Key metric #3Generation is bit-for-bit identical at any thread count

A Russian developer under the handle alesha-pro has written llm.asm, a 24 KB operating system whose only job is to run a chat with a neural network. For scale: an ordinary desktop icon weighs more.

A typical local model runs like a nesting doll of layers: Linux or Windows, drivers, Python or C++, libraries. This project strips all of that away. The team compared it with llama.

cpp, a popular program many people use to run language models on their own computers. Speed is measured in tokens per second (a token is roughly a syllable or a short word). On 4 threads of an AMD EPYC 7642 processor, llm.

asm produces 78.89 tokens per second, while llama.cpp on Linux produces 51.

08. That gap is the 54% figure. The system runs Qwen3-0.

6B, a small 0.6-billion-parameter model from Alibaba. All the code is written in x86-64 assembly, with no Linux, Windows, C, Rust, Python, or external libraries.

What's inside

The system has three components. The inference engine, the code that computes the model's answers, is 14.7 KB. The operating system itself is 24.3 KB. The engine for training a mini-GPT is 32.9 KB.

When the OS starts, it initializes the processor cores, loads the Qwen3-0.6B weights directly from physical memory, and opens an interactive chat. It supports a KV-cache (the model does not recompute the part of the dialogue it has already read) and multi-turn conversation. Booting the OS takes 74–94 milliseconds.

The numbers against llama.cpp

The author compared generation speed on an AMD EPYC 7642 processor:

  • 1 thread: 23.67 vs. 16.63 tokens per second (+42%);
  • 4 threads: 78.89 vs. 51.08 (+54%);
  • 8 threads: 118.08 vs. 80.79 (+46%);
  • 16 threads: 134.94 vs. 103.03 (+31%).

The advantage peaks at 4 threads and shrinks as the core count grows. Memory bandwidth may be the limit at that point, but the original post offers no explanation, so this remains a guess.

Separately, the author tested the system on a 2014 Intel Xeon E5-2670 v3 with 2 GiB of RAM. There, the model produces 78 tokens per second during generation and up to 111.5 tokens per second during prompt processing (prefill). Another notable point: generation results are bit-for-bit identical at any thread count. For floating-point computation this is not trivial, because the order of additions usually changes the last digits. Determinism is useful for testing and reproducibility.

How to read this

It is worth staying sober. These are the author's own benchmarks, and the post contains no independent verification. The model is small, and it is unknown how the approach would perform on models dozens of times larger. The post does not specify the weight storage format or how llama.cpp was configured, and both factors strongly affect the result. Also, llm.asm is not an operating system in the usual sense: according to the description, it has no networking, no broad driver support, and no way to run third-party programs. But it also has no overhead.

Still, the project is useful as a clear experiment. It shows how much CPU performance general-purpose abstraction layers can consume, and that a narrow task, such as a local assistant on an old server or an embedded device, can get by with a minimum of software. For practitioners, there are two takeaways. First, if you deploy small models on inexpensive hardware, profiling and hand-optimizing hot loops can still yield tens of percent in gains. Second, old servers with 2 GiB of RAM can run useful models if you strip away unnecessary software.

The source code is released under the MIT license, so the figures can be reproduced on your own hardware. That is exactly what to do before claiming superiority over llama.cpp: for now, this is a strong claim from a solo enthusiast, not a production-ready standard.

Story

Key Questions Answered

What's inside?

The system has three components. The inference engine, the code that computes the model's answers, is 14.7 KB. The operating system itself is 24.3 KB. The engine for training a mini-GPT is 32.9 KB. When the OS starts, it initializes the processor cores, loads the Qwen3-0.6B weights directly from physical memory, and opens an interactive chat. It supports a KV-cache (the model does not recompute the part of the dialogue it has already read) and multi-turn conversation. Booting the OS takes 74–94 milliseconds.

What are the key details on The numbers against llama.cpp?

The author compared generation speed on an AMD EPYC 7642 processor: 1 thread: 23.67 vs. 16.63 tokens per second (+42%); 4 threads: 78.89 vs. 51.08 (+54%); 8 threads: 118.08 vs. 80.79 (+46%); 16 threads: 134.94 vs. 103.03 (+31%). The advantage peaks at 4 threads and shrinks as the core count grows. Memory bandwidth may be the limit at that point, but the original post offers no explanation, so this remains a guess. Separately, the author tested the system on a 2014 Intel Xeon E5-2670 v3 with 2 GiB of RAM.

How to read this?

It is worth staying sober. These are the author's own benchmarks, and the post contains no independent verification. The model is small, and it is unknown how the approach would perform on models dozens of times larger. The post does not specify the weight storage format or how llama.cpp was configured, and both factors strongly affect the result.

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 — A Russian developer wrote a 24 KB OS where Qwen3 generates text 54% faster than llama.cpp https://news.hamidun.com/en/news/18596/a-russian-developer-wrote-a-24-kb-os-where-qwen3-generates-t

What do you think?
Loading comments…