Back to browse
GitHub Repository

micro-gpt in ASM on the Super Nintendo

61 starsAssembly

SnesGPT, micro-GPT ported to ASM on the Super Nintendo

by vga805·Feb 12, 2026·2 points·1 comment

AI Analysis

●●SolidWizardryNiche GemRabbit Hole
The Take

This stuffs a full decoder-only transformer (RMSNorm, ReLU^2 MLP, multi-head attention with KV cache) into a SNES ROM and makes the 3.58 MHz 65816 actually perform matrix math by using the PPU hardware multiplier and Q8.8 fixed-point math. The repo documents the pipeline end-to-end — training/export, ROM lookup tables, and an assembler build — so it reads like a curated engineering demo rather than a sketchy toy.

Category
Target Audience

Retro game developers, low-level programmers, ML hobbyists interested in tiny models and constrained hardware demos

Post Description

Andrej Karpathy has been hacking on micro-gpt. Someone in the comments ported it to Haskell so I thought, "why not ASM." And once I had that thought, I thought, "why not on the SNES?"

This is mostly an exercise to see how well Claude Code would do at this task, and it did surprisingly well. Once compiled, the ROM will run on Snes9x and generate 20 new names.

Similar Projects

AI/MLMid

PicoGPT – GPT in a QR Code

The author minified Karpathy’s MicroGPT, ported it to 39 lines of JS (including a tiny autograd, MHA, AdamW and training loop) and shoehorned the whole gzipped HTML into a version-40 QR code that the browser decompresses and runs. It's clearly a stunt — the model is toy-scale (≈4k params, 8-token context) — but the compression trick, browser-native DecompressionStream use, and runnable-in-QR delivery are a delightful technical flex.

WizardryCrowd Pleaser
kuberwastaken
103mo ago