Qwen3-0.6B inference (12 KB), bare-metal bootable OS (22 KB), and from-scratch Mini-GPT trainer with live Braille TUI (32 KB) in 100% pure x86-64 NASM assembly. Zero C, zero libc, zero dependencies.
Contributing to llm.asm
Thank you for checking out llm.asm! This repository explores how far extreme low-level AI can go without runtime bloat: tens of kilobytes, zero libc, deterministic math, and hard hardware verification.
To keep main focused and maintainable, please review our scope and pull request guidelines before contributing.
Project Ethos
Every component in this repository is built around four rules:
- Zero runtime bloat: Core binaries must ship with zero dynamic libraries (
readelf -dreports no dynamic section) and zero unnecessary runtime dependencies. - Phases
01–03(Pure Assembly): Strictly 100% pure x86-64 NASM (nasm+ld). Zero C, zero C++, zero Rust, zero libc, zero libm. - Phases
04+(Kernel, Hypervisor & Bare-Metal AI): Bare-metal OSes, Ring-1hypervisors (NASM + zero-libc C), firmware/boot-sector AI, and verifier-clean in-kernel ML (0floats, bounded loops, verifiable safety). - Hard verification: Every math kernel, binary format change, and performance claim must be backed by reproducible parity and benchmark evidence.
What Belongs Upstream (In Scope)
PRs that directly strengthen the existing phases and core ethos are welcome:
- Bug fixes & safety: Bounds checks, argument parsing safety, ELF/Multiboot/NPT edge cases, register/ABI preservation, and crash or leak fixes.
- Docs & size accuracy: Fixing broken commands, clarifying reproduction steps, and keeping binary sizes and benchmark numbers strictly factual.
- Pure x86-64 NASM optimizations & ISA fallbacks: Faster AVX2/FMA/F16C kernels, clean fallback paths (e.g., AVX1) that preserve
FAST_Q8=1|0and bit-exactness, and compact zero-dependency kernel or model work. - Unified bare-metal boot & hardware fixes: Real-hardware ACPI/APIC, VGA/serial, and loader fixes - please check open PRs first so we do not duplicate loaders.
- CI & automated verification: Clean scripts and CI workflows covering
make all,make check-all, and existing parity harnesses.
What Belongs in Your Own Fork / Repo (Out of Scope for main)
To keep llm.asm tight and true to its scope, we do not merge the following into main:
- Ports to other CPU/GPU stacks or languages: ARM64, RISC-V, C++, Rust, Metal, CUDA, or WebGPU rewrites.
- Heavy host-side wrappers: HTTP/OpenAI API proxies, agent framework glue, GUIs, or desktop installers.
- General-purpose multi-model USB OS distributions: Broad hardware-enablement distros, package managers, or multi-engine live USB images.
Cool ports and wrappers are genuinely welcome! Build them in your own repository and open an issue or PR adding a link to the Ecosystem section of
README.mdso the community can discover your project.
Pull Request Checklist
Before opening a PR, please confirm all of the following:
- Small, focused diff: One cohesive change per PR. Avoid unrelated formatting sweeps or edits to untouched phases.
- Zero new runtime dependencies: Do not introduce libc, shared libraries, or new runtime tools into core binaries.
- Reproducible numbers only: Include the exact commands and measured parity/benchmark outputs in your PR description. Never alter benchmark tables or binary size claims in
README.mdwithout an independently reproducible run. - Preserve formats & builds: Keep
.asmbinv1/v2 compatibility intact and verify that builds and checks pass cleanly:
# Phases 1–3 build, ELF inspection, and assembly math kernel tests
make all && make check-all
python3 scripts/test_math.py build/test_math
# Phase 4 verifier selftest (when touching 04-ring1-kernel-surgeon/)
python3 04-ring1-kernel-surgeon/verifier/kvm_verifier.py --selftest
# Phase 5 KVM verification (when touching 05-ebpf-jev/)
python3 05-ebpf-jev/testbed/verify_demo.py