PenGPT introduces two small transformer models—a 6M-parameter model for handwriting and a 54M-parameter model for sketch generation—built on the principle that data quality and scale outweigh architectural cleverness. Both models share a simple tokenizer using ten base stroke symbols and a configurable BPE merge count, producing sequences 3.2× shorter than character-level baselines. The handwriting model is trained on 495,590 words from 1,255 writers, sourced from research collections and public archives, processed via VLM transcription, word segmentation, and InkSight stroke tracing with 33–50% retention. The sketch model uses 477,670 drawings from ten datasets, including a curated 0.5% subset of Quick, Draw!. Ablation studies reveal that data volume and augmentation are critical: reducing handwriting data by 10× drops legibility from 54% to 47% and degrades style rank from 1.9 to 3.0; removing augmentation collapses sketch prompt adherence (matches label 76%→4%, caption 43%→6%). Training on single words destroys few-shot style adaptation (style rank 1.9→6.0). Architectural changes—doubling parameters, removing pen position, using 60× vocabulary, or replacing the transformer with an LSTM—yield negligible differences. The handwriting model adapts to unseen writers by conditioning on a few real words (or traced photo words) without fine-tuning, leveraging multi-word sequences that teach intra-writer consistency. A layer-4 attention head focuses 81% on the current letter across both print and cursive. For sketches, SigLIP 2 vectors condition generation; caption vectors are essential (43% phrase match) versus label-only (10%) due to geometric separation between text and sketch embeddings. The model blends concepts but fails at relational binding (e.g., "facing left" vs. "right" yield identical outputs, cosine similarity 0.999). Sampled handwriting legibility (54%) trails real ink (66%), with stroke order inferred, not recorded. Training took 8 minutes (handwriting) and 35 minutes (sketch) on 8×A100.

Read original