Show HN: Language model that runs inside a 512-byte boot sector and generates Linux boot logs
A developer built a tiny character-level neural network that fits entirely in a 510-byte master boot record, with weights and vocabulary stored in the following sectors. The model was trained on machine-generated dmesg output, so it endlessly produces plausible Linux boot messages. A matching integer-arithmetic Python script reproduces the assembly's output character by character, which helped expose bugs. Debugging involved comparing hidden-layer neurons through QEMU's debug port, revealing that an idiv instruction's use of edx corrupted a bias pointer. The project's design trades depth for size, using a single hidden layer of int8 operations compared with the five-layer sectorllm, which fits a Llama-2-style model into 1.2K of assembly.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in