Skip to content
Robotlar
Announcement

llm.asm: the open-source project that runs a language model in pure assembly, with no libraries

llm.asm is a project opened on GitHub on 25 November 2026 by Alexey Fateev (alesha-pro) and released under the MIT License. The repository builds a program that runs Alibaba Qwen team's Qwen3-0.6B language model without C, C++ or any ready-made library, entirely in hand-written x86-64 NASM assembly. According to the README the compiled program is 14,712 bytes. As of 28 November the repository had 2,085 stars and 320 forks; a Hacker News post titled "Bare Metal Qwen" received 233 points and 60 comments.

What is in the repository?

The repository has four subprojects. All numbers below are values the author reports in the README files:

  • 01, Qwen3-0.6B inference: a single 14,712-byte program for Linux. Its own BPE tokenizer, matrix multiply kernels and thread pool are written in assembly. It has a multi-turn chat mode.
  • 02, bootable AI operating system: a 24,252-byte kernel that boots a computer straight into Qwen3 chat with no Linux or Windows. According to the README it reaches the chat prompt in 74 to 94 milliseconds under KVM, and produces 55.4 tokens per second on a diskless Proxmox virtual machine (Xeon E5-2670 v3).
  • 03, Mini-GPT trainer: an assembly program that trains a small 2.68 million parameter GPT model from scratch on TinyShakespeare. Backpropagation and the AdamW optimizer are hand-written too; according to the README validation loss falls from 4.19 to 1.51 in about 4 minutes and all 21 gradient tensors match PyTorch.
  • 04, experimental hypervisor: an AMD SVM hypervisor running beneath Linux with an embedded 2 billion parameter MiniCPM model. On certain kernel faults the model decides whether to patch the faulting instruction, pass the fault to Linux or halt the system. This part contains C code alongside assembly.

The llama.cpp comparison: what the numbers say

The project's most discussed claim is speed. The author compared it with llama.cpp on the same AMD EPYC 7642 server, with the same Qwen3-0.6B Q8_0 model, CPU only. The table shows tokens per second when generating 64 tokens (decode); 3-run average, source README.

Threadsllm.asmllama.cppDifference
120.7016.6324.5%
469.2451.0835.6%
8103.6480.7928.3%
16121.86103.0318.3%
40125.86105.0819.8%

When reading the table, keep these points in mind:

  • The comparison covers only generation (decode) speed. For prompt processing (prefill) llama.cpp is clearly faster because it uses batched matrix multiplication.
  • The advantage is in the default FAST_Q8=1 mode; the project's other mode is slower than llama.cpp at every thread count.
  • Measurements were made on a single machine with a single small model.
  • According to the README the output reaches 0.99965 cosine similarity with a PyTorch FP32 reference, and 64 of 64 tokens match.

What did the community find? In the repository's GitHub issues, independent users tried some claims on their own machines. One user confirmed the 64/64 token match against the project's reference output on a Ryzen 7 7800X3D and measured about 95 tokens per second with 4 threads; the same report said the default setting of 32 threads dropped speed to 2.3 tokens per second on a 16-thread CPU. The trainer's loss table was reproduced to four decimals in other issues. An issue asked the author for the exact llama.cpp command and version; an independent reproduction of the speed advantage has yet to be published. A review by SnackOnAI calculated that the picture can flip for long prompts: about 14.0 seconds versus 3.7 seconds for a 2,000-token prompt and a 200-token answer (in favor of llama.cpp).

What does "zero dependencies" mean?

The phrase means the resulting program needs no external library at run time. Setup still needs some tools:

  • nasm and ld to build; gcc as well for subproject 04.
  • Model weights are downloaded separately: Qwen3-0.6B is downloaded from Hugging Face and converted to the project's own format with a Python script (about 614 MiB).
  • The accuracy tests use PyTorch and transformers.
  • The CPU must support AVX2, FMA and F16C (Haswell or newer x86-64). Subprojects 01 and 03 run on Linux.

A cautious look at the experimental hypervisor

According to the README, subproject 04 reports 97.54% success on 122 test scenarios (16.39% for the base model). The figure comes from a 600-scenario synthetic corpus the author generated with DeepSeek and a single-level QEMU/KVM verifier; the end-to-end nested-virtualization demo covers five faults deliberately triggered by the author's test module. The applied "patches" mostly neutralize the faulting instruction; that keeps the system running but does not fix the root cause. So it is more accurate to read this part as a research experiment, not a "self-healing kernel".

For robotics and on-device AI

llm.asm is not a robotics project, but what it shows matters to people who build robot software. Small language models like Qwen3-0.6B are among the models designed to run on devices; vendors such as Qualcomm and M5Stack offer edge builds of this model. A language model running with only a few tens of kilobytes of code, on the CPU alone and even without an operating system, shows how lightweight a local model can become for voice commands or simple task planning at sites without internet access.

A practical note: llm.asm runs only on x86-64 CPUs with AVX2. The NVIDIA Jetson modules common in robots are Arm based; for example Unitree G1 EDU can carry an optional Jetson Orin module. So in its current form the project can be tried on an x86 ground station or industrial PC rather than on the robot's onboard computer. A proposal for an ARM64 version has also been opened in the repository. For combining language models with robots, see our Unitree G1 AI development guide.

Sources and attribution

llm.asm is an independent open-source project by Alexey Fateev (alesha-pro); Robotlar.org has no tie to the project or its author. Unless stated otherwise, speed, size and accuracy figures in this article are values the author reports in the README files. Qwen3-0.6B is an open model from Alibaba's Qwen team under Apache-2.0. Robotlar.org is the official distributor of Unitree Robotics in Turkey; for local AI integration in your robot projects, contact us.

Sources: llm.asm GitHub repository, Hacker News discussion, benchmark method request (#8), Ryzen 7800X3D re-run (#9), SnackOnAI review, Qwen3-0.6B model card, llama.cpp.

Let's Find Your Solution

The investment depends on the selected robot platform, additional sensor and payload equipment, and the integration scope of your site. Share your requirements and our engineering team will prepare a feasibility report and a pro forma quotation for your organisation.