PenGPT: A Generative Transformer for Handwriting and Sketches
- ID
- 50342
- Status
- summarized
- Published
- 25 Nov 2026, 8:54 AM
- Fetched
- 26 Nov 2026, 2:41 AM
- Provider
- Hacker News
- Category
- dev-community
- Original URL
- https://greydanus.github.io/2026/11/12/pengpt/
- Source URL
- https://hnrss.org/best
Summary
- Score
- 7.0
- Created
- 26 Nov 2026, 2:42 AM
- Tags
- Audience
- ai_ml_learnersdevelopersvibe_coders
What happened
Sam Greydanus released PenGPT, two small decoder-only transformers that generate pen strokes: a 6M-parameter model that writes print and cursive and adopts the handwriting of an unseen writer from one to three sample words, and a 54M-parameter model that sketches from a typed prompt (via a SigLIP 2 vector). The modality-specific part is tiny — pen points snap to a grid giving eight directions plus pen-down/pen-up, and byte-pair encoding merges common runs of moves (one sample word went from 156 moves to 47 tokens) — with everything else a plain decoder. The author attributes the result to 80% data, 15% speed, 5% architecture, having built the handwriting corpus from scans (495,590 words by 1,255 writers, with only a third to a half surviving trace-quality checks) and 477,670 sketches from ten public datasets; code and weights are released but the datasets are not.
Why it matters
The concrete lesson is the data pipeline, not the model: a 6M-parameter transformer beats expectations because a vision-language model filtered legible pages, transcribed them, and InkSight traced words back into strokes, with aggressive quality checks discarding most of the raw input. If you are building anything stroke- or sequence-shaped, budget your effort on tokenizer plus filtering rather than architecture — and note the honest failure mode: the author kept only 0.5% of Quick, Draw!'s 50 million sketches, so the filtering threshold, not the model size, set the ceiling. Also relevant if you plan to publish: the post text was written by Claude and the author says he intends to rewrite it, and the datasets are withheld while code and weights are not.
Discussion angle
Take the '80% data, 15% speed, 5% architecture' split at face value and ask what it implies for your own projects: how much of the win here came from a VLM-based labeling pipeline that most small teams could now replicate cheaply, and where does that leave the usual instinct to reach for a bigger model?