<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/show-hn-a-language-model-that-lives-in-a-boot-sector-bqu8skjdx" -->

---
title: Show HN: A language model that lives in a boot sector
description: This project packs a tiny neural network into a 512-byte boot sector that generates fake Linux kernel boot logs. The MBR is hand-written assembly that loads an...
canonical: https://daily.dev/posts/show-hn-a-language-model-that-lives-in-a-boot-sector-bqu8skjdx
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Show HN: A language model that lives in a boot sector | daily.dev
og:description: This project packs a tiny neural network into a 512-byte boot sector that generates fake Linux kernel boot logs. The MBR is hand-written assembly that loads an...
og:url: https://daily.dev/posts/show-hn-a-language-model-that-lives-in-a-boot-sector-bqu8skjdx
og:image: https://api.daily.dev/og/posts/bQU8sKjDX.png
og:image:alt: Show HN: A language model that lives in a boot sector
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Show HN: A language model that lives in a boot sector

**[Hacker News](https://daily.dev/sources/hn)** · 3 min read · 0 upvotes · 0 comments

## Summary

This project packs a tiny neural network into a 512-byte boot sector that generates fake Linux kernel boot logs. The MBR is hand-written assembly that loads an 11.5 KB int8 model from 23 extra sectors and runs it in 16-bit real mode. It has 8 characters of context and one hidden layer, producing garbled but boot-log-shaped text with fake timestamps, PCI bars and ACPI events. Training happens in Python, which quantizes weights to int8 with power-of-two scales so the boot sector can run the forward pass with imul and a single idiv. The author cites sectorllm, which boots a real llama2 transformer with 5 layers and attention from about 1.2 KB of real mode asm, as a close neighbor.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://github.com/kerlenton/bootgpt>

## Questions this post answers

### How can you fit neural network inference into a 512-byte x86 boot sector?

You write the entire runtime in hand-written assembly loaded by the MBR, using int 13h to load an int8-quantized model from extra disk sectors and int 10h to print output. The forward pass uses only imul and idiv for a softclip activation, with weights, strings and a vocab table stored in separate data sectors outside the 510-byte boot sector itself.

_Developers exploring low-level systems tricks like this can find more boot sector and assembly projects on daily.dev._

### What is the smallest known implementation of a transformer-based language model running in a boot sector?

sectorllm runs a full 5-layer llama2 transformer, including attention, from about 1.2 KB of 16-bit real mode assembly, using Karpathy's stories260K model. This is distinct from simpler char-level approaches that use a single hidden layer and fit the entire inference engine within the 510-byte master boot record itself.

_Anyone comparing extreme low-level ML implementations can track projects like this through daily.dev._

## Similar posts on daily.dev

- [Autoregressive Language Model on the 6502 Processor](https://daily.dev/posts/autoregressive-language-model-on-the-6502-processor-ufuvsz7ze) · Hacker News · 0 upvotes · 0 comments
- [Building A Dependency-Free GPT On A Custom OS](https://daily.dev/posts/building-a-dependency-free-gpt-on-a-custom-os-taupyqcmv) · Hackaday · 1 upvotes · 0 comments
- [TryHackMe Walkthrough: MBR and GPT Analysis \(Beginner to Intermediate Guide\)](https://daily.dev/posts/tryhackme-walkthrough-mbr-and-gpt-analysis-beginner-to-intermediate-guide--nxintcsai) · InfoSec Write-ups · 1 upvotes · 0 comments
- [512-Byte Boot Sector Pong Game](https://daily.dev/posts/512-byte-boot-sector-pong-game-zngujdxvi) · Hacker News · 1 upvotes · 0 comments
- [Building a 64-bit OS from Scratch with Claude Code](https://daily.dev/posts/building-a-64-bit-os-from-scratch-with-claude-code-a71d2jtne) · Lobsters · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#assembly](https://daily.dev/tags/assembly)

[View this post on daily.dev](https://daily.dev/posts/show-hn-a-language-model-that-lives-in-a-boot-sector-bqu8skjdx)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Show HN: A language model that lives in a boot sector","url":"https://daily.dev/posts/show-hn-a-language-model-that-lives-in-a-boot-sector-bqu8skjdx","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/show-hn-a-language-model-that-lives-in-a-boot-sector-bqu8skjdx"},"datePublished":"2026-10-31T22:54:18.571Z","dateModified":"2026-10-31T22:54:42.690Z","description":"This project packs a tiny neural network into a 512-byte boot sector that generates fake Linux kernel boot logs. The MBR is hand-written assembly that loads an...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d218a51e3af75dbb2df074bfe10060e7?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d218a51e3af75dbb2df074bfe10060e7?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/show-hn-a-language-model-that-lives-in-a-boot-sector-bqu8skjdx","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,assembly","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Show HN: A language model that lives in a boot sector"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/show-hn-a-language-model-that-lives-in-a-boot-sector-bqu8skjdx#faq","mainEntity":[{"@type":"Question","name":"How can you fit neural network inference into a 512-byte x86 boot sector?","acceptedAnswer":{"@type":"Answer","text":"You write the entire runtime in hand-written assembly loaded by the MBR, using int 13h to load an int8-quantized model from extra disk sectors and int 10h to print output. The forward pass uses only imul and idiv for a softclip activation, with weights, strings and a vocab table stored in separate data sectors outside the 510-byte boot sector itself. Developers exploring low-level systems tricks like this can find more boot sector and assembly projects on daily.dev."}},{"@type":"Question","name":"What is the smallest known implementation of a transformer-based language model running in a boot sector?","acceptedAnswer":{"@type":"Answer","text":"sectorllm runs a full 5-layer llama2 transformer, including attention, from about 1.2 KB of 16-bit real mode assembly, using Karpathy's stories260K model. This is distinct from simpler char-level approaches that use a single hidden layer and fit the entire inference engine within the 510-byte master boot record itself. Anyone comparing extreme low-level ML implementations can track projects like this through daily.dev."}}]}
```

