A Language Model That Lives in a Boot Sector

November 1, 2026

512 bytes. That is the entire MBR, the first sector a PC reads when it wakes up. It is where the BIOS hands control to whatever code you put there. Most boot sectors load an operating system. This one runs a neural network.

bootGPT, created by a developer going by kerlenton, is a character-level language model that fits entirely in a 512-byte boot sector [1]. No operating system, no C runtime, no Python interpreter. The machine wakes up and the model dreams a Linux boot log, complete with timestamps, PCI bar addresses, and ACPI events for hardware that does not exist.

The architecture is beautifully constrained. The MBR is 510 bytes of hand-written x86 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. The model has 8 characters of context and one hidden layer. The forward pass uses integer multiply instructions with a single integer divide for the activation function. A linear congruential generator seeded by the hardware timer handles sampling [1].

The output is exactly what you would expect from a model this small: hallucinatory, structured, and oddly charming. Fake kernel messages with real-looking addresses. PCI device IDs that match no known hardware. Boot command lines that dissolve into compiler version strings. It is not trying to be accurate. It is trying to look like a boot log, and at 8 characters of context with one hidden layer, it manages [1].

What makes this project remarkable is not the model quality. It is the engineering. The boot sector is code only. Strings, weights, and the vocabulary table all live in the data sectors because there was no other way to fit inference plus BIOS plumbing into 510 bytes. The training script simulates the exact integer math the assembly will run, including the LCG sampler, so the Python output and the boot sector output can be diffed. They match character for character [1].

The boot sector genre has a long and glorious history. Oscar Toledo fit chess, an entire operating system, and a BASIC interpreter into 512 bytes. Someone wrote a C compiler that fits in a boot sector. sectorllm boots a real llama2 transformer with 5 layers and attention from about 1.2 KB of real mode assembly [1].

bootGPT takes the other extreme from sectorllm. Instead of fitting a real transformer into a slightly larger boot area, it fits a tiny custom model into the MBR itself. The whole engine lives in those 510 bytes. Weights and strings live in the sectors after it. The model is not a general story teller. It is a tiny character-level net trained for exactly one thing: hallucinating the boot log of the machine it wakes up on [1].

There is something poetic about a machine that boots straight into dreaming. The first thing the hardware does is imagine what it might have been. The fake boot log looks real because the model learned the shape of real ones. And then you press any key and it reboots, ready to dream again.

You can run it yourself with QEMU, or dd it onto a USB stick and boot any BIOS machine. It only reads its own sectors. It will not touch your disks. It just wants to hallucinate [1].

Sources: [1] bootgpt, GitHub repository, kerlenton

Back to all posts