Newshot

LLM on bare-metal making ASM games

Original text(via HN AI)

Post

Alexey Fateev on X: "I deleted Linux AND every app on the OS. My 113 KB pure x86-64 assembly OS boots with 0 GB of disk, runs a 2.5B LLM on bare-metal CPU, writes Flappy Bird in raw x86-64 assembly, assembles it at runtime, and launches it live when you prompt "flappy bird". No Linux, no Windows, no C, no Rust, no gcc, and no preinstalled apps. The entire Multiboot kernel (zero-app-os.elf) is 115,160 bytes across 19,138 lines of handwritten NASM. It boots straight into 64-bit Long Mode, wakes every CPU core over APIC, maps a 2.50 GiB Q8_0 MiniCPM5-2B model directly over NVDIMM, streams x86-64 assembly into a built-in Ring-0 micro-assembler, and runs the app in a hardware-isolated Ring-3 W^X sandbox. When a generated app hits a hardware PF page fault or UD invalid opcode, Ring 0 traps the CPU exception, feeds the exact faulting line and CR2 address back to the LLM, and applies a 10 to 20 token surgical PATCH in ~0.3s. Head-to-head numbers on bare-metal CPU (Q8_0, 0% GPU): - Kernel binary: 115,160 bytes (37.6% smaller than the 181 KB C+ASM build, 0 gcc calls) - Pure NASM vs GCC -O3 (20T EPYC 7642): 277.6 vs 248.7 tok/s prefill (+11.6%) and 37.6 vs 34.3 tok/s decode (+9.6%), byte-exact with C - Bare-metal Prefix KV-Cache (LCP): 2,354-token prefill drops from 13.3s to 93 ms (142.8x faster) - Diskless 0 GB Proxmox VM (2014 Intel Xeon E5-2670 v3, 16 vCPUs): boots straight out of RAM and compiles a playable 20-color Flappy Bird (1,595 tokens, 230 instructions, 1,074 bytes of machine code) Tetris, Arkanoid, Ring-0 PF self-healing RL, and the 4x 3090 RL training charts are in the thread below. The model and repo links are in the last reply."

Conversation

  • Alexey Fateev@superaleshaI deleted Linux AND every app on the OS. My 113 KB pure x86-64 assembly OS boots with 0 GB of disk, runs a 2.5B LLM on bare-metal CPU, writes Flappy Bird in raw x86-64 assembly, assembles it at runtime, and launches it live when you prompt "flappy bird". No Linux, no Windows, no C, no Rust, no gcc, and no preinstalled apps. The entire Multiboot kernel (zero-app-os.elf) is 115,160 bytes across 19,138 lines of handwritten NASM. It boots straight into 64-bit Long Mode, wakes every CPU core over APIC, maps a 2.50 GiB Q8_0 MiniCPM5-2B model directly over NVDIMM, streams x86-64 assembly into a built-in Ring-0 micro-assembler, and runs the app in a hardware-isolated Ring-3 W^X sandbox. When a generated app hits a hardware PF page fault or UD invalid opcode, Ring 0 traps the CPU exception, feeds the exact faulting line and CR2 address back to the LLM, and applies a 10 to 20 token surgical PATCH in ~0.3s. Head-to-head numbers on bare-metal CPU (Q8_0, 0% GPU): - Kernel binary: 115,160 bytes (37.6% smaller than the 181 KB C+ASM build, 0 gcc calls) - Pure NASM vs GCC -O3 (20T EPYC 7642): 277.6 vs 248.7 tok/s prefill (+11.6%) and 37.6 vs 34.3 tok/s decode (+9.6%), byte-exact with C - Bare-metal Prefix KV-Cache (LCP): 2,354-token prefill drops from 13.3s to 93 ms (142.8x faster) - Diskless 0 GB Proxmox VM (2014 Intel Xeon E5-2670 v3, 16 vCPUs): boots straight out of RAM and compiles a playable 20-color Flappy Bird (1,595 tokens, 230 instructions, 1,074 bytes of machine code) Tetris, Arkanoid, Ring-0 PF self-healing RL, and the 4x 3090 RL training charts are in the thread below. The model and repo links are in the last reply.00:006:31 PM · Nov 30, 2026·86.2KViews157
@superalesha
@superalesha
Video thumbnail
Video thumbnail
  • Alexey Fateev@superalesha4htetris MiniCPM5-2B streams 2,524 tokens of compact x86-64 assembly into the Ring-0 assembler, emits 328 instructions (1,366 bytes of machine code), and drops a playable 10-column Tetris board straight into Ring 3.00:002Alexey Fateev@superalesha4harkanoid 1,243 tokens of generated assembly, 177 instructions, 755 bytes of machine code. 5 neon brick rows, collision physics, paddle steering on arrows, all compiled on the fly inside a 113 KB assembly kernel.00:003Alexey Fateev@superalesha4hHow we trained a 2B model to write bare-metal x86-64 apps and repair its own CPU faults (on 4x RTX 3090): Pure SFT failed completely on held-out prompts (0/32 compiled) because it got stuck unrolling memory loops until the token ceiling. Running 120 steps of GRPO against 16 5Alexey Fateev@superalesha4hModel weights (BF16, Q8_0 GGUF, bare-metal NVDIMM .zappm), the 113 KB pure NASM kernel, and the 12 MB bootable GRUB2 ISO are all up on Hugging Face: huggingface.co/alesha-pro/I-D… Pure NASM OS source code: github.com/alesha-pro/llm…alesha-pro/I-Deleted-Linux-ZeroApp-2B · Hugging FaceFrom huggingface.co6
Video thumbnail
Video thumbnail
Video thumbnail
Video thumbnail
Image
Image
Image
Image
Card image
Card image
  • steve@stevedv_eth4hThis prompt should be easy to write in assembly "rollercoaster tycoon"1
@stevedv_eth
@stevedv_eth

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