Scaling Laws with Vocabulary: Larger Models Deserve Larger Vocabularies
The foundational Chinchilla / Kaplan scaling-law papers fix the tokenizer and sweep only model parameters and training tokens ; vocabulary size is a free hyperparameter that current LLMs pick largely by convention (Llama 2 uses 32K, Gemma-7B uses 256K at similar total parameter counts). This paper adds as a first-class scaling-law dimension, training models from 33M to 3B parameters on up to 500B characters, and derives the compute-optimal vocabulary size via three complementary methods (IsoFLOPs, FLOP derivative, and a parametric fit of a vocabulary-aware loss formula). All three converge on the same conclusion: larger models deserve larger vocabularies, but vocabulary parameters should scale strictly slower than non-vocabulary parameters — specifically vs and . Predicts Llama 2-70B should have had at least a 216K vocabulary (7× its actual 32K); empirically verifies at 3B scale that switching from 32K to a 43K prediction improves ARC-Challenge from 29.1 → 32.0 at matched 2.3e21 FLOPs.
Key claims
Section titled “Key claims”- Vocabulary parameters follow a power law in compute — — with the exponent strictly less than the non-vocabulary exponent and the data exponent [§4.1, Fig. 5]. Practical consequence: as compute grows, allocate proportionally more to non-vocabulary and less to vocabulary, but never freeze .
- Existing LLMs use insufficient vocabularies relative to their non-vocabulary parameter counts, when assessed under the compute-optimal Chinchilla-token-allocation assumption; the gap is largest for the largest models (e.g. Llama 2 70B: 32K actual vs 212K–231K predicted) [§5, Table 1, Fig. 2].
- Compute-optimal vocabulary is regime-dependent: under undertraining (data-constrained), the optimum drops (e.g. 32K → 24K at 2.8e20 FLOPs), and under overtraining (data-excess, Llama-style), the optimum rises (32K → 43K at 2.3e21 FLOPs) [§5, Table 3, Fig. 7].
- Language-modeling loss depends on the tokenizer’s vocabulary, making it unusable for cross-vocabulary comparison; the paper reformulates a unigram-normalized loss that subtracts the frequency-weighted log-unigram probability, giving a vocabulary-insensitive metric [§2.2, Eq. 4].
- The compression ratio of a BPE tokenizer — bytes per token — is well-approximated by a quadratic in : , fit across with high ; this lets the paper map the more-natural “training characters” axis back onto training tokens for compatibility with prior scaling laws [§2.2, Eq. 3, §A.9].
- Three independently derived approaches — IsoFLOPs power-law fit, derivative of the FLOP-vs-loss curve w.r.t. , and parametric fit of a vocabulary-aware Chinchilla-form loss — agree on the predicted optimal across scales from 3B to 300B parameters [Table 1].
- At 3B parameters and 2.3e21 FLOPs (overtraining regime), switching from 32K to the 43K predicted by Approach 3 improves ARC-Challenge 29.1 → 32.0, ARC-Easy 53.5 → 54.7, Hellaswag 53.0 → 54.1, and the 7-task average 50.3 → 51.6 [Table 2].
Method
Section titled “Method”Three approaches, applied to a joint sweep of 6 non-vocabulary parameter sizes (33M–1.13B), varying from 4K–96K, training on SlimPajama up to 500B characters:
- Approach 1 (IsoFLOPs): For each of a discrete set of compute budgets, train models with different that all hit the same FLOP total; take the minimum-normalized-loss point per bucket; fit , , jointly, enforcing (Chinchilla equal-scaling constraint).
- Approach 2 (Derivative): Rewrite FLOPs as via the compression-ratio fit, then set at fixed loss to solve for the optimal ; scale up from a cheap small-model fit via a power-law extrapolation. Requires no additional runs beyond the small-model calibration.
- Approach 3 (Parametric loss fit): Modify the Chinchilla loss form to be a function of jointly, fit its 6 parameters on the collected runs, then numerically minimize over subject to a FLOPs budget. Uniquely can predict optimal under suboptimal allocations (e.g. overtraining), which the other two approaches cannot.
The unigram-normalized loss in Eq. 4 is the load-bearing methodological choice: without it, a larger mechanically inflates the standard cross-entropy loss (more classes to distribute over), and a fair cross-vocabulary comparison is impossible. The frequency-weighted normalization is empirically shown to correlate tightly with average bits-per-character (BPC), the tokenizer-agnostic compression metric [§A.5].
Verification at 3B parameters trains models under three data regimes: undertraining (FLOPs 2.8e20, data-constrained), compute-optimal (FLOPs 1.2e21), and overtraining (FLOPs 2.3e21, Llama-style), comparing conventional against Approach 3’s prediction per regime.
Results
Section titled “Results”- Predicted vs actual vocabularies for popular LLMs (Approach 1, Chinchilla-optimal data assumption) [Table 1]:
- 3B: 39K predicted (App1) / 43K (App2) / 37K (App3)
- 7B: 62K / 67K / 60K
- 13B: 83K / 91K / 81K
- 30B: 142K / 154K / 142K
- 70B: 212K / 231K / 218K — Llama 2 70B used 32K, i.e. 7× under-provisioned
- 130B: 237K / 258K / 248K
- 300B: 356K / 389K / 383K
- 3B verification at compute-optimal 1.2e21 FLOPs [Table 2]: (0.10B , 67.3B ) → average 47.9 across 7 tasks; (0.11B ) → 48.5 (+0.6).
- 3B verification at overtraining 2.3e21 FLOPs [Table 3]: → 50.3 average; (0.14B , 517.5B ) → 51.6 average — the switch from 32K → 43K is worth ~1.3 points averaged over 7 downstream tasks at matched compute.
- 3B verification at undertraining 2.8e20 FLOPs [Table 3]: → 43.2 average; → 43.9 (+0.7) — under data scarcity, smaller vocabularies win.
- Fit strengths reported: IsoFLOPs power law fits high enough to extrapolate 3× beyond the training range; loss-formula fit yields the same optimal- shape as the two other approaches within a few percent [§4.1, §4.3].
Why it’s interesting
Section titled “Why it’s interesting”Sits directly upstream of Compute Optimal Tokenization, which is filed as the load-bearing modern reference on this question. Tao et al. establish the forward result: given a fixed tokenizer family (BPE, controlled by ), what should you pick? Limisiewicz et al.’s Compute Optimal Tokenization then argue the deeper point that the unit of the scaling law was tokenizer-bound in the first place — bytes, not tokens, is the compute-optimal invariant — and reproduce the Chinchilla 20-tokens-per-parameter rule only at BPE’s particular compression rate. Tao et al.’s Fig. 7 (optimal shifts down under undertraining, up under overtraining) is a direct empirical precursor to the “optimal compression rate decreases with compute” finding in Compute Optimal Tokenization §F2, restricted to the BPE-parametric setting. Complements How to Set the Learning Rate for Large-Scale Pre-training? on the Fitting-paradigm side (extrapolate a closed-form scaling law from cheap runs) — Approach 3 here is a vocabulary-aware Chinchilla-form fit. Sits alongside Over-Tokenized Transformer: Vocabulary is Generally Worth Scaling (posted in the same Slack thread) as the two references establishing that vocabulary matters for scaling — Tao et al. treat jointly for input+output (BPE-style), while Over-Tokenized Transformer: Vocabulary is Generally Worth Scaling argues input and output vocabularies should be decoupled.
See also
Section titled “See also”- Compute Optimal Tokenization — the modern successor: shifts from “optimize ” to “the wrong unit was tokens; use bytes”; posted alongside this paper in the same Slack thread
- Over-Tokenized Transformer: Vocabulary is Generally Worth Scaling — decouples input vs output vocabulary and shows log-linear scaling of input-only vocab; posted in the same thread
- Hyperparameter scaling laws — adds vocabulary size as a scaling-law axis on top of the LR, data, MoE-ratio, and loop-count axes
- Byte-Level Language Models — Tao’s optimal--per-compute is the BPE-parametric shadow of the byte-level thesis
- How to Set the Learning Rate for Large-Scale Pre-training? — Fitting paradigm on the LR axis; Approach 3 here is a vocabulary-aware Chinchilla-form fit in the same spirit