Field noteNov 26, 20263 min read1 source

A 14 KB Linux ELF runs Qwen3-0.6B 18 to 36 percent faster than llama.cpp CPU inference.

In one minute

llm.asm is a Qwen3-0.6B inference engine written in x86-64 NASM assembly for Linux (github.com). Its authors report decoding 18–36% faster than llama.cpp across tested thread counts on an AMD EPYC 7642, using CPU-only inference, greedy decoding and a three-run mean.

What changed: A separate x86-64 assembly inference engine for Qwen3-0.6B is reported to run 18–36% faster than llama.cpp in CPU tests.

What happened

The default FAST_Q8=1 build is a stripped, statically linked ELF executable of 14,712 bytes, with no runtime dependency on gcc, libc, libm, a dynamic linker or shared objects. It needs Linux on x86-64 with AVX2, FMA and F16C; AVX-512 and VNNI are not required. Building requires NASM and binutils.

Before inference, download Qwen3-0.6B weights and tokenizer files, then use Python to export an .asmbin file. The default Q8_0 export with FP16 scales occupies 613.66 MiB. The fast path quantizes activations to Q8_0 once per matrix multiplication and uses an INT8-by-INT8 AVX2 kernel. The tokenizer accepts UTF-8, including Cyrillic; --chat starts multi-turn chat with KV-cache retention, and --think enables Qwen3 reasoning mode. The legacy FAST_Q8=0 build uses Q8_0 weights with FP32 activations and produces a slightly smaller 14,008-byte executable.

The decode test used a single 34-token prompt and fixed generation of 64 tokens. At 16 threads, the project reports 121.86 tok/s for FAST_Q8=1 versus 103.03 ± 0.09 tok/s for llama.cpp; its peak on the tested EPYC was 126.8 tok/s. In a single-prompt verification against PyTorch FP32, both generated the same 64 greedy tokens despite differing logits.

What the archive adds

This follows earlier coverage of Qwen3.5-0.8B CPU inference implemented entirely in x86-64 assembly, which reported 6.51 tok/s on one EPYC thread (earlier New Runtime note). The models and tests differ, so the figures are not a direct performance comparison.

Why it matters

Treat the tiny executable as a compact runtime, not a tiny deployment: you still need supported x86-64 CPU features and a separately prepared weight file hundreds of MiB in size.

Limits and uncertainty

The speed figures are the project’s own results for a three-run, CPU-only greedy decode test on one EPYC model, with one prompt and fixed output length. The project notes that llama.cpp uses batched GEMM for prefill while asm-llm processes prefill token by token with GEMV, so the decode comparison does not establish prefill performance. The matching-token check covers one prompt and does not establish general numerical parity or model quality.

Skill to build now

From the repository root, the documented fast-path build and test sequence is make inference test-math FAST_Q8=1, then make check. First install NASM and binutils, and prepare the .asmbin weights as described in the guide.

Reader takeaway

llm.asm is worth trying if you want a small, statically linked Linux runtime for Qwen3-0.6B on AVX2-class x86-64 hardware. The headline speedup is the project’s result for a specific decode workload, not evidence of a general win across prompts, prefill, models or hardware; model weights remain a separate 613.66 MiB artifact.

How this was made

Written by
New Runtime's AI newsroom, from the sources cited below.
Production record
Per-item production details (models, critic verdict, source counts) are recorded from Nov 27, 2026; this record is older.
Human review
Published without a per-item human sign-off. The editor reviews published items selectively and after the fact; errors we find are listed on the corrections page.

Corrections and error statistics

Evidence / sources

  1. 1github.com/alesha-pro/llm.asm/blob/main/01-qwen3-inference
All Field Notes

Next reads

Read next

Open the graph
  1. 01topicInferenceExplore the inference topic hub.
  2. 02archiveField NotesOpen the latest editorial analysis.
  3. 03sourcesSourcesSee the original sources this archive cites.
Who read this page?Machine requests, hidden until opened

Loading the privacy-safe route aggregate...

Open the JSON contract