Does a certifiably better tokenizer make a better language model?

ClimbMix, Qwen3 0.6B dense, Megatron-Core on B200. Dual decomposition (dr-tokenization) vs byte-level BPE, everything else held fixed.

Result. No. At matched vocabulary size and matched training data, dual decomposition compresses 2.6% better than greedy BPE, and the language model trained on it is 0.0030 BPB worse, at every one of 12 checkpoints. The deficit persists when the comparison is matched on bytes instead of tokens. Vocabulary size moved BPB about 9x more than the construction method.

Setup

Corpus

ClimbMix (NVIDIA CLIMB, 400B tokens), sampled from the detokenized mirror OptimalScale/ClimbMix at a pinned revision. The release is cluster-sorted: each part_*.jsonl holds one topic cluster (19 clusters, byte shares 0.2% to 22.0%), so a prefix of the parts is one or two topics rather than the mixture. Sampling therefore lays a 16 MiB byte grid over every part, takes blocks in proportion to part size, and shuffles globally.

pool
116.5 GB text, 39.14M docs, 224 shards, 0 failed blocks
held-out
last 4 shards, unseen by both tokenizer and model
tokenizer training
25.00 GiB of characters, byte-identical stream for both arms (same seeded shard shuffle, same document order, same cutoff)
chunk table
5.50B chunk instances, 10.22M types, mean chunk 4.89 bytes

Tokenizers

Both arms: vocabulary built from the same 25 GiB, same pre-tokenizer (digits split individually, then GPT-2 byte-level regex), ChatML specials plus 256 reserved slots, all 256 single bytes for coverage.

