arXiv · 2611.38036
PenGPT: A Generative Transformer for Handwriting and Sketches
Abstract
Generative models of text and images have become remarkably capable, but pen strokes, the sequences of pen positions behind handwriting and drawing, have received far less attention. Can one small transformer learn to hold a pen? We introduce PenGPT, a decoder-only model that emits strokes one token at a time, with a simple tokenizer: a walk on a grid, merged by byte-pair encoding. A small 5M-parameter model writes realistic cursive and print in many styles and takes up the style of unseen writers. A larger variant (54M parameters) draws sketches from text. We merge ten public sketch datasets and filter for quality in order to obtain nearly 500k diverse, high-quality line sketches to train on. We ablate each part of the recipe and compare both models against recurrent networks in the style of Graves and of sketch-rnn. Our results show that the gains come mostly from data and training setup: more data, augmentation, and training on several words at once matter most. A BPE vocabulary sixty times larger, from ScribeTokens, does not help. A simple GPT-style architecture trained on large amounts of high quality data gives the best results.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Sam Greydanus. 2026-11-25. PenGPT: A Generative Transformer for Handwriting and Sketches. https://arxiv.science/abs/2611.38036
Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite arXiv Science by Indiciae: BibTeX · RIS.