← HN · Best

Hacker News·3 min read

PenGPT: A Generative Transformer for Handwriting and Sketches

You’ll see how focusing on dataset quality can outweigh architectural tricks in generative models.

PenGPT can generate convincing handwritten text and free‑hand sketches, and the author attributes the result almost entirely to data work. Roughly 80% of the effort went into building the largest, cleanest dataset possible and performing extensive quality control, with no clever new architecture involved. The model was trained on an 8‑GPU H100 setup, showing that scale‑up of data, not compute, drove the outcome.

The project follows the so‑called Bitter Lesson: progress in AI often comes from scaling compute or data rather than inventing smarter algorithms. Here the author explicitly avoided architectural tinkering, instead spending months curating millions of pen strokes, filtering noisy samples, and standardizing formats. This disciplined pipeline produced a homogeneous corpus that the transformer could learn from efficiently, despite the modest hardware footprint.

The transformer backbone is a standard generative architecture, identical to those used for text or image generation. Input tokens encode pen‑position coordinates and pen‑up/down flags, while the decoder predicts the next point in the sequence. Because the data are clean and densely sampled, the model learns smooth trajectories without needing specialized loss functions or attention tricks. Training converged in a few days on the 8‑GPU rig, matching quality of larger, more complex systems reported elsewhere.

For anyone building generative visual models, the takeaway is clear: invest heavily in dataset collection and curation before chasing architectural novelty. A well‑filtered, high‑resolution corpus can let a vanilla transformer produce high‑fidelity outputs with modest compute. Prioritize pipelines for de‑duplication, label consistency, and noise reduction to replicate PenGPT’s results without scaling hardware.

TakeawayHigh‑quality, large‑scale data can replace fancy model tweaks for handwriting and sketch generation.

Prodigy briefing — continue on the original for source material, discussion, and updates.

Read original ↗