๐ค llm.asm ยท ๐ฆ
Run Qwen3-0.6B inference, boot a bare-metal OS, and train Mini-GPT in pure x86-64 NASM assembly.
โโโโโโโโโโโโโโ
โญ 2 225 stars ยท ๐ด 338 forks
๐ป Assembly ยท ๐ MIT ยท ๐ข commit today
You are staring at a bloated software dependency tree just to run a small inference model, wondering why a simple task requires megabytes of runtime overhead.
Standard inference stacks drag in gigabytes of libraries, complex toolchains, and abstraction layers that obscure hardware execution details and bloat binary sizes.
This project strips away every abstraction layer, implementing the entire model lifecycle in pure assembly while matching or exceeding conventional CPU decode speeds.
๐งญ How it works
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.
The code compiles down to tiny static binaries that execute directly on Linux or boot straight onto bare metal.
โจ Key features
โธ Assemble a Qwen3-0.6B inference engine in a 14 KB static Linux ELF binary
โธ Boot a 24 KB bare-metal OS running Qwen3-0.6B with zero disk requirements
โธ Train a Mini-GPT model from scratch with a live 80x24 Braille TUI in a 32 KB binary
โธ Execute AVX2, FMA, and F16C accelerated GEMM/GEMV math kernels without external libraries
โธ Run multi-turn chat sessions utilizing a custom contiguous head-major KV cache
โก Quick start
๐ฏ Who should try it
Systems programmers and low-level engineers interested in bare-metal architecture and custom assembly optimization.
๐ Why it matters now
The proliferation of compact language models makes it feasible to implement complete transformer inference and training loops entirely in low-level code without massive frameworks.
โ Verdict
An extraordinary tour de force for systems hackers and assembly enthusiasts, though obviously impractical for production application development.
โโโโโโโโโโโโโโ
๐ฌ Your take?
Would you ever drop down to assembly to optimize model inference speed?
๐ Save it for later โ and drop your use case in the comments.
๐ GitHub repository
๐ Full breakdown
๐ฃ @GitHub_Open_Source โ daily open-source picks
========================================
#opensource #assembly #devtools #llm
alesha-pro/llm.asmRun Qwen3-0.6B inference, boot a bare-metal OS, and train Mini-GPT in pure x86-64 NASM assembly.
โโโโโโโโโโโโโโ
โญ 2 225 stars ยท ๐ด 338 forks
๐ป Assembly ยท ๐ MIT ยท ๐ข commit today
You are staring at a bloated software dependency tree just to run a small inference model, wondering why a simple task requires megabytes of runtime overhead.
Standard inference stacks drag in gigabytes of libraries, complex toolchains, and abstraction layers that obscure hardware execution details and bloat binary sizes.
This project strips away every abstraction layer, implementing the entire model lifecycle in pure assembly while matching or exceeding conventional CPU decode speeds.
๐งญ How it works
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.
The code compiles down to tiny static binaries that execute directly on Linux or boot straight onto bare metal.
โจ Key features
โธ Assemble a Qwen3-0.6B inference engine in a 14 KB static Linux ELF binary
โธ Boot a 24 KB bare-metal OS running Qwen3-0.6B with zero disk requirements
โธ Train a Mini-GPT model from scratch with a live 80x24 Braille TUI in a 32 KB binary
โธ Execute AVX2, FMA, and F16C accelerated GEMM/GEMV math kernels without external libraries
โธ Run multi-turn chat sessions utilizing a custom contiguous head-major KV cache
โก Quick start
git clone https://github.com/alesha-pro/llm.asm.git && cd llm.asm && make all๐ฏ Who should try it
Systems programmers and low-level engineers interested in bare-metal architecture and custom assembly optimization.
๐ Why it matters now
The proliferation of compact language models makes it feasible to implement complete transformer inference and training loops entirely in low-level code without massive frameworks.
โ Verdict
An extraordinary tour de force for systems hackers and assembly enthusiasts, though obviously impractical for production application development.
โโโโโโโโโโโโโโ
๐ฌ Your take?
Would you ever drop down to assembly to optimize model inference speed?
๐ Save it for later โ and drop your use case in the comments.
๐ GitHub repository
๐ Full breakdown
๐ฃ @GitHub_Open_Source โ daily open-source picks
========================================
#opensource #assembly #devtools #llm
โค2