Spelling Bee Embeddings for Language Modeling
Markus N. Rabe, Judith Clymo, Zheren Dong
TL;DR
This work tackles tokenization-induced inefficiencies in language models by introducing spelling bee embeddings, which augment standard token embeddings with a compact byte-level spelling signal derived from the token's UTF-8 representation. The approach preserves the original architecture and incurs negligible overhead, yielding consistent improvements across model sizes from 40M to 800M parameters and achieving compute efficiency comparable to about an 8% reduction in FLOPs or data for the same test loss. Empirical results on standard benchmarks show broad gains, with notable improvements in spelling-related tasks such as counting Rs in strawberry and the Count/Index tasks, though some limits exist (e.g., reverse spelling). Ablation analyses confirm the necessity of the combined token-and-byte embedding and reveal the approach's robustness to data scale, suggesting practical adoption and prompting reexamination of tokenization and vocabulary choices in future models.
Abstract
We introduce a simple modification to the embedding layer. The key change is to infuse token embeddings with information about their spelling. Models trained with these embeddings improve not only on spelling, but also across standard benchmarks. We conduct scaling studies for models with 40M to 800M parameters, which suggest that the improvements are equivalent to needing about 8% less compute and data to achieve the same test loss.
