> ## Content Index
> Fetch the complete content index at: https://www.stirup.si/llms.txt
> Use this file to discover other available public pages before exploring further.

# Boot Sector Model Architecture and Constraints
- URL: https://www.stirup.si/boot-sector-model-architecture-and-constraints-77891699/
- Published: 2026-10-31T15:32:37.000Z
- Updated: 2026-10-31T15:32:37.000Z
- Description: The model loads an 11.5 KB int8 model from 23 sectors and runs in 16-bit real mode on a 386 processor, generating fragmented system logs and kernel command line entries within extreme memory constraints.
- Author: Satish Das
- Tags: Community, News, Stirup Research

## Model Architecture and Boot Process

The model architecture is designed to operate within the constraints of a boot sector, loading an 11.5 KB int8 model from the next 23 sectors and running it in 16-bit real mode on a 386 processor [Hacker News Show](https://github.com/kerlenton/bootgpt?ref=stirup.si). With only 8 characters of context and a single hidden layer, the model produces output that includes fragmented system logs and kernel command line entries, such as "pci 0000:01:01.4: \[1b36:0a35\] ryndrde c4128 6422 Vveine" and "BOOT\_IMAGE=/vmlinu -5.5.2-1-generic gcc version 13.3.0, GNU ld ..." [Hacker News Show](https://github.com/kerlenton/bootgpt?ref=stirup.si). To fit inference and BIOS plumbing into 510 bytes, strings, weights, and the vocab table are stored in the data sectors [Hacker News Show](https://github.com/kerlenton/bootgpt?ref=stirup.si). This approach highlights the trade-offs between model complexity and the extreme memory constraints of a boot sector environment.

## Generated Output and Simulation

The generated output and simulation capabilities of the language model are demonstrated through its ability to produce a Linux boot log that includes timestamps, PCI bars, and ACPI events for hardware that does not physically exist. This simulation is further enhanced by a script that replicates the exact integer math the assembly code will execute, including an LCG sampler, allowing for precise comparison between Python output and the actual boot sector output via diffing. In contrast, *bootgpt* takes a different approach by fitting the entire engine within the 510-byte Master Boot Record (MBR), with weights and strings stored in subsequent sectors. The model is specifically trained as a character-level network for a single purpose: to hallucinate the boot log of the machine it wakes up on, rather than functioning as a general-purpose storyteller.

## Training and Quantization

The model is trained using `train.py`, which implements character embeddings, a single hidden layer, and softmax for output generation. All weights are quantized to int8 with power-of-two scales, enabling the boot sector to perform the full forward pass using `imul` and a single `idiv` instruction. The runtime is implemented in `boot.asm`, which uses BIOS interrupts such as `int 13h` for loading weights and `int 10h` for printing. Activation is handled with `cdq`/`idiv` for softclip, and sampling is performed using timer-seeded noise for argmax. The closest comparable project, `sectorllm`, boots a real `llama2` transformer with 5 layers and attention mechanisms from approximately 1.2 KB of real mode assembly, running the `stories260K` model from Karpathy.

## Sources and reporting notes

- [Hacker News Show](https://github.com/kerlenton/bootgpt?ref=stirup.si)

Based on published source material. No independent hands-on testing is claimed.