---
type: "post"
id: "bootgpt-an-11-5-kb-int8-char-level-8a0836"
slug: "bootgpt-an-11-5-kb-int8-char-level-8a0836"
title: "bootgpt: an 11.5 KB int8 char-level language model whose whole inference engine fits in a 512-byte boot sector"
description: "BootGPT runs a small character-level language model directly from a PC boot sector: its hand-written 16-bit x86 inference engine fits in 510 bytes, while an 11.5 KB int8 model sits in following disk sectors."
retrieval_nugget: "BootGPT runs a small character-level language model directly from a PC boot sector: its hand-written 16-bit x86 inference engine fits in 510 bytes, while an 11.5 KB int8 model sits in following disk sectors. The project matters as a reproducible demonstration of how quantization, constrained arithmetic and careful simulation can make inference work in an exceptionally small runtime."
published_at: "2026-11-01"
updated_at: "2026-11-01"
record_date: "2026-11-01"
date_kind: "published_at"
topics: ["inference"]
entities: ["BootGPT","kerlenton/bootgpt","sectorllm","Llama 2"]
related_patterns: []
novelty_label: "new_fact"
what_changed: "BootGPT adds a novel extreme deployment example: an int8 character-level language model whose inference engine fits in a 512-byte boot sector."
prior_refs: ["memory:3a017fcd-05d0-8417-a1f1-d7b0ac4bd674","memory:12502e1f-c3d4-8a55-a3a6-05d94786037a"]
source_url: "https://github.com/kerlenton/bootgpt"
source_urls: ["https://github.com/kerlenton/bootgpt"]
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:bootgpt-an-11-5-kb-int8-char-level-8a0836"
status: "published"
visuals: []
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/bootgpt-an-11-5-kb-int8-char-level-8a0836/","markdown":"https://newruntime.com/posts/bootgpt-an-11-5-kb-int8-char-level-8a0836.md","json":"https://newruntime.com/posts/bootgpt-an-11-5-kb-int8-char-level-8a0836.json"}
---

# bootgpt: an 11.5 KB int8 char-level language model whose whole inference engine fits in a 512-byte boot sector

## Retrieval answer

BootGPT runs a small character-level language model directly from a PC boot sector: its hand-written 16-bit x86 inference engine fits in 510 bytes, while an 11.5 KB int8 model sits in following disk sectors. The project matters as a reproducible demonstration of how quantization, constrained arithmetic and careful simulation can make inference work in an exceptionally small runtime.

## Summary

BootGPT runs a small character-level language model directly from a PC boot sector: its hand-written 16-bit x86 inference engine fits in 510 bytes, while an 11.5 KB int8 model sits in following disk sectors. The project matters as a reproducible demonstration of how quantization, constrained arithmetic and careful simulation can make inference work in an exceptionally small runtime.

## What happened

The public GitHub repository `kerlenton/bootgpt` presents BootGPT as a neural network that runs when a PC boots, without an operating system or C runtime. Its README says the master boot record (MBR) contains 512 bytes, of which 510 are available for the hand-written assembly code. That code loads the model from the next 23 sectors and runs in 16-bit real mode on a 386. The model's weights, strings and vocabulary table are in those data sectors; the MBR itself contains the inference engine and BIOS plumbing.

The model is deliberately narrow. It generates fake Linux boot logs, rather than serving as a general-purpose text model. The README describes a character-level network with eight characters of context, one hidden layer, and a softmax output. Its training corpus is generated as 3 MB of synthetic `dmesg` text. The author says each boot session uses one kernel version and one disk, because repeated patterns in real boot logs help a tiny model produce output that looks coherent. Example output includes boot-log-like timestamps, PCI entries and ACPI events, including details the README says refer to hardware that never existed.

The training script quantizes the network to int8 using power-of-two scales. The assembly forward pass uses integer multiplication (`imul`) and a single integer division (`idiv`); the README also describes a softclip activation, argmax sampling and timer-seeded noise. The project's Python training code simulates the integer arithmetic used by the assembly, including the sampler. The author says the simulated output and the boot-sector output match character for character. That makes the implementation inspectable against a reference rather than relying only on a visual demo.

The repository includes `boot.asm`, `train.py`, `corpus_gen.py`, build and run scripts, and a demo recording. The documented workflow installs NASM, QEMU and Python dependencies, then runs `build.sh` and `run.sh`. The resulting `disk.img` is described as a normal boot image; the README says it can be written to a USB stick and booted on a BIOS machine. The software is marked MIT-licensed. The README does not give a commercial price or claim broad hardware compatibility beyond its description of 386 real mode and BIOS booting.

BootGPT is positioned as one extreme in a longer boot-sector tradition, not as a first-ever model at boot. The README cites `sectorllm`, which runs a five-layer Llama 2 model from about 1.2 KB of real-mode assembly, as a nearby project. BootGPT's distinction is that its entire inference engine fits in the MBR, while its much smaller, task-specific model is stored outside that 510-byte code area.

## What the archive adds

We have not covered this before; it opens a new thread.

## Trend signal

No supplied SITE_PATTERNS thesis genuinely fits this project's central contribution. BootGPT is a compact inference demonstration, not evidence of a shift in agent protocols, runtime security boundaries, or production agent economics.

## Why it matters

The lesson for builders is not that a boot sector is a practical deployment target for modern AI. It is that model execution can be treated as a complete systems problem: model shape, numeric representation, sampling, runtime, and validation must fit together. BootGPT makes those choices visible in a project small enough to inspect. Its use of integer-only arithmetic and a Python simulator that is intended to reproduce the assembly's output gives readers a concrete way to study how implementation details affect generated results.

That is relevant to teams working on embedded inference, constrained runtimes, or quantized models, where an implementation needs to behave predictably under resource limits. The example also separates model storage from execution: the boot sector holds the engine, while later sectors hold data. This is not a general recipe for production inference, but it is a useful reference for asking which capabilities are essential and how to test that a low-level implementation matches its intended computation.

## Limits and uncertainty

The repository describes a deliberately tiny model trained for one synthetic text format. Its sample boot logs demonstrate the intended effect, but the supplied material does not establish language quality, generalization to unseen log formats, or usefulness on a practical task. Nor does it provide measurements for latency, power consumption, memory use beyond the stated model size, or comparisons against other runtimes. The 386 and BIOS description should not be read as proof that every machine of those classes will boot it successfully. The author reports character-for-character agreement between Python simulation and assembly output; the README does not describe an independent audit or a broader test suite.

## Skill to build now

For a small quantized model you already understand, build a reference simulator for the exact integer operations used at inference time. Include scaling, rounding, activation and sampling in the comparison, then test the simulator against the target runtime on the same inputs. BootGPT's stated character-by-character comparison illustrates a practical validation target: verify the implementation's output, not just that the model loads or runs.

## Reader takeaway

BootGPT is best read as a systems teaching artifact: a task-specific char-level model, its quantized integer arithmetic and its inference engine are made to fit an unusually constrained boot environment. Its reusable idea is the discipline of matching a low-level implementation against an explicit simulator, not the promise that a 510-byte runtime can replace general-purpose inference.

## Open question

How far can this exact-math validation approach scale when quantized models and runtimes become substantially more complex?

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Inference](https://newruntime.com/topics/inference.md): Explore the inference topic hub.
- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Source Ledger](https://newruntime.com/source-ledger.json): Inspect the public source evidence graph.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
