A small transformer that writes and sketches from text, PenGPT is the latest project from Zach Wimpee, following the Bitter Lesson, a principle that emphasizes the importance of practical over theoretical approaches. The text of this post, which discusses the development of PenGPT, was written by Claude, but Wimpee plans to take over the writing himself after a Thanksgiving Break.

PenGPT comprises two models: a 6M-parameter model that can write both print and cursive, and a 54M-parameter model that draws from text prompts. The project’s development required significant effort, with 80% of the work dedicated to data collection and quality control, 15% to speed optimization, and 5% to architectural design.

The handwriting data for PenGPT consists of 495,590 words from 1,255 writers, primarily sourced from research collections, old letters, and public archives. The data was processed using a vision-language model to identify legible pages, which were then broken down into words. InkSight traced the strokes of each word, and a set of checks ensured the quality of the data. Between a third and a half of the words were ultimately retained.

The drawing data for PenGPT comes from 477,670 sketches across ten public datasets, with the Quick, Draw! dataset being the largest, containing 50 million sketches from which the best 0.5% were selected. Wimpee has not released the datasets, but the paper’s appendix provides detailed instructions on how to build them.

Wimpee’s experiments involved comparing PenGPT with older approaches and making incremental changes to observe their impact. Key findings include:

1. Data and Presentation: Reducing the amount of data significantly degrades performance. Removing data augmentation causes the drawing model to ignore prompts entirely. Training on single words prevents the model from learning new hands, as the style rank increases from 1.9 to 6.0.

2. Architectural Insights: Adding pen position information or using a larger vocabulary did not improve performance. Even the transformer architecture is not strictly necessary; an LSTM can still handle handwriting reasonably well.

3. Sampling Mechanism: The key to PenGPT’s success lies in the sampling technique. Each training sequence contains up to four words by a single writer, teaching the model that later words resemble earlier ones. This allows the model to continue writing based on a few initial words.

4. Image-to-Text Conversion: Wimpee also experimented with using image vectors from a vision-language model (SigLIP) instead of text prompts. While the model could generate sketches, it struggled with more complex tasks and produced less legible handwriting compared to the real data.

5. Conclusion: Wimpee acknowledges that many of his previous projects relied on clever architectural ideas, which often turned out to be less effective in practice. The development of PenGPT focused more on creating high-quality datasets and optimizing training speed.

Overall, PenGPT demonstrates the power of small language models in generating handwriting and sketches, highlighting the importance of practical data-driven approaches over complex architectures. The project underscores the Bitter Lesson, emphasizing the value of straightforward, well-structured data over elaborate, theoretical solutions.

Source: https://greydanus.github.io/2026/11/12/pengpt/