Bare Metal Qwen
Repository · https://github.com/alesha-pro/llm.asm
First seen by Oriel on .
AI summary
llm.asm is a set of three dependency-free x86-64 NASM projects: a compact Qwen3-0.6B inference engine, a bootable bare-metal LLM OS, and a from-scratch Mini-GPT trainer.
- The Linux inference binary is 14,712 bytes and runs Qwen3-0.6B with a built-in BPE tokenizer, multi-turn chat, and KV-cache; its FAST_Q8=1 mode reports 126.8 tok/s at 40 threads.
- On an AMD EPYC 7642, FAST_Q8=1 decode is reported 18% to 36% faster than llama.cpp across 1 to 40 threads, with 64/64 exact greedy tokens versus PyTorch FP32.
- The 24,252-byte bare-metal OS boots without Linux or Windows and supports SMP chat; the project reports 134.9 tok/s under KVM at 16 vCPUs.
- The 32,944-byte Mini-GPT trainer implements a full analytical backward pass and AdamW, matches PyTorch gradients across 21 tensors, and trains TinyShakespeare from loss 4.19 to 1.51 in four minutes.
- Runtime projects require x86-64 with AVX2, FMA, and F16C plus NASM and GNU binutils; Python and NumPy are optional for model export and verification.
#x86-64 assembly #llm inference #bare-metal #gpt training
Generated by gpt-5.6-sol. Check the original for details.
Metric trends
Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained
Points
Score reported by the source.
- Hacker News: 233, latest observation ; +223 over observed period since
Comments
Comment count reported by the source.
- Hacker News: 60, latest observation ; +60 over observed period since
Aliases
| Source | External ID | URL |
|---|---|---|
| Hacker News | 50648365 | https://github.com/alesha-pro/llm.asm/tree/main/02-baremetal-os Read discussion |