GitHub Open Source
2.01K subscribers
3.13K photos
3.4K links
๐ŸŒŸ GitHub Open Source ๐ŸŒŸ

Discover fascinating projects from GitHub! We curate the best repositories, highlight innovative ideas, and share tips for developers. Join us to explore hidden gems and fuel your tech passion! ๐Ÿš€
Download Telegram
๐Ÿค– llm.asm ยท ๐Ÿ“ฆ alesha-pro/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
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