Developer kerlenton built bootgpt, a neural network that fits entirely in a PC's master boot record. The MBR is 512 bytes of hand-written assembly; it loads an 11.5 KB int8 model from the next 23 sectors and runs inference in 16-bit real mode on a 386 — no OS, no C runtime. The model, trained on real `dmesg` output, hallucinates plausible Linux boot logs complete with timestamps, PCI BARs, and ACPI events for hardware that never existed.
Training uses `train.py`, which replicates the exact integer arithmetic (imul, single idiv, LCG sampler) so Python output matches the boot sector character-for-character. Two subtle bugs were fixed: `idiv` clobbered `edx` (used for bias pointers), and the BIOS print routine zeroed `bx` (holding the predicted character), requiring push/pop around the call.
The project echoes the boot-sector demo scene and parallels sectorllm, which runs a 5-layer Llama-2 in 1.2 KB. Here the trade-off is extreme: one hidden layer, char-level, int8-only, dreaming infinite boot logs. Build with NASM, QEMU, NumPy; `dd` the image to USB and boot any BIOS machine.
Source: Hacker News · Summarized by HeadlinesBriefing