TL;DR: This repository implements complete machine learning workflows directly in x86-64 assembly language using NASM. It bypasses conventional runtimes, C libraries, and interpreters by implementing custom AVX2 kernels, tokenizers, thread pools, and training logic from scratch.
Best for: Systems programmers and low-level engineers interested in bare-metal architecture and custom assembly optimization.
Repository snapshot: ⭐ 2 225 stars · 🍴 338 forks · Assembly · MIT
Daily picks: Follow GitHub Open Source on Telegram
llm.asm is an open-source repository written entirely in 100% pure x86-64 NASM assembly. It implements complete machine learning workflows—including Qwen3-0.6B inference, a bare-metal bootable OS, and a Mini-GPT training loop—without relying on C, libc, or any external dependencies.
Traditional machine learning stacks rely on heavy runtimes, Python, and C/C++ libraries. This project bypasses all conventional layers by implementing custom AVX2, FMA, and F16C accelerated GEMM/GEMV math kernels, tokenizers, thread pools, and training logic directly from scratch. The code compiles down to tiny static binaries that run on Linux or boot straight onto bare metal.
Clone the repository and use NASM to assemble the binaries:
git clone https://github.com/alesha-pro/llm.asm.git
cd llm.asm
This project is an extraordinary tour de force for systems hackers and assembly enthusiasts, but it is obviously impractical for standard production application development.
Would you ever drop down to assembly to optimize model inference speed?
Curated from the repository README and metadata. No hands-on test is claimed; evaluate it in a sandbox before production use.