BPE control
HuggingFace Rust models.BPE + BpeTrainer, greedy merge sequence, no math upsampling
DD candidate
dual decomposition: minimizes corpus token count + λ·|V| with per-arc prices; unrestricted vocabulary class; max_token_len 16; warm-started from the BPE vocabulary so its primal can only improve on it; exported as HF Unigram with one shared score, which makes Viterbi a min-token-count segmenter (DD's own inference rule)
certificates
every DD vocabulary ships a dual bound, so distance from the optimum of its class is measured, not assumed

Model and recipe

Identical across arms; only the tokenizer and therefore the tokenized corpus differ.

model
Qwen3 dense, hidden 1536, 20 layers, 12 q / 6 kv heads, head_dim 128, intermediate 4096, seq 4096, tied embeddings. 0.617B at vocab 64000; 0.530B at vocab 6912
optimizer
Muon, 8-way layer-wise sharded, AdamW for scalars
precision
bf16 parameters, MXFP8 compute, TE cuDNN attention
schedule
WSD: warmup 500, cosine cooloff over the last 15%, LR 7e-4 to 7e-5
budget
mbs 8, GBS 512 x seq 4096 = 2.097M tokens/iter, 6000 iters = 12.6B tokens (~20 tokens/param)
throughput
537 to 560 TFLOP/s/GPU; 2.5 h on 8 B200, 4.9 h on 4 B200 (same cost per iteration)
metric
BPB, bits per byte of the same held-out text. Comparable across vocabularies; per-token loss and perplexity are not

Experiment 1: compression vs vocabulary size

DD at a λ ladder on the 25 GiB chunk table, then BPE trained at the exact sizes DD landed on, both scored on 12,000 held-out documents (46 MB). H0 = order-0 (context-free) entropy of the emitted token stream per byte; it is a property of the token IDs, not of the tokenizer's model class.

K (multi-byte)DD bytes/tokBPE bytes/tokDD better byDD H0/byteBPE H0/byteH0 better byDD certified gap
6,3313.83803.7416+2.58%2.66622.7154+1.81%2.43%
14,8924.30214.2297+1.71%2.44202.4779+1.45%1.15%
32,0294.60394.5531+1.12%2.30072.3257+1.07%0.44%
64,6044.77144.7417+0.63%2.21972.2346+0.67%0.17%
132,3974.86154.8468+0.30%2.17302.1808+0.36%0.07%
bytes/tokenH0 bits/byte
+0.0% +0.7% +1.4% +2.1% +2.8% 6,331 14,892 32,029 64,604 132,397 6,331 14,892 32,029 64,604 132,397 vocabulary size K (log scale) bytes/token H0
DD beats BPE at every size on both metrics, and the margin grows as the vocabulary shrinks: fewer slots make the choice of vocabulary matter more. DD's own certified gap widens the same way (0.17% to 2.43%), so where its bound loosens is also where it gains most.

At K=64,604 the two produce token-for-token identical segmentations on ordinary prose, and only 74.7% of DD's entries appear in BPE's: they differ in the tail, not the common case. DD's extra entries are long whole words ( unconditionally, cerebrovascular) that greedy merging never forms.

The language-model arms therefore run at K=6,331, where the gap is largest (+2.58% bytes/token) and any effect is most detectable. A null at maximum signal is a stronger null than a null at 64k.

Experiment 1b: the same curve with 4x the tokenizer training data

Both methods retrained on 100 GiB of characters instead of 25 GiB (same pool, same pre-tokenizer, same recipe), scored on the same held-out shards. This separates "how much text the tokenizer saw" from "how the vocabulary was built".

K (multi-byte)DD bytes/tokBPE bytes/tokDD better byDD H0/byteBPE H0/byteH0 better byDD certified gap
6,3273.84013.7377+2.74%2.66452.7206+2.06%2.40%
14,9484.30594.2275+1.85%2.44062.4797+1.58%1.13%
32,1554.60614.5527+1.17%2.30002.3260+1.12%0.44%
65,0314.77334.7414+0.67%2.21882.2350+0.72%0.17%
126,6304.85824.8427+0.32%2.17482.1831+0.38%0.07%
25 GiB training set100 GiB training set
+0.0% +0.8% +1.5% +2.3% +3.0% 6,327 6,331 14,892 14,948 32,029 32,155 64,604 65,031 126,630 132,397 vocabulary size K (log scale) 25 GiB 100 GiB
DD's compression advantage over BPE at each vocabulary size, for both tokenizer training-set sizes.

Effect of tokenizer training-set size on each method

K (25 / 100 GiB)BPE 25 GiBBPE 100 GiBBPE changeDD 25 GiBDD 100 GiBDD change
6,3313.74163.7377-0.11%3.83803.8401+0.05%
14,8924.22974.2275-0.05%4.30214.3059+0.09%
32,0294.55314.5527-0.01%4.60394.6061+0.05%
64,6044.74174.7414-0.01%4.77144.7733+0.04%

Positive means more tokenizer training data packed more bytes per token.

Experiment 2: two language models at matched K

vocabulary
6849 entries in both (6331 learned + 256 bytes + 262 specials); model vocab_size 6912, with the same 63 unused rows in each arm
corpus
same 220-shard text pool, tokenized twice. DD 30,107,772,932 tokens vs BPE 30,730,599,716 for identical text, so BPE needs 2.07% more tokens
consumed at 6000 iters
DD 47.8 GB of text, BPE 46.8 GB (equal tokens means unequal bytes)
iterBPE BPBDD BPBΔBPBBPE pplDD pplΔppl
5001.01221.0150+0.002813.8215.05+8.90%
1,0000.90540.9093+0.003910.4711.35+8.40%
1,5000.86960.8733+0.00379.5510.31+7.96%
2,0000.84950.8531+0.00369.069.77+7.84%
2,5000.83670.8399+0.00328.769.43+7.65%
3,0000.82710.8302+0.00318.559.19+7.49%
3,5000.81900.8218+0.00288.378.98+7.29%
4,0000.81230.8155+0.00328.238.83+7.29%
4,5000.80850.8105+0.00208.158.72+6.99%
5,0000.80310.8060+0.00298.038.61+7.22%
5,5000.79220.7953+0.00317.818.37+7.17%
6,0000.77700.7789+0.00197.518.01+6.66%

Mean over all 12 checkpoints: +0.0030 BPB (sd 0.0006), DD worse at every point. The curves are parallel: the gap appears by iter 500 and narrows slightly to +0.0019 by the end, so this is a level shift, not a convergence-rate difference.

BPE, K=6,331DD, K=6,331BPE, K=63,482
0.729 0.808 0.887 0.967 1.046 500 1,500 2,500 3,500 4,500 5,500 training iteration BPE 6.3k DD 6.3k BPE 64k
BPB on held-out ClimbMix bytes. The two K=6,331 arms are nearly superimposed; the 64k-vocabulary run sits well below both. The drop after iter 5100 is the WSD cooloff.

Reading the result

Perplexity disagrees with BPB, and BPB is the one to trust

DD's held-out perplexity is 6.66% worse while its BPB is 0.24% worse. The per-token loss ratio factorizes exactly:

factorvaluemeaning
per-token loss ratio DD/BPE1.03235what perplexity reports
bytes/token ratio1.02983DD's compression advantage
BPB ratio1.00245the only quality term

Each DD token spans more text and is intrinsically harder to predict, so perplexity penalizes DD for compressing better. BPB divides that factor out.

Not a data-rate artifact

At equal tokens DD has seen 2.07% more text, which should have helped it. Matching on bytes instead (interpolating the BPE curve to DD's byte count in the peak-LR region) makes DD look worse, not better:

comparisonDD BPBBPE BPB at equal bytesΔ
DD iter 2,000 vs BPE iter 2,0410.85310.8484+0.0047
DD iter 3,000 vs BPE iter 3,0620.83020.8261+0.0041
DD iter 4,000 vs BPE iter 4,0830.81550.8117+0.0038

So BPE wins at matched compute (equal tokens) and by more at matched data (equal bytes).

H0 pointed the wrong way

The context-free statistic favored DD by 1.81% at this K, and the trained models put DD 0.24% behind. DD's long whole-word tokens are cheap to encode and cheap to predict without context; with context, the model does relatively better on BPE's more compositional pieces. Minimizing token count is not minimizing what a language model has to model, and neither compression nor order-0 entropy predicted the sign.

Size dominates method

changeΔBPB at iter 6000
vocabulary 6,849 → 64,000 (BPE both)-0.0172
construction greedy → certified-optimal (K fixed)+0.0019

Choosing the vocabulary size mattered about 9x more than choosing how the vocabulary is built.

Limit of the evidence. One run per arm. The sd 0.0006 above is consistency across checkpoints of the same two runs, not seed-to-seed variation, which on this stack is roughly 0.002 to 0.005 BPB. The mean effect (0.0030) sits inside that band. The supportable claim is that DD's compression advantage produced no BPB improvement, and if anything a small regression, not a precise -0.003. Resolving the sign would need 2 to 3 seeds per arm.

Where the DD tokenizer is still worth something

2.07% fewer tokens for the same text is 2.07% fewer decode steps and a 2.07% shorter KV cache per byte generated, for 0.24% worse BPB. That trade is a serving-cost question, not a quality one. The mechanism also predicts that the deficit should shrink with model capacity, since fewer, longer tokens mean less compute spent per byte; testing that needs the same pair at another model size.