← Wed, Nov 25 digest

PenGPT: A Generative Transformer for Handwriting and Sketches

read article ↗ hn thread ↗

PenGPT is a compact transformer model that generates diverse handwriting and vector sketches, demonstrating that data quality trumps architectural complexity.

read it Provides concrete empirical findings on data scaling versus architecture for generative handwriting and sketches, offering a refreshing look at applying the Bitter Lesson.

summary

Sam Greydanus built PenGPT, a small transformer model that generates realistic handwriting in diverse styles and draws sketches from text prompts. The project relies on clean data curation of hundreds of thousands of words and sketches rather than complex architectures, embodying Rich Sutton's Bitter Lesson. Experiments show that data quality and augmentation vastly outperform architectural tricks or fine-tuning style encoders. The handwriting model can adopt an unseen person's hand using a few sample words, while the drawing model links text prompts to vector sketches.

key points

  1. PenGPT uses a unified tokenizer for text strokes and vector sketches, featuring a 6M-parameter handwriting model and a 54M-parameter drawing model.
  2. Ablation experiments show that data quality and augmentation matter heavily, while complex architectural tweaks and explicit pen-position inputs have negligible impact.
  3. The model adapts to new handwriting styles entirely in-context by conditioning on four words from a writer, requiring no fine-tuning or style encoders.

who should read it

Machine learning practitioners and researchers interested in generative models and data scaling.

discussion warm

consensus

Commenters praise the project as a refreshing, practical illustration of the Bitter Lesson where clean data curation beats complex model hacks.

pushback

Some critics note minor rendering artifacts like wobbly straight lines and express mild disappointment that parts of the blog post were written by Claude.

best comment by keyle ↗

The most interesting part to me is this mention of the Bitter Lesson [1]

"The results are interesting and the project was a pleasure to work on. And yet there was no clever architectural idea behind it. About 80% of my effort went into building the biggest, cleanest datasets possible and doing lots of quality control on them."

I spend way too much time on trying to out-clever existing solutions, when a clean application of known approaches would serve best.

[1] http://www.incompleteideas.net/IncIdeas/BitterLesson.html

Reflects on the personal trap of over-engineering solutions when clean applications of known approaches serve better.

Generated by an LLM from the article and thread. Check the sources before relying on it.