The same small transformer, trained on the same additions, either extends far past its training length or fails soon after it, depending only on how the numbers are cut into tokens, the order the answer is written in, and whether position follows place value. A controlled grid of 16 tokenization × encoding cells, three seeds each, at matched training compute.
How numbers are split into tokens is usually treated as a preprocessing detail. For arithmetic it is not: it decides which algorithm is easy to learn, and whether that algorithm keeps working on numbers longer than any seen in training. This log measures that directly, with everything else held fixed.
Addition problems with operands of up to 10 digits, freshly sampled, 30% of them built to contain long carry chains. Small GPT-style decoders (6 layers, 384 wide, ~10.6M parameters), EMA weights, three seeds per cell. Each tokenization is three independent choices:
Two position encodings: standard (rotary positions stretched by a random factor 1–4 per training sequence) and place-value (half of the rotary pairs driven by each chunk's index within its own number, also stretched, a form of position coupling). Cells are compared at matched training compute (~4.3·1015 FLOPs: 16k steps for k=1, 31k for GPT-2, 33k for k=3, since longer chunks mean shorter sequences). Test tiers: in-distribution (1–10 digits), a gap tier (11–13), and two out-of-distribution tiers (19–21, 24–26).
| tokenization | order | encoding | in-dist | 11–13 | 19–21 | 24–26 |
|---|---|---|---|---|---|---|
| k=1 | reversed | place-value | 1.00 / 1.00 / 1.00 | 1.00 / 1.00 / 1.00 | 1.00 / .99 / 1.00 | 1.00 / .92 / 1.00 |
| k=1 | reversed | standard | 1.00 / 1.00 / 1.00 | .99 / .99 / 1.00 | .07 / .01 / .04 | 0 / 0 / <.01 |
| k=1 | forward | place-value | .97 / .97 / .99 | .82 / .86 / .90 | 0 / .14 / <.01 | 0 / .04 / 0 |
| k=1 | forward | standard | .99 / .99 / .99 | .94 / .94 / .95 | 0 / .01 / <.01 | 0 / 0 / 0 |
| k=3 right-cut | reversed | place-value | 1.00 / 1.00 / 1.00 | 1.00 / 1.00 / 1.00 | 1.00 / .96 / 1.00 | .99 / .93 / 1.00 |
| k=3 right-cut | reversed | standard | 1.00 / 1.00 / 1.00 | .39 / .28 / .26 | 0 / 0 / 0 | 0 / 0 / 0 |
| k=3 right-cut | forward | place-value | .98 / .99 / .98 | .44 / .28 / .32 | <.01 / 0 / <.01 | 0 / 0 / 0 |
| k=3 right-cut | forward | standard | .99 / .99 / .74 | .22 / .25 / .15 | 0 / 0 / 0 | 0 / 0 / 0 |
| k=3 left-cut (GPT-style) | forward | place-value | .98 / .99 / .99 | .03 / .07 / .05 | .01 / 0 / 0 | .01 / <.01 / 0 |
| k=3 left-cut | forward | standard | .99 / .99 / .98 | .24 / .16 / .12 | 0 / 0 / 0 | 0 / 0 / 0 |
| k=3 left-cut | reversed | place-value | 1.00 / .99 / .99 | .31 / .51 / .52 | 0 / 0 / 0 | 0 / 0 / 0 |
| k=3 left-cut | reversed | standard | 1.00 / 1.00 / 1.00 | .01 / .15 / .12 | 0 / 0 / 0 | 0 / 0 / 0 |
| GPT-2 BPE | reversed | place-value | .90 / .89 / .92 | .62 / .65 / .70 | .03 / .06 / .11 | 0 / .01 / .01 |
| GPT-2 BPE | reversed | standard | .92 / .91 / .93 | .20 / .22 / .57 | 0 / 0 / 0 | 0 / 0 / 0 |
| GPT-2 BPE | forward | place-value | .79 / .78 / .80 | .30 / .35 / .36 | 0 / 0 / .01 | 0 / 0 / 0 |
| GPT-2 BPE | forward | standard | .76 / .80 / .77 | .29 / .28 / .25 | 0 / 0 / 0 | 0 / 0 / 0 |
1034567 → [103][45][67]).This matches what Singh & Strouse found in frontier models: forcing GPT-3.5 and GPT-4 to group digits from the right (with commas) made their addition much more accurate, which they trace to alignment between the tokens of the operands and the answer.
| cell | 26 digits | 40 | 50 | 60 |
|---|---|---|---|---|
| k=1 reversed, place-value | 1.00 / .93 / 1.00 | 1.00 / .62 / 1.00 | .80 / .23 / .83 | .38 / .03 / .05 |
| k=3 right-cut reversed, place-value | 1.00 / .90 / .96 | .40 / .41 / .01 | .11 / .01 / 0 | 0 / 0 / 0 |
k=3 reaches fewer digits than k=1, not three times as many. The limit is not sequence length but coverage: the place-value rotation has only seen index differences up to about 4 chunks × the stretch of 4 during training, and reach ends near the edge of what it has seen. Reach depends on tokenization through how many chunks training numbers contain.
A companion log (Why Rotary Embeddings Stop Extrapolating) traced the coverage limit to rotary aliasing and fixed it for k=1: 2D rotary positions (row × column), a fixed multiplicative decay with column distance, and a position-free attention sink took k=1 to 100% at 200 digits on every seed. The same fix, trained from scratch on k=3 at the same compute:
90 random problems per length. Right-cut with the fix: 1.00 / 1.00 / .67 at 60 digits and .99 / 1.00 / .49 at 200 (seeds 0 / 1 / 2), from 0 / 0 / 0 at 60 with index-RoPE. Seed 2's remaining failure is a separate mechanism (dilution of a weak attention sink; see the companion attention log).
Left-cut with the same fix gets .37 / .29 / .51 at 60 digits and .21 / .01 / .16 at 200, more than its zero baseline. Split by problem shape, nearly all of it comes from problems that are mostly copying:
| problem shape | accuracy |
|---|---|
| short operand 1 digit (the answer is mostly a copy of the long operand) | .92 / .20 / .60 |
| short operand L/2 digits | .04 / 0 / .10 |
| both operands L digits (real chunk-by-chunk addition) | 0 / 0 / 0 |
| a carry-out shifts the answer’s chunk boundaries | 0 / 0 / 0 |
So the fix sharpens the first finding rather than changing it. With place-aligned chunks the remaining limit was the position encoding, and fixing it takes k=3 from zero at 60 digits to near-perfect at 200 on two of three seeds. With left-cut chunks the model still cannot add past its training length at all: no position encoding can line up chunks whose boundaries move with each number's length.
The other way to reach further is to train on longer problems. Keeping the place-value encoding and changing only the data (10% of problems with a 20–40 digit operand, warm-started from the 16k-step models):
| model | longest trained | 40 | 60 | 80 | 120 | 160 | 200 | 400 |
|---|---|---|---|---|---|---|---|---|
| baseline (16k steps) | 10 | 1.00 / .67 / 1.00 | .31 / 0 / .02 | .04 / 0 / .01 | 0 / 0 / 0 | 0 / 0 / 0 | 0 / 0 / 0 | 0 / 0 / 0 |
| control (24k, normal data) | 10 | 1.00 / .72 / 1.00 | .01 / 0 / .01 | .02 / 0 / 0 | 0 / 0 / 0 | 0 / 0 / 0 | 0 / – / – | 0 / – / – |
| 10% long problems (24k) | 40 | 1.00 / 1.00 / 1.00 | 1.00 / 1.00 / 1.00 | 1.00 / 1.00 / 1.00 | 1.00 / 1.00 / .98 | 1.00 / .82 / .94 | 0 / .03 / 0 | 0 / 0 / 0 |
Dashed line: 160 digits, four times the longest training length. Means over three seeds.
Long data makes every seed (near-)perfect to 120 digits, but the cliff only moves: from about 40 to about 160 digits, four times the longest training length both times, which is exactly the encoding's random stretch factor. Data extends coverage; it does not teach a mechanism that works beyond it.
Right-cut chunks written units-first make each answer token a local function of one column and a carry, and a model trained on 10 digits can then extend to 200 with the right position encoding. Left-cut chunks, the way GPT-style tokenizers cut numbers, change the rule with every number length, and no position encoding or amount of training length tested here undoes that.