How Vocabulary Size Shapes Overfitting
We compare a run that repeats part of its text 8 times with a run of the same steps on unique tokens, and we call the gap in validation loss the multi-epoch regret. Multi-epoch regret grows with the vocabulary because rare-token embeddings see the same texts every epoch; decoupling text from tokens, by mixing tokenizers or with H-Net, removes most of it. At 300m the 128K Marin tokenizer has a regret of 0.081 bits per byte, its 8K truncation 0.026 and the 256 bytes 0.0003, and the same order holds at 130m and 520m. With windows that hold the same text, the vocabularies from 256 bytes to 4K have 0.02 to 0.03. The regret appears in the low-rate part of training, and much of it falls on tokens that the repeated text rarely holds. A shorter window and more steps leave the Marin tokenizer's regret almost unchanged, and its rare input rows carry about half of its gap to the 8K truncation. No setup we tried removes this regret at 128K. Our two best setups close about half of the gap between its 8-pass and unique-token results (45 and 51 percent, one run each), and the best weight decay lowers the regret to 0.055. With the 128K tokens as chunks and no lookup rows the regret falls to 0.016, and with a new tokenizer for each window on every pass it falls to 0.027, so it takes both a row per token and the same tokens coming back. With a slot for every chunk boundary, the H-Net has 0.026 with no rows at all, and -0.003 without its moving average over chunks, which makes both its losses worse.
我们比较两个步数相同的 run:一个把部分文本重复 8 遍,一个只用不重复 token,并把两者验证损失之差叫作 multi-epoch regret。multi-epoch regret 随词表变大而变大,因为少见 token 的 embedding 每个 epoch 都看到同样的文本;把文本和 token 解耦,无论是混合分词器还是用 H-Net,都能消掉其中大部分。在 300m 上,128K 的 Marin tokenizer 的 regret 是 0.081 比特/字节,它的 8K 版本是 0.026,256 字节词表是 0.0003;130m 和 520m 上的顺序相同。每个窗口装同样的文本时,256 字节到 4K 词表的 regret 是 0.02 到 0.03。regret 出现在训练中学习率较低的阶段,其中很大一部分落在重复文本里很少出现的 token 上。更短的窗口和更多的步数几乎不改变 Marin tokenizer 的 regret;它和 8K 版本的差距约有一半来自少见词自己的输入行。我们试过的设置都没有消除 128K 的 regret。最好的两个设置消掉了它重复 8 遍和不重复 token 结果之差的约一半(45% 和 51%,各一次 run),最好的 weight decay 把 regret 降到 0.055。用 128K 的 token 做块、不用查表行时,regret 降到 0.016;每遍给窗口换分词器时,它降到 0.027。所以这个 regret 同时需要每个 token 有一行和相同的 token 再次出现。给每个块边界都留出 slot 时,H-Net 完全没有查表行,regret 是 0.026;去掉块之间的滑动平均后,regret 降到 -0.003,但不重复 token 和重复 8 遍的损失都变差了。
Setup设置
We start from the MuonH Qwen3 recipe of the Marin speedrun and its Marin tokenizer of 128K tokens. We cut the tokenizer to the first 64K, 32K, 16K or 8K tokens its BPE training learned, and down to the 256 bytes. Each model, at 130m, 300m or 520m, reads the same amount of fineweb-edu-10B text: either unique tokens, or a random part of the text repeated 2.4 or 8 times. We compare Paloma bits per byte, which puts every tokenizer on one scale. We take the result at 8 passes minus the result on unique tokens. We call this difference the multi-epoch regret. The word comes from online learning; here it means a gap in validation loss at the same training step, not a running sum. The runs use this code.
我们从 Marin speedrun 的 MuonH Qwen3 配方和它 128K 个词的 Marin tokenizer 出发,把 tokenizer 截到 BPE 训练最先学到的 64K、32K、16K 或 8K 个词,最小到 256 个字节。每个模型(130m、300m 或 520m)读同样多的 fineweb-edu-10B 文本:要么是不重复 token,要么是其中随机一部分重复 2.4 遍或 8 遍。我们比较 Paloma 的每字节比特数,所有 tokenizer 都在同一个尺度上。我们用重复 8 遍的结果减去不重复 token 的结果。我们把这个差值叫作 multi-epoch regret。regret 这个词来自在线学习,但这里指同一训练步上的验证损失之差,不是累积量。所有 run 使用这份代码。
Details详细说明
The baseline is the MuonH Qwen3 recipe of the Marin speedrun, which covers 130m to 1.2B parameters, with the Marin tokenizer of 128K tokens. We cut the tokenizer to the first 64K, 32K, 16K or 8K tokens its BPE training learned. The smallest vocabulary is the 256 bytes, the tokenizer left with no merges at all. We train each model on the same text of fineweb-edu-10B, either as unique tokens, each seen once, or as a random part of it repeated 2.4 or 8 times. The unique-token run reads part of fineweb-edu-10B at 130m and 300m, and at 520m it reads all of it a little more than once. A smaller vocabulary cuts the same text into more tokens, so its runs take proportionally more steps. Each tokenizer draws its own random repeated part, with the same number of bytes. At 300m and 520m the warmup stays 1000 steps, so it is a smaller share of the longer runs. The input and output tables are untied, so a smaller vocabulary also has fewer parameters: the size names count the Marin tokenizer's model, and at 300m the 8K model has well under half of them. We keep the rest of the model fixed and do not control for this. We compare Paloma bits per byte, the loss in bits divided by the UTF-8 bytes of the text, so tokenizers of different sizes share one scale. The multi-epoch regret of 8 passes is a tokenizer's result at 8 passes minus its result on unique tokens; zero means the repeated text is worth as much as unique text. The runs use this code.
基线是 Marin speedrun 的 MuonH Qwen3 配方,覆盖 130m 到 1.2B 参数,使用 128K 个词的 Marin tokenizer。我们把 tokenizer 截到它的 BPE 训练最先学到的 64K、32K、16K 或 8K 个词。最小的词表是 256 个字节,也就是一个合并都不剩的 tokenizer。我们让每个模型训练 fineweb-edu-10B 里同样的文本:要么是不重复 token,每个 token 只见一次;要么是其中随机的一部分重复 2.4 遍或 8 遍。在 130m 和 300m 上,不重复 token 的 run 只读了 fineweb-edu-10B 的一部分;在 520m 上,它把 fineweb-edu-10B 读了一遍多一点。词表越小,同样的文本被切成越多的词,所以它的 run 按比例多训练一些步。每种 tokenizer 各自随机抽取要重复的那一部分,字节数相同。在 300m 和 520m 上,预热固定为 1000 步,所以在步数更多的 run 里占比更小。输入表和输出表不共享,所以词表越小,参数也越少:规模的名字按 Marin tokenizer 的模型计算,在 300m 上 8K 模型的参数不到它的一半。我们保持模型其余部分不变,没有控制这一点。我们比较 Paloma 的每字节比特数,即以 bit 计的损失除以文本的 UTF-8 字节数,所以不同大小的词表在同一个尺度上比较。重复 8 遍的 multi-epoch regret 是一种 tokenizer 重复 8 遍的结果减去它在不重复 token 上的结果;为零表示重复的文本和不重复的文本一样有用。所有 run 使用这份代码。
Experiments实验
Answered已有结论Does a smaller vocabulary make repeated data hurt less?更小的词表能减轻重复数据的伤害吗?
Yes, when the data repeats many times: at 8 passes each halving of the vocabulary lowers the multi-epoch regret, and with 4096-token windows the byte vocabulary loses almost nothing; with windows that hold the same text it has a regret of 0.018, level with 512 to 4K (Question 20). At 2.4 passes repetition leaves every tokenizer little regret.
是,在数据重复很多次时成立:重复 8 遍时,词表每减半一次,multi-epoch regret 就更小;用 4096 token 的窗口时,字节词表几乎没有损失,换成装下同样文本的窗口后,它的 regret 是 0.018,与 512 到 4K 持平(问题 20)。重复 2.4 遍时,每种 tokenizer 的 regret 都很小。
The MuonH Qwen3 recipe, unchanged: the softmax scores all 128K tokens.MuonH Qwen3 配方,不做改动:softmax 给全部 128K 个词打分。
The Marin tokenizer cut to the first 64K, 32K, 16K or 8K tokens its BPE training learned: the softmax scores fewer tokens, and the same text becomes more tokens.把 Marin tokenizer 截到它的 BPE 训练最先学到的 64K、32K、16K 或 8K 个词:softmax 要打分的词更少,同样的文本被切成更多的词。
Details详细说明
Yes, when the data repeats many times: at 8 passes each halving of the vocabulary lowers the multi-epoch regret; the 64K, 32K and 16K truncations end about level with the Marin tokenizer and the 8K a little behind, while on unique tokens they all trail it. The byte vocabulary loses almost nothing to 8 passes. At 2.4 passes repetition leaves every tokenizer little regret, and the vocabulary size makes no clear difference.
是,在数据重复很多次时成立:重复 8 遍时,词表每减半一次,重复带来的损失就更小;64K、32K 和 16K 版本最终和 Marin tokenizer 大致持平,8K 版本稍差,而在不重复 token 上它们都落后。字节词表重复 8 遍几乎没有损失。重复 2.4 遍时,每种 tokenizer 受的损失都很小,词表大小没有明显影响。
Answered已有结论Does it hold at other model sizes?在其他规模的模型上也成立吗?
Yes: at 130m, 300m and 520m the 8K truncation loses less to 8 passes than the Marin tokenizer, and bytes lose least. The saving is largest at 130m.
是:在 130m、300m 和 520m 上,8K 版本重复 8 遍的损失都比 Marin tokenizer 小,字节最小。省下的损失在 130m 上最大。
Details详细说明
Yes. At 130m, 300m and 520m the 8K truncation loses less to 8 passes than the Marin tokenizer, and the byte vocabulary loses the least of all. The saving of the 8K truncation is largest at 130m and about the same at 300m and 520m, and at 520m the two tokenizers end level at 8 passes.
是。在 130m、300m 和 520m 上,8K 版本重复 8 遍的损失都比 Marin tokenizer 小,字节词表的损失最小。8K 版本省下的损失在 130m 上最大,在 300m 和 520m 上差不多;在 520m 上,两种 tokenizer 重复 8 遍后最终持平。
Answered已有结论Is the trend real?这个趋势是真的吗?
Yes. A second seed moves each tokenizer's multi-epoch regret far less than the gap between the Marin tokenizer and the 8K truncation.
是。换第二个种子,每种 tokenizer 的 multi-epoch regret 变化都远小于 Marin tokenizer 和 8K 版本之间的差距。
Details详细说明
Yes for the gap between the Marin tokenizer and the 8K truncation: with a second seed, each one's multi-epoch regret moves far less than that gap. The first halving, from 128K to 64K at 300m, changes the regret by about as much as the two seeds differ, so that step alone is not resolved. Counting the bytes of each repeated part confirms that both tokenizers repeat the same amount of text.
对 Marin tokenizer 与 8K 版本之间的差距来说是:换第二个种子后,两者的 multi-epoch regret 变化都远小于这个差距。300m 上第一次减半(128K 到 64K)的变化和两个种子之间的差别差不多,单看这一步还不能确定。实际数出的每个重复部分的字节数也确认两种 tokenizer 重复的文本量相同。
Answered已有结论Do the input rows of rare tokens overfit?少见词的输入行会过拟合吗?
Yes. Composing the rare tokens' input rows from their 8K pieces removes about half of the gap in multi-epoch regret to the 8K truncation, and stopping those rows after one pass removes about two fifths.
是。用 8K 片段组合少见词的输入行,去掉与 8K 版本 multi-epoch regret 差距的约一半;第一遍后停止这些行,去掉约五分之二。
Details详细说明
Yes. With each of two seeds, the rare tokens' own input rows carry about half of the gap in multi-epoch regret to the 8K truncation. When every rare input row is the mean of its 8K pieces' rows, the model does worse on unique tokens and about as well at 8 passes, where it still beats the 8K truncation. When the rare input rows learn for one pass and then stop, the regret falls by about two fifths of that gap. That model's result on unique tokens lies between the Marin tokenizer's and the composed model's, and with each of two seeds it ends slightly better than the Marin tokenizer at 8 passes, by less than the composed model's seeds differ.
是。两个种子下,少见词自己的输入行都大约占了与 8K 版本之间 multi-epoch regret 差距的一半。把每个少见词的输入行换成其 8K 片段行的平均后,模型在不重复 token 上变差,重复 8 遍时和原来差不多,仍比 8K 版本好。如果少见词的输入行先学习一遍,然后停止,regret 减少这段差距的大约五分之二。这个模型在不重复 token 上的结果介于 Marin tokenizer 和组合模型之间;两个种子下,它重复 8 遍时都比 Marin tokenizer 稍好,差别小于组合模型两个种子之间的差异。
Answered已有结论Do the output rows of rare tokens overfit?少见词的输出行会过拟合吗?
Partly: the Marin tokenizer's multi-epoch regret peaks where the target is a rare token. Stopping the rare output rows after one pass removes about half of its extra regret over the 8K truncation, and costs some fit on unique tokens.
部分会:目标词是少见词时,Marin tokenizer 的 multi-epoch regret 最高。第一遍后停止少见词的输出行,去掉它比 8K 版本多出的 regret 的约一半,代价是不重复 token 上的一部分拟合。
Output rows built from the 8K pieces, or held at their initial values, cannot fit the data, so in this test the rare output rows learn during the first pass and stop when the repetition starts.
由 8K 片段组成、或固定在初值的输出行拟合不了数据,所以这里少见词的输出行在第一遍正常学习,到重复开始时才停止。
Details详细说明
Partly. The multi-epoch regret of the Marin tokenizer is far highest where the target is a rare token, and the 8K truncation's peak there is much smaller. Two causal tests failed: a model whose rare output rows are built from the 8K pieces' rows, or held at their random initial values, falls far behind the baseline on unique tokens, so its regret says nothing about the rare rows alone. In a third test the rare output rows learn for one pass and then stop. This removes about half of the extra regret that the Marin tokenizer has over the 8K truncation. The model also does worse on unique tokens than the 8K truncation, so the large vocabulary's edge on unique tokens depends on these rows too. When the rows keep learning at a tenth of their step instead, the model keeps more of its result on unique tokens and loses about as much to repetition as the Marin tokenizer, so the slower step keeps part of the fit and none of the lower regret.
部分会。目标词是少见词时,Marin tokenizer 的 multi-epoch regret 远高于其他位置,8K 版本在那里的峰小得多。两个因果检验都没有成功:少见词的输出行由 8K 片段行组成,或者固定在随机初值,模型在不重复 token 上都远远落后于基线,所以它重复数据的 regret 不能单独说明少见词的输出行。第三个检验让少见词的输出行先学习一遍,然后停止。这去掉了 Marin tokenizer 比 8K 版本多出的 regret 的大约一半。这个模型在不重复 token 上也比 8K 版本差,所以大词表在不重复 token 上的优势也依赖这些行。如果这些行改为以十分之一的步长继续学习,模型在不重复 token 上保住得更多,受重复的伤害和 Marin tokenizer 差不多,所以更慢的步长只保住了一部分拟合,没有保住更低的 regret。
We tried the causal test of the input rows on the output side: the model still scores all 128K tokens, and each token's output row is built from the rows of its 8K pieces, so the rare tokens have no output rows of their own. With the mean of the pieces' rows, a token can never score above its best piece, so the model cannot rate ' walking' above ' walk'. With the sum, ' walking' scores ' walk' plus 'ing', which has no such cap. Both models train far worse than the baseline on unique tokens: after 900 steps the sum is still about 0.6 nats per token behind, about as far as the mean. A composed input table costs little by comparison. An output head composed this way cannot fit the data, so we stopped the test there. Holding the rare tokens' output rows at their random initial values fails the same way: after 1000 steps that model is about 0.9 nats per token behind the baseline. In the test below, the rare rows therefore learn during the first pass and stop only when the repetition starts.
我们在输出端也试了上面对输入行做的因果检验:模型仍然给全部 128K 个词打分,而每个词的输出行由它的 8K 片段行组成,所以少见词没有自己的输出行。取片段行的平均时,一个词的分数不会超过它得分最高的片段,所以模型不能认为 ' walking' 比 ' walk' 更可能。求和时,' walking' 的分数等于 ' walk' 加 'ing',没有这个上限。两个模型在不重复 token 上都比基线差很多:训练 900 步后,求和版每个词仍然落后约 0.6 nats,和平均版差不多。相比之下,组合输入表的损失很小。这样组合出来的输出头拟合不了数据,所以我们停止了这个检验。把少见词的输出行固定在随机初值也一样失败:训练 1000 步后,这个模型每个词落后基线约 0.9 nats。所以在下面的检验里,少见词的输出行在第一遍正常学习,到重复开始时才停止。
Answered已有结论Which text does repetition make worse?重复数据让哪些文本变差?
Text unlike the training data, most of all with the Marin tokenizer. On unread text from the training set the multi-epoch regret is much smaller, and a smaller vocabulary has less regret there too.
和训练数据最不像的文本变差最多,用 Marin tokenizer 时最明显。在训练集中没读过的文本上 multi-epoch regret 小得多,词表越小 regret 也越小。
Paloma's text differs from fineweb-edu-10B, so we also score the training data again with each run's final weights, a training re-evaluation curve in the sense of Bergsma et al. 2025. Each sequence is then text the 8-pass run repeated, text only the unique-token run read, or text neither run read.
Paloma 的文本和 fineweb-edu-10B 不同,所以我们还用每个 run 的最终权重把训练数据重新打分,即 Bergsma 等人 2025 所说的训练重评估曲线。每个序列于是属于三类:重复 8 遍的 run 重复过的文本、只有不重复 token 的 run 读过的文本、两者都没读过的文本。
On the text it repeated, the 8-pass model fits better than the unique-token model with every tokenizer, and that gain is memorisation. With bytes it memorises about half as much as with the Marin tokenizer and loses far less on unread text.
在重复过的文本上,每种 tokenizer 下重复 8 遍的模型都比不重复 token 的模型拟合得好,这部分是记忆。用字节时,记住的大约是 Marin tokenizer 的一半,在没读过的文本上损失少得多。
Details详细说明
Text unlike the training data, most of all with the Marin tokenizer. On unread text from the training set, 8 passes have a multi-epoch regret of 0.021 bits per byte with the Marin tokenizer, 0.011 with the 8K truncation and 0.003 with bytes, so a smaller vocabulary has less regret there too. On Paloma the same pairs of runs give 0.077, 0.020 and 0.004. With the Marin tokenizer, social media has about four times as much regret as unread training text, and code fifteen times as much.
和训练数据最不像的文本变差最多,用 Marin tokenizer 时最明显。在训练集中没读过的文本上,重复 8 遍的 multi-epoch regret 是:Marin tokenizer 每字节 0.021 比特,8K 版本 0.011,字节 0.003,所以在这里也是词表越小 regret 越小。同样这几对 run 在 Paloma 上的 regret 是 0.077、0.020 和 0.004。用 Marin tokenizer 时,社交媒体的 regret 约是没读过的训练文本的四倍,代码约是十五倍。
Every multi-epoch regret above is measured on Paloma, and Paloma's text differs from fineweb-edu-10B. So the regret can come from fitting any unseen text worse, or from the kinds of text that Paloma adds. To separate the two, we score the training data again with each run's final weights. Bergsma et al. 2025 call this a training re-evaluation curve, and our page on these curves uses it to study the learning-rate schedule. The 8-pass run reads the first eighth of the unique-token run's shuffled data, eight times. So each sequence is text that the 8-pass run repeated, text that only the unique-token run read, or text that neither run read. For one pair of runs per tokenizer, we score 192 blocks of 128 sequences spread over training and 15 blocks after it, and for the 8K truncation and bytes also a second pair.
上面的 multi-epoch regret 都是在 Paloma 上测的,而 Paloma 的文本和 fineweb-edu-10B 不一样。所以 regret 可能来自模型对所有没见过的文本都拟合得更差,也可能来自 Paloma 多出来的那些文本类型。为了把两者分开,我们用每个 run 的最终权重把训练数据重新打一遍分。Bergsma 等人 2025 把这叫作训练重评估曲线,我们关于这种曲线的页面用它研究学习率调度。重复 8 遍的 run 把不重复 token 的 run 打乱后的数据的前八分之一读 8 遍。所以每个序列属于三类之一:重复 8 遍的 run 重复过的文本,只有不重复 token 的 run 读过的文本,两个 run 都没读过的文本。每种 tokenizer 用一对 run,我们给训练过程中均匀分布的 192 个块和训练之后的 15 个块打分,每块 128 个序列;8K 版本和字节另外再用第二对 run。
On the text it repeated, the 8-pass model beats the unique-token model by 0.045 bits per byte with the Marin tokenizer, 0.032 with the 8K truncation and 0.025 with bytes. The unique-token model read that text once, early in training, and now fits it about as well as text it never read, so the 8-pass model's gain there is memorisation. A second pair of runs gives the 8K truncation the same gain and the same multi-epoch regret. With bytes, the 8-pass model gains about half as much on its repeated text as with the Marin tokenizer, but loses only a seventh as much on unread text with one pair of runs and a third with the other. Grouped by the frequency of the target token, the Marin tokenizer's regret on unread training text again peaks at its rarest targets, but the other nine tenths of the targets carry most of it.
在它重复过的文本上,重复 8 遍的模型比不重复 token 的模型好:Marin tokenizer 每字节好 0.045 比特,8K 版本 0.032,字节 0.025。不重复 token 的模型在训练早期读过这些文本一次,现在拟合它们和拟合从没读过的文本差不多好,所以重复 8 遍的模型在这里的优势是记忆。第二对 run 给出的 8K 版本的收益和 multi-epoch regret 都一样。用字节时,重复 8 遍的模型在重复过的文本上的收益大约是 Marin tokenizer 的一半,在没读过的文本上的损失却只有它的七分之一,另一对 run 是三分之一。按目标词的频率分组时,Marin tokenizer 在没读过的训练文本上的 regret 仍然在最少见的目标词上最高,但大部分 regret 落在其余九成目标词上。
Answered已有结论On which target tokens does the multi-epoch regret fall?multi-epoch regret 落在哪些目标词上?
Mostly on targets that the repeated text holds rarely, and a larger vocabulary writes more of its text with such tokens. That difference in shares accounts for about half of the gap between the Marin tokenizer and the 8K truncation.
主要落在重复文本里很少出现的目标词上,而词表越大,用这类词写成的文本越多。Marin tokenizer 和 8K 版本之间的差距,大约一半来自这个比例的不同。
Here each target token is counted in the repeated eighth of the training text, the only text the 8-pass run reads, so every vocabulary shares one frequency scale.
这里每个目标词按它在训练文本中重复的八分之一里出现的次数计数,这是重复 8 遍的 run 唯一读到的文本,所以所有词表共用同一个频率尺度。
With the Marin tokenizer, the 8-pass model moves probability from its rare tokens to its most common ones; with the 8K truncation it lowers every frequency group alike.
用 Marin tokenizer 时,重复 8 遍的模型把概率从少见词挪到最常见的词上;用 8K 版本时,它对每个频率组的压低差不多。
Details详细说明
Mostly on targets that the repeated text holds rarely, and a larger vocabulary writes more of its text with such tokens. In every vocabulary, a byte of target has more multi-epoch regret the less often its token occurs in the repeated eighth: with the Marin tokenizer 0.28 bits per byte for tokens seen 100 to 1,000 times, 0.085 for 1,000 to 10,000 times and 0.027 for 1 to 10 million times. The Marin tokenizer writes 28% of Paloma's bytes with tokens seen fewer than 10,000 times, the 8K truncation 6% and bytes almost none. Between the Marin tokenizer and the 8K truncation, this difference in shares accounts for about half of the gap; at the same count, from 100 occurrences up, the Marin tokenizer still has up to about twice as much regret per byte.
主要落在重复文本里很少出现的目标词上,而词表越大,用这类词写成的文本越多。在每种词表里,目标词在重复的八分之一里出现得越少,它每字节的 multi-epoch regret 越大:用 Marin tokenizer 时,出现 100 到 1,000 次的词每字节 0.28 比特,1,000 到 10,000 次的 0.085,100 万到 1,000 万次的 0.027。Marin tokenizer 用出现不到 10,000 次的词写成 Paloma 28% 的字节,8K 版本 6%,字节几乎没有。Marin tokenizer 和 8K 版本之间的差距,大约一半来自这个比例的不同;出现次数相同、且至少出现 100 次时,Marin tokenizer 每字节的 regret 仍然最多约是 8K 版本的两倍。
The frequency groups above are deciles within each vocabulary, so they cannot compare two vocabularies at the same frequency. Here we count each target token in the repeated eighth of the training text itself, the only text that the 8-pass run reads. For four pairs of runs at 300m, the Marin tokenizer with seed 1, the 8K truncation with seeds 0 and 1, and bytes with seed 0, we score all of Paloma with both final models and keep the log-probability of every token at every position under both. A byte's count is the sum of the counts of the Marin tokens that contain it.
上面的频率分组是每种词表内部的十分位,所以不能在相同频率下比较两种词表。这里我们直接数每个目标词在训练文本里重复的八分之一中出现的次数,这是重复 8 遍的 run 唯一读到的文本。我们在 300m 上用四对 run:Marin tokenizer 种子 1,8K 版本种子 0 和 1,字节种子 0。两个最终模型都给整个 Paloma 打分,我们保留每个位置上每个词在两个模型下的对数概率。一个字节的出现次数,是包含它的 Marin 词的出现次数之和。
We also asked where the probability goes that the 8-pass model takes from the targets. Averaged over all positions, the 8-pass model with the Marin tokenizer lowers the log-probability of tokens seen 100 to 1,000 times in the repeated eighth by 0.49 nats and raises that of its 8 most common tokens by 0.09. With the 8K truncation it lowers every count group by 0.1 to 0.3 nats, so only the large vocabulary pushes its rare tokens down more than its common ones. Tokens that the training text almost never holds, such as blank lines, tabs, braces and runs of spaces, are untrained in both runs. On code they move the 8K truncation's multi-epoch regret by about 0.07 nats per token between its two seeds, more than its whole regret there.
我们还问了:重复 8 遍的模型从目标词那里拿走的概率去了哪里。对所有位置取平均,用 Marin tokenizer 时,重复 8 遍的模型把在重复的八分之一里出现 100 到 1,000 次的词的对数概率降低 0.49 nats,把它最常见的 8 个词的对数概率提高 0.09。用 8K 版本时,它把每个出现次数组都降低 0.1 到 0.3 nats,所以只有大词表把少见词压得比常见词更低。训练文本里几乎不出现的词,比如空行、制表符、花括号和连续空格,在两个 run 里都没有训练过。在代码上,它们让 8K 版本两个种子的 multi-epoch regret 相差约每词 0.07 nats,比 8K 版本在代码上的全部 regret 还大。
Answered已有结论Does a window of fewer bytes have less multi-epoch regret?覆盖字节更少的上下文窗口,multi-epoch regret 更小吗?
No: for the Marin tokenizer, a window that holds the 8K truncation's bytes has as much multi-epoch regret as the full window. For bytes, a window four times longer keeps the regret far below the Marin tokenizer's.
不会:对 Marin tokenizer,装下 8K 版本字节数的窗口和完整窗口 multi-epoch regret 一样。对字节,长四倍的窗口下 regret 仍远低于 Marin tokenizer。
Details详细说明
Not for the Marin tokenizer. A window that holds about the bytes of the 8K truncation's has as much multi-epoch regret as the full window. Not for the byte vocabulary either: a window four times longer leaves its regret far below the Marin tokenizer's at 130m and 300m, and raises it by no more than two seeds differ.
对 Marin tokenizer 来说不会。一个装下的字节和 8K 版本窗口差不多的窗口,multi-epoch regret 和完整窗口一样。对字节词表也不会:在 130m 和 300m 上,长四倍的窗口下它的 regret 都仍远低于 Marin tokenizer,升高的幅度不超过两个种子之间的差别。
Answered已有结论Do more optimizer steps have less multi-epoch regret?更多的优化步数,multi-epoch regret 更小吗?
Not for the Marin tokenizer: with a third more steps over the same text, its multi-epoch regret of 8 passes barely moves. The 1K truncation does react: with about a third fewer steps (batch 196, about the 8K truncation's step count) its regret falls from 0.029 to 0.017, and it ends worse both on unique tokens (1.4257 against 1.4049) and after 8 passes (1.4428 against 1.4341), with one run.
Marin tokenizer 不会:在同样的文本上多走三分之一的步数,它重复 8 遍的 multi-epoch regret 几乎不变。1K 版本有反应:少走约三分之一的步数(batch 196,步数约等于 8K 版本)后,它的 regret 从 0.029 降到 0.017,不重复 token 的结果(1.4257,原来是 1.4049)和重复 8 遍的结果(1.4428,原来是 1.4341)都变差,这是一次运行的结果。
Answered已有结论Does a smaller vocabulary still help when the model is overtrained?模型过度训练时,更小的词表还能减轻重复的伤害吗?
We could not tell. At 200 tokens per parameter, a second seed moves the 8K truncation's multi-epoch regret by more than the whole range across vocabularies.
分不清。每参数 200 个 token 时,第二个种子挪动 8K 版本 multi-epoch regret 的量,比所有词表之间的整个范围还大。
Details详细说明
We could not tell. With one seed, the multi-epoch regret of 8 passes at 200 tokens per parameter falls as the vocabulary shrinks and goes below zero for the smallest vocabularies. A second seed moves the 8K truncation's regret by more than that whole range, so these runs cannot rank the vocabularies. The mean of the two seeds is lower for the 8K truncation than for the Marin tokenizer, by less than the gap between the 8K truncation's seeds.
分不清。只看一个种子,每参数 200 个 token 时重复 8 遍的 multi-epoch regret 随词表变小而下降,最小的几个词表低于零。第二个种子把 8K 版本的 regret 挪动的量,比所有词表之间的整个差距还大,所以这些 run 排不出词表的先后。两个种子平均后,8K 版本的 regret 比 Marin tokenizer 低;低出的量小于 8K 版本两个种子之间的差距。
Answered已有结论Is it only the parameter count?只是因为参数更少吗?
We could not tell. Rank-48 tables bring the Marin tokenizer's multi-epoch regret close to the 8K truncation's, but they also fit unique tokens worse, so fewer parameters and a weaker fit come together.
分不清。表换成秩 48 后,Marin tokenizer 的 multi-epoch regret 接近 8K 版本,但不重复 token 上也拟合得更差,参数更少和拟合更弱分不开。
Details详细说明
We could not tell. With rank-48 tables the Marin tokenizer loses far less to 8 passes, close to the 8K truncation. It also does worse on unique tokens than the 8K truncation, so the smaller multi-epoch regret may come from fewer parameters or from a weaker fit, and this test cannot separate the two.
分不清。表换成秩 48 后,Marin tokenizer 重复 8 遍的 multi-epoch regret 小了很多,接近 8K 版本。它在不重复 token 上也比 8K 版本差,所以 regret 变小可能来自参数更少,也可能来自拟合更弱,这个实验分不开两者。
Answered已有结论Can a large vocabulary repeat data well?大词表也能抗住重复吗?
Partly: in training only, replacing rare input rows at random by their 8K pieces' mean puts the Marin tokenizer ahead of itself and the 8K truncation at 8 passes. It still loses about twice as much to repetition as the 8K truncation.
部分可以:只在训练时把少见词的输入行随机换成其 8K 片段行的平均,Marin tokenizer 重复 8 遍时就超过不做改动的自己和 8K 版本。它受重复的伤害仍是 8K 版本的两倍左右。
Details详细说明
Partly. At 300m, replacing a rare token's input row at random by the mean of its 8K pieces' rows, in training only, lets the Marin tokenizer end ahead at 8 passes of both the unchanged Marin tokenizer and the 8K truncation, with each of three seeds and by more than seeds differ. It still loses about twice as much to repetition as the 8K truncation, and it does a little worse on unique tokens than the unchanged Marin tokenizer. Replacing only in the repeated passes removes that loss on unique tokens and keeps the lead at 8 passes, with two seeds. With a new order of the repeated part in every pass the lead grows further, with each of three seeds. At 520m the random replacement leads both tokenizers at 8 passes with each of two seeds, by much more than seeds differ.
部分可以。在 300m 上,只在训练时把少见词的输入行随机换成其 8K 片段行的平均,Marin tokenizer 重复 8 遍时同时超过不做改动的 Marin tokenizer 和 8K 版本,三个种子都是如此,领先大于种子之间的差别。它受重复的伤害仍是 8K 版本的两倍左右,在不重复 token 上也比不做改动时略差。只在重复的几遍里替换,就没有了不重复 token 上的这点损失,重复 8 遍的领先仍在,两个种子都是如此。再加上每遍重新打乱,领先还会变大,三个种子都是如此。在 520m 上,随机替换重复 8 遍时领先两种 tokenizer,两个种子都是如此,领先远大于种子之间的差别。
Three setups that stop training the rare tokens from pass 5 on end far worse at 8 passes than the Marin tokenizer with no change, so no figure draws them. Taking away only the loss on rare targets made the model stop predicting those tokens. Freezing their output rows as well did the same more slowly, because the rest of the model still learned to rank those tokens low. Leaving the rare tokens out of the training softmax as well avoided that collapse. Their rows then no longer matched the changing rest of the model, and the loss on Paloma rose.
从第 5 遍起停止训练少见词的三个设置,重复 8 遍的结果都比不做改动的 Marin tokenizer 差很多,所以没有画出。只去掉少见目标词的损失时,模型不再预测这些词。再冻结它们的输出行时,同样的事情发生得更慢,因为模型的其他部分仍然学会了把这些词排得很低。把少见词也移出训练的 softmax 避免了这种塌缩。这时这些行和不断变化的模型其他部分不再匹配,Paloma 上的损失上升了。
Answered已有结论How many passes can the byte vocabulary take?字节词表能承受多少遍重复?
8 passes. Against its unique-token result it has a multi-epoch regret of 0.0041 at 8 passes in this seed, then 0.0511 at 16, 0.2316 at 32, 0.8465 at 64 and 3.8081 at 128, more with every doubling.
8 遍。相对不重复 token 的结果,这个种子在 8 遍时的 multi-epoch regret 是 0.0041,之后 16 遍 0.0511,32 遍 0.2316,64 遍 0.8465,128 遍 3.8081,每翻一倍都更多。
Answered已有结论Why does the byte vocabulary lose almost nothing to repetition?字节词表为什么几乎不受重复的影响?
Its vocabulary is small. With the same text in every window the bytes have a multi-epoch regret of 0.0175, next to 512 to 4K (0.0178 to 0.0279) and far below the Marin tokenizer's 0.0813, and the table parameters set the regret. With 4096-token windows the bytes have a regret of 0.0003. That window gives them 4.74 times the steps and other repeated documents, and these runs cannot separate the two.
因为它的词表小。每个窗口装同样的文本时,字节词表的 multi-epoch regret 是 0.0175,和 512 到 4K(0.0178 到 0.0279)相近,远低于 Marin tokenizer 的 0.0813,而regret 由表的参数量决定。在 4096 token 的窗口下,字节词表的 regret 是 0.0003。这种窗口给它 4.74 倍的步数,重复的文档也不同,这些 run 无法把两者分开。
Answered已有结论Does the multi-epoch regret remain when the model cannot memorise?不让模型背数据时,multi-epoch regret 还剩多少?
Almost all of it. Flooding from the second pass holds the training loss on the repeated text at the fresh-text level. The Marin tokenizer still has a multi-epoch regret of 0.0779 against 0.0823 with no change, and the 32K and 8K truncations have more: 0.0730 against 0.0588, and 0.0355 against 0.0262. So the regret does not come from the training loss on repeated text falling below the fresh-text level. These runs use seed 0.
几乎全部还在。从第 2 遍起用 flooding,把重复文本上的训练损失保持在新文本的水平。Marin tokenizer 的 multi-epoch regret 仍是 0.0779,不改动时是 0.0823;32K 和 8K 版本的 regret 反而更高:0.0730 对 0.0588,0.0355 对 0.0262。所以 regret 不是因为重复文本上的训练损失低于新文本的水平。这些 run 都是种子 0。
Answered已有结论Which change lowers the result after 8 passes most?哪种改动最能降低重复 8 遍的结果?
For the Marin tokenizer, replacing rare input rows by their 8K pieces' mean in training, with a new order every pass and a moving average of the weights; for the truncations, a higher learning rate from pass 2. Only bytes reach their unique-token result.
对 Marin tokenizer,是训练时把少见词的输入行换成 8K 片段行的平均,加每遍重新打乱和权重滑动平均;对截短版本,是从第 2 遍起提高学习率。只有字节达到了不重复 token 的结果。
Answered已有结论When does multi-epoch regret start?multi-epoch regret 在训练哪一段出现?
For the first half of training, 8 passes have almost no multi-epoch regret at any vocabulary; the regret grows as the cosine rate falls (left). The bytes keep this pattern at 32 passes: at 46% of the steps, with each text seen about 15 times, the regret is still -0.02, and it reaches 0.23 only after 75%. A rate that never falls below 0.3 of its peak removes the 8K regret (0.000 with the raw weights) and leaves both runs 0.07 worse; a constant rate with a linear decay over the last 20% cuts the bytes' regret from 0.018 to 0.006, and at 16 passes from 0.068 to 0.026 (right). Noise that starts at pass 5 keeps all of the 128K gain of noise from pass 2 (random input tokens 0.1: -0.017 over two seeds), and at 8K it still hurts.
在训练的前一半,任何词表重复 8 遍几乎都没有 multi-epoch regret;余弦学习率下降时,regret 才变大(左)。字节重复 32 遍时也是这样:到 46% 的步数时,每段文本已看过约 15 次,regret 仍是 -0.02,过了 75% 才升到 0.23。学习率始终不低于峰值的 0.3 时,8K 的 regret 消失(原始权重为 0.000),两条 run 的结果都差 0.07;学习率先不变、最后 20% 线性衰减时,字节的 regret 从 0.018 降到 0.006,重复 16 遍时从 0.068 降到 0.026(右)。从第 5 遍起加的噪声保留了从第 2 遍起加噪声给 128K 的全部收益(随机输入词 0.1:两个种子平均 -0.017),在 8K 上仍然有害。
Answered已有结论Can a large weight decay remove the multi-epoch regret?很大的 weight decay 能消掉 multi-epoch regret 吗?
No. It lowers the multi-epoch regret for the largest vocabulary and does not remove it. At 8 passes with each arm at its best decay the Marin tokenizer has a regret of 0.055, against 0.081 with MuonH. At 16 and 32 passes the best decay ends at 1.4979 and 1.6074, against 1.6583 and 2.1405 with MuonH.
不能。它降低了最大词表的 multi-epoch regret,但没有消掉。重复 8 遍、每种遍数都用自己最好的 decay 时,Marin tokenizer 的 regret 是 0.055,MuonH 是 0.081。重复 16 遍和 32 遍时,最好的 decay 结束于 1.4979 和 1.6074,MuonH 是 1.6583 和 2.1405。
Standard Muon with its usual weight decay of 0.1 matches MuonH on unique tokens and repeats worse: 8 passes end at 1.491, against 1.467 for MuonH. A larger decay helps the repeated runs. The best decay grows from 0.12 on unique tokens to 0.18 at 2 passes and 0.69 at 8 passes (Figure 31). With each number of passes at its own best decay, 8 passes give the Marin tokenizer a multi-epoch regret of 0.055, against 0.081 with MuonH, and the 8K truncation 0.021, about the same as with MuonH. So a large weight decay lowers the regret for the largest vocabulary and does not remove it. For the same amount of text the best decay grows as the passes to the power 0.56 from 1 to 4 passes (best decay 0.25 at 4) and 1.44 from 4 to 16 passes (1.87 at 16), against 1.53 in the fit of Baron et al. (2026). At 32 passes the loss still falls at the largest decay tried, 6.4, so the best decay there lies above it. The best learning rate falls as they predict: at 8 passes it is 0.48 times the best rate on unique tokens, against their 0.44 (Figure 32).
标准 Muon 用它常用的 weight decay 0.1 时,在不重复 token 上和 MuonH 一样,重复时更差:重复 8 遍结束时是 1.491,MuonH 是 1.467。更大的 weight decay 对重复的 run 有帮助。最好的 decay 从不重复 token 的 0.12 增大到 2 遍的 0.18 和 8 遍的 0.69(图 31)。每种遍数都用自己最好的 decay 时,Marin tokenizer 重复 8 遍的 multi-epoch regret 是 0.055,MuonH 是 0.081;8K 版本的 regret 是 0.021,和 MuonH 差不多。所以很大的 weight decay 降低了最大词表的 regret,但没有消掉它。在文本量相同时,最好的 decay 从 1 遍到 4 遍按遍数的 0.56 次方增大(4 遍时最好的 decay 是 0.25),从 4 遍到 16 遍按 1.44 次方增大(16 遍时是 1.87),Baron et al.(2026)的拟合式给出 1.53 次方。32 遍时,损失在试过的最大 decay 6.4 处仍在下降,所以最好的 decay 高于它。最好的学习率按他们的预测下降:重复 8 遍时是不重复 token 最好学习率的 0.48 倍,他们预测 0.44 倍(图 32)。
Answered已有结论Does the multi-epoch regret follow the table parameters or the vocabulary?multi-epoch regret 跟着表的参数量走,还是跟着词表走?
The table parameters. With the Marin tokenizer's tokens, sequences and steps, tables of rank 48, 96, 192 and 384 have multi-epoch regrets of 0.0361, 0.0387, 0.0528 and 0.0740 against 0.0823 for plain tables. Each lands within 0.01 of the truncation with the same table parameters (8K 0.0262, 16K 0.0437, 32K 0.0588, 64K 0.0747). Low-rank tables are no remedy: every rank ends above the plain Marin tokenizer's 1.4651 at 8 passes.
由表的参数量决定。保持 Marin tokenizer 的词、序列和步数,秩 48、96、192、384 的表的 multi-epoch regret 是 0.0361、0.0387、0.0528、0.0740,普通的表是 0.0823。每个秩都落在参数量相同的截短版本的 0.01 以内(8K 0.0262,16K 0.0437,32K 0.0588,64K 0.0747)。低秩的表不是补救办法:重复 8 遍后,每个秩都比普通 Marin tokenizer 的 1.4651 差。
A smaller truncation has smaller embedding tables, so it may lose less to repetition only because it has fewer table parameters to memorise with. Rank-48 tables already bring the Marin tokenizer's multi-epoch regret from 0.0823 to 0.0361, close to the 8K truncation's 0.0262 (Figure 18), but they also fit unique tokens worse. To separate the two, we give the Marin tokenizer input and output tables of rank 96, 192 and 384, which hold as many parameters as the tables of the 16K, 32K and 64K truncations, and keep its tokens, sequences and steps. Each rank runs on unique tokens and at 8 passes with seed 0 (wq w798, w799 and w800). If each rank's regret lands near its matched truncation's (16K 0.0437, 32K 0.0588, 64K 0.0747), the table parameters set the regret; if all ranks stay near the Marin tokenizer's 0.0823, the vocabulary does. The unique-token runs show what each rank costs in fit. Rank 96 ends at 1.4685 on unique tokens and 1.5072 after 8 passes: its regret, 0.0387, sits near the 16K truncation's 0.0437 and far below the Marin tokenizer's 0.0823, but its unique-token result is 0.046 worse than the 16K truncation's 1.4229. Rank 384 ends at 1.3969 and 1.4709: its regret, 0.0740, matches the 64K truncation's 0.0747, and its unique-token result is 0.0057 worse than the 64K truncation's 1.3912. Rank 192 ends at 1.4248 and 1.4776: its regret, 0.0528, sits near the 32K truncation's 0.0588, and its unique-token result is 0.0228 worse than the 32K truncation's 1.4020. All ranks repeat the Marin tokenizer's documents, so the fall from 0.0823 does not come from a new draw. The truncations repeat other documents, and a new window length, which redraws them, moved the regret by up to 0.0167 (same text in every window). So the gaps of 0.0007 to 0.0099 between a rank and its truncation are not a measured difference. At 8 passes the ranks end at 1.5711, 1.5072, 1.4776 and 1.4709, all above the plain Marin tokenizer's 1.4651.
截短越小,embedding 表越小,所以它受重复的伤害更小,可能只是因为能用来背数据的表参数更少。把表换成秩 48 后,Marin tokenizer 的 multi-epoch regret 已经从 0.0823 降到 0.0361,接近 8K 版本的 0.0262(图 18),但它在不重复 token 上也拟合得更差。为了把两者分开,我们给 Marin tokenizer 换上秩 96、192 和 384 的输入表和输出表,参数量分别等于 16K、32K 和 64K 版本的表,词、序列和步数都不变。每个秩跑不重复 token 和重复 8 遍,种子 0(wq w798、w799 和 w800)。如果每个秩的 regret 都接近参数量相同的截短版本(16K 0.0437,32K 0.0588,64K 0.0747),regret 由表的参数量决定;如果所有秩都停在 Marin tokenizer 的 0.0823 附近,regret 由词表决定。不重复 token 的 run 会告诉我们每个秩在拟合上付出多少。秩 96 在不重复 token 上结束于 1.4685,重复 8 遍后结束于 1.5072:它的 regret 0.0387 接近 16K 版本的 0.0437,远低于 Marin tokenizer 的 0.0823,但它在不重复 token 上比 16K 版本的 1.4229 差 0.046。秩 384 结束于 1.3969 和 1.4709:它的 regret 0.0740 与 64K 版本的 0.0747 几乎相同,不重复 token 上比 64K 版本的 1.3912 差 0.0057。秩 192 结束于 1.4248 和 1.4776:它的 regret 0.0528 接近 32K 版本的 0.0588,不重复 token 上比 32K 版本的 1.4020 差 0.0228。所有的秩都重复 Marin tokenizer 的那批文档,所以从 0.0823 下降不是因为换了一批文档。截短版本重复的是另一批文档,而换一种窗口长度会重新抽取这批文档,regret 最多变动 0.0167(每个窗口装同样的文本)。所以秩和截短版本之间 0.0007 到 0.0099 的差距不算测出来的差别。重复 8 遍后,各秩结束于 1.5711、1.5072、1.4776 和 1.4709,都高于普通 Marin tokenizer 的 1.4651。
The over-tokenized model OT-H goes the other way. It keeps the Marin tokenizer's 128K tokens and adds hashed 2- and 3-gram input tables of 12.8M rows each and a second 2-gram output head (wq w755, one run). On unique tokens it ends at 1.3679, below the Marin tokenizer's 1.3822 on the same code generation; after 8 passes it ends at 2.0802 against 1.4704. Its multi-epoch regret of 8 passes is 0.712, against 0.088 for the Marin tokenizer (Figure 34).
过度分词模型 OT-H 走的是相反的方向。它保留 Marin tokenizer 的 128K 个词,另加两张各 1280 万行的哈希 2-gram 和 3-gram 输入表,以及第二个 2-gram 输出头(wq w755,运行一次)。它在不重复 token 上结束于 1.3679,低于同一代代码下 Marin tokenizer 的 1.3822;重复 8 遍后结束于 2.0802,而 Marin tokenizer 是 1.4704。它重复 8 遍的 multi-epoch regret 是 0.712,Marin tokenizer 是 0.088(图 34)。
Answered已有结论How does the multi-epoch regret grow with the number of passes?multi-epoch regret 怎样随重复遍数增长?
A larger vocabulary reaches a given multi-epoch regret after fewer passes: 0.05 at 5.7 passes for the Marin tokenizer, 7.0 for 32K, 11.1 for 8K, 11.3 for 1K and 15.9 for the bytes. These curves alone do not fix R*.
词表越大,multi-epoch regret 越早达到同一水平:regret 到 0.05 时,Marin tokenizer 是 5.7 遍,32K 是 7.0 遍,8K 是 11.1 遍,1K 是 11.3 遍,字节是 15.9 遍。只靠这些曲线定不出 R*。
Data-constrained scaling laws fit how fast repeated text loses its value, with one tokenizer. Muennighoff et al. (2023) call the pass count after which repetition stops paying R*. Our multi-epoch regret at 8 passes grows with the vocabulary, which predicts a smaller R* for a larger vocabulary. The byte vocabulary already has 2.4 to 128 passes (Figure 25). We add 4, 16 and 32 passes for the Marin tokenizer and the 32K and 8K truncations, which have 2.4 and 8, and for the 1K truncation, which has 8 (wq w801 to w807). Every run uses the plain MuonH cosine recipe with seed 0 and is compared with the same vocabulary's unique-token run. At 16 and 32 passes the regret still follows the vocabulary: 0.2755 and 0.7577 for the Marin tokenizer, 0.1786 and 0.5537 for 32K, 0.1047 and 0.3543 for 8K, 0.0850 and 0.288 for 1K, 0.0511 and 0.2316 for the bytes. At 4 passes the Marin tokenizer (0.0291) and 32K (0.0247) already have regret, while 8K (0.0001) and 1K (0.0061) have almost none. The passes above interpolate log regret against log passes between the two finished points around 0.05; at 4096-token windows a smaller vocabulary also takes more steps. With the effective-data form of Muennighoff et al. and a fixed compute budget, R* for the Marin tokenizer moves from 4.6 at a data exponent of 1.0 to above 40,000 at 0.2, and the relative error of the fit stays between 15% and 67%, so R* needs the loss against unique data for each vocabulary, which these runs do not measure.
受数据量约束的 scaling law 拟合的是重复文本价值下降的速度,用的都是同一个 tokenizer。Muennighoff et al.(2023)把重复不再划算之后的遍数记作 R*。我们重复 8 遍的 multi-epoch regret 随词表变大而变大,由此预测词表越大,R* 越小。字节词表已经有 2.4 到 128 遍(图 25)。我们给 Marin tokenizer、32K 和 8K 版本补上 4、16、32 遍(它们已有 2.4 和 8 遍),也给 1K 版本补上这三种遍数(它只有 8 遍)(wq w801 到 w807)。所有 run 都用普通的 MuonH 余弦配方,种子 0,和同一词表的不重复 token run 比较。重复 16 遍和 32 遍时,regret 仍按词表排序:Marin tokenizer 0.2755 和 0.7577,32K 0.1786 和 0.5537,8K 0.1047 和 0.3543,1K 0.0850 和 0.288,字节 0.0511 和 0.2316。重复 4 遍时,Marin tokenizer(0.0291)和 32K(0.0247)已经有 regret,8K(0.0001)和 1K(0.0061)几乎没有 regret。上面的遍数是在 0.05 两侧已完成的两个点之间,按对数 regret 和对数遍数插值得到的;用 4096 token 窗口时,词表越小,步数也越多。用 Muennighoff et al. 的有效数据公式、固定计算量时,Marin tokenizer 的 R* 在数据指数 1.0 时是 4.6,在 0.2 时超过 40,000,拟合的相对误差在 15% 到 67% 之间。所以 R* 还需要每种词表的损失随不重复数据量变化的曲线,这些 run 没有测量这条曲线。
Answered已有结论Does the multi-epoch regret grow smoothly with the vocabulary when every window holds the same text?每个窗口装同样的文本时,multi-epoch regret 是否随词表平滑增长?
Roughly, and the jump at 512 is gone. With the same text in every window the multi-epoch regret stays between 0.0175 and 0.0279 from the byte vocabulary to 4K and rises to 0.0308 at 8K and 0.0813 at the Marin tokenizer. One step goes down: 16K has a regret of 0.0534 and 32K 0.0391. Both runs of a setup repeat the same documents, and a new window length shares only about 9% of them, so differences of up to about 0.017 between setups may come from which documents repeat.
大致平滑,512 处的跳变消失了。每个窗口装同样的文本时,从字节词表到 4K 的 multi-epoch regret 在 0.0175 和 0.0279 之间,之后升到 8K 的 0.0308 和 Marin tokenizer 的 0.0813。有一步是下降的:16K 为 0.0534,32K 为 0.0391。同一设置的两次运行重复同一批文档,换一种窗口长度后只有约 9% 的文档相同,所以不同设置之间最多约 0.017 的差异可能来自哪些文档被重复。
With 4096-token windows the multi-epoch regret of 8 passes jumps from 0.0003 for the byte vocabulary to 0.024 for the 512 truncation and stays near 0.02 up to 8K. A smaller vocabulary writes the same text in more tokens, so a window of 4096 tokens holds less text and the run takes more steps: 54,247 steps for the byte vocabulary, 28,965 for the 512 truncation and 11,443 for the Marin tokenizer. With windows that hold the same text (Question 12) every run takes about 11,444 steps, and the byte vocabulary's regret rises to 0.0175. We now give every vocabulary such a window, 4096 times its token ratio to the Marin tokenizer rounded to 128 (512: 10,368; 1K: 8,576; 2K: 7,296; 4K: 6,400), and a second run to 512 through 64K (wq w848 to w859). If the regret then grows smoothly with the vocabulary, the jump at 512 came from the step count and not from the merged tokens.
用 4096 token 的窗口时,重复 8 遍的 multi-epoch regret 从字节词表的 0.0003 跳到 512 版本的 0.024,之后到 8K 一直在 0.02 左右。词表越小,同样的文本切出的 token 越多,所以 4096 token 的窗口装的文本越少,run 走的步数越多:字节词表走 54,247 步,512 版本走 28,965 步,Marin tokenizer 走 11,443 步。换成装下同样文本的窗口后(问题 12),所有 run 都走约 11,444 步,字节词表的 regret 升到 0.0175。我们现在给每种词表都配上这样的窗口,长度是 4096 乘以它和 Marin tokenizer 的 token 比例,取整到 128 的倍数(512:10,368;1K:8,576;2K:7,296;4K:6,400),并给 512 到 64K 各补一次运行(wq w848 到 w859)。如果这时 regret 随词表平滑增长,512 处的跳变就来自步数,而不是来自合并出来的 token。
Result (exact, two runs per vocabulary, one for the bytes): bytes 0.0175, 512 0.0279, 1K 0.0210, 2K 0.0202, 4K 0.0178, 8K 0.0308, 16K 0.0534, 32K 0.0391, 64K 0.0657 (runs 0.0729 and 0.0585) and the Marin tokenizer 0.0813 (four runs). The bytes now sit with 512 to 4K. This window changes the step count and the repeated documents together, so it does not say which of the two lowers the bytes' multi-epoch regret with 4096-token windows. Above 4K the regret rises, but not monotonically: both 16K runs (0.0534, 0.0535) sit above both 32K runs (0.0387, 0.0395), while with 4096-token windows both 16K runs (0.0436, 0.0344) sit below both 32K runs (0.0589, 0.0528). A new window length redraws the repeated text: the two windows of 16K share 8.8% of their repeated documents and those of 32K 8.7%, about what two independent draws share (the repeated part is about 7.5% of the corpus), while both runs of one setup repeat the same documents (data seed 42), so a second run cannot show this effect. From 512 to 64K the window change moves the regret by -0.0167 to +0.0144 with no common direction. The order of 16K and 32K therefore may come from the draw; a run with a new data seed would test it.
结果(精确计算,每种词表两次运行,字节词表一次):字节 0.0175,512 0.0279,1K 0.0210,2K 0.0202,4K 0.0178,8K 0.0308,16K 0.0534,32K 0.0391,64K 0.0657(两次分别为 0.0729 和 0.0585),Marin tokenizer 0.0813(四次)。字节词表现在和 512 到 4K 落在一起。这种窗口同时改变了步数和被重复的文档,所以它不能说明 4096 token 窗口下字节词表的低 multi-epoch regret 来自两者中的哪一个。4K 以上 regret 上升,但不单调:16K 的两次运行(0.0534、0.0535)都高于 32K 的两次(0.0387、0.0395),而在 4096 token 窗口下,16K 的两次运行(0.0436、0.0344)都低于 32K 的两次(0.0589、0.0528)。换一种窗口长度会重新抽取被重复的文本:16K 的两种窗口有 8.8% 的被重复文档相同,32K 有 8.7%,接近两次独立抽样的重合比例(被重复的部分约占语料的 7.5%);而同一设置的两次运行重复同一批文档(数据种子 42),所以第二次运行看不出这个影响。从 512 到 64K,换窗口让 regret 变化 -0.0167 到 +0.0144,方向不一致。因此 16K 和 32K 的顺序可能来自抽样;换一个数据种子的运行可以检验这一点。
Testing检验中How close can a dynamic tokenizer get to plain bytes at about the Marin tokenizer's compute?动态分词器用接近 Marin tokenizer 的算力,能离纯字节多近?
A one-stage H-Net learns its chunks from the bytes and gives them no lookup rows. Its target is 4.74 bytes per chunk, the Marin tokenizer's average. It reaches 4.0 bytes per chunk on the training text and 3.3 on Paloma, where 45 percent of the windows have more boundaries than the 5,248 main-network slots and 8.3 percent of the bytes fall past the last slot; on the repeated text these shares are 5 percent and 0.2 percent. At about the Marin tokenizer's compute (6.0 hours per run against 4.9), it ends at 1.3733 on unique tokens and 1.4043 after 8 passes, below the Marin tokenizer's 1.3853 and 1.4667, with a multi-epoch regret of 0.031 against 0.081. Plain bytes at the same window end at 1.3477 and 1.3652, with a regret of 0.0175. We run more pairs to find where H-Net's gap to plain bytes comes from (wq w1008, w1010 to w1014): a second seed, less compression, fewer and more byte layers, and chunks of a fixed length with no learned boundaries. The second seed ends at 1.3757 and 1.4047, with a regret of 0.029. A chunk every 5 bytes, with nothing learned in the routing, ends at 1.4063 and 1.4131, with a regret of 0.0068, less than plain bytes. Against the two seeds' mean, the learned boundaries gain 0.032 on unique tokens and 0.009 after 8 passes. The fixed chunks leave no bytes past the last slot and the learned ones do. With a slot for every boundary (w1041, below), seed 0's gains are 0.065 and 0.047.
单阶段 H-Net 直接从字节学出自己的块,不给这些块建查表行。它的目标是每块 4.74 字节,也就是 Marin tokenizer 的平均长度。它实际在训练文本上每块 4.0 字节,在 Paloma 上每块 3.3 字节。Paloma 上 45% 的窗口的边界数超过主网络的 5,248 个 slot,8.3% 的字节落在最后一个 slot 之后;重复文本上这两个比例是 5% 和 0.2%。在接近 Marin tokenizer 的算力下(每个 run 6.0 小时,Marin tokenizer 4.9 小时),它在不重复 token 上的结果是 1.3733,重复 8 遍后是 1.4043,都低于 Marin tokenizer 的 1.3853 和 1.4667;multi-epoch regret 是 0.031,Marin tokenizer 是 0.081。同样窗口的纯字节模型是 1.3477 和 1.3652,regret 是 0.0175。我们再跑几组 run(wq w1008、w1010 到 w1014),找 H-Net 和纯字节之间的差距来自哪里:第二个种子、更小的压缩率、更少和更多的字节层,以及不学边界、长度固定的块。第二个种子的结果是 1.3757 和 1.4047,regret 是 0.029。每 5 字节切一块、路由不学习的一对 run 结果是 1.4063 和 1.4131,regret 是 0.0068,低于纯字节。和两个种子的平均相比,学出来的边界在不重复 token 上好 0.032,重复 8 遍后只好 0.009。固定长度的块没有字节落在最后一个 slot 之后,学出来的块有。给每个边界都留出 slot 后(w1041,见下文),种子 0 的这两个差值是 0.065 和 0.047。
More byte layers close the gap to plain bytes and raise the regret (wq w1013, w1014, rescored with a slot for every boundary by w1177). With 1 + 1, 2 + 2 and 4 + 4 encoder and decoder layers, the pairs end at 1.3748 and 1.3970, 1.3411 and 1.3666, and 1.3039 and 1.3412 with a slot for every boundary, regrets of 0.022, 0.026 and 0.037 (0.019, 0.031 and 0.039 as trained). So the 4 + 4 H-Net ends below plain bytes on unique tokens and after 8 passes, by 0.044 and 0.024, with twice their regret.
加深字节层会缩小和纯字节的差距,同时抬高 regret(wq w1013、w1014,由 w1177 用每个边界都有槽位的设置重新打分)。编码器和解码器各 1、2、4 层时,每个边界都有槽位的结果分别是 1.3748 和 1.3970、1.3411 和 1.3666、1.3039 和 1.3412,regret 为 0.022、0.026 和 0.037(训练时的口径是 0.019、0.031 和 0.039)。所以 4 + 4 层的 H-Net 在不重复 token 上和 8 遍后都低于纯字节,分别低 0.044 和 0.024,regret 是纯字节的两倍。
Less compression gives the best scores (wq w1011, w1012, rescored with a slot for every boundary by w1178). With targets of 2.4, 3.2, 4.74 and 9.5 bytes per chunk, the pairs end at 1.3125 and 1.3343, 1.3205 and 1.3371, 1.3411 and 1.3666, and 1.4096 and 1.4278 with a slot for every boundary, regrets of 0.022, 0.017, 0.026 and 0.018. The two shortest targets end below plain bytes on unique tokens and after 8 passes. The regrets across targets stay within the run-to-run spread of about 0.008, so the chunk length does not set H-Net's regret.
压缩得越少,分数越好(wq w1011、w1012,由 w1178 用每个边界都有槽位的设置重新打分)。目标每块 2.4、3.2、4.74 和 9.5 字节时,每个边界都有槽位的结果分别是 1.3125 和 1.3343、1.3205 和 1.3371、1.3411 和 1.3666、1.4096 和 1.4278,regret 为 0.022、0.017、0.026 和 0.018。最短的两个目标在不重复 token 上和 8 遍后都低于纯字节。各目标的 regret 都在约 0.008 的运行间差异之内,所以块的长度决定不了 H-Net 的 regret。
We also take the H-Net apart, to ask whether the Marin tokenizer's regret comes from its segmentation or from its lookup rows, and why the H-Net's regret sits above that of plain bytes. Six pairs each change one part (wq w1042 to w1047): chunks that open after whitespace, chunks that are the Marin tokenizer's tokens with no lookup rows, a chunker that stops learning after pass 1, routing that only the ratio loss trains, no residual path, and dechunking without the moving average. The Marin tokenizer's boundaries depend on later bytes, so the decoder learns something about the bytes it predicts. For that pair we read the regret and not the level.
我们还把 H-Net 拆开,问两个问题:Marin tokenizer 的 regret 来自切分还是查表行;H-Net 的 regret 为什么高于纯字节。六组 run 各改一个部件(wq w1042 到 w1047):在空白字符之后开块;用 Marin tokenizer 的 token 做块,不用查表行;第 1 遍之后分块器停止学习;路由只由比例损失训练;去掉残差;去块时不用滑动平均。Marin tokenizer 的边界取决于后面的字节,所以解码器能从边界得到一部分要预测的字节的信息。这一组我们只看 regret,不看绝对值。
A separate job (w1041) scores seed 0's pair again from its checkpoints on all 12,931 Paloma windows. With its own boundaries and slots it gives back the logged results (1.3733 and 1.4045). With a slot for every boundary, the same weights end at 1.3411 and 1.3666, a regret of 0.0255. That is below plain bytes' 1.3477 on unique tokens and about equal to their 1.3652 after 8 passes, at about a tenth of their compute (6.0 hours per run against 59.6). Overflow therefore costs 0.032 on unique tokens and 0.038 after 8 passes, and six subsets hold 85 percent of the first number. On programming languages, chunks average 1.9 bytes and 47 percent of the bytes fall past the last slot. With a slot for every boundary the regret stays about 0.008 above plain bytes, and 4 subsets (twitterAAE, 4chan, gab, ptb) hold nearly all of that: 0.030 above plain bytes against 0.0008 on the other 12. On those 4 subsets H-Net is 0.025 below plain bytes on unique tokens and 0.005 above them after 8 passes. The boundary swap tells us less. Each model is much worse with the other's boundaries (0.098 for the unique-token model, 0.075 for the 8-pass model), although the two share 76 percent of their boundaries. So each main network is tuned to its own chunker, and the swap does not split the regret cleanly; w1042 and w1043 test the chunker's share directly. A second job (w1050) repeats these scores. Seed 1 gives back its logged results (1.3755 and 1.4049) and ends at 1.3352 and 1.3610 with a slot for every boundary, a regret of 0.0258. The mean of the two seeds, 1.3381 and 1.3638, is 0.010 below plain bytes on unique tokens and 0.001 below them after 8 passes. The pair without lookahead ends at 1.3450 and 1.3779, a regret of 0.033, and the pair with a target of 9.5 bytes per chunk ends at 1.4096 and 1.4278, a regret of 0.018.
另一个作业(w1041)从 checkpoint 出发,在全部 12,931 个 Paloma 窗口上重新给种子 0 这一对 run 打分。用它们自己的边界和 slot,结果和日志一致(1.3733 和 1.4045)。给每个边界都留出 slot 后,同样的权重得到 1.3411 和 1.3666,regret 是 0.0255。这低于纯字节在不重复 token 上的 1.3477,重复 8 遍后也接近它的 1.3652,而算力约是纯字节的十分之一(每个 run 6.0 小时,纯字节 59.6 小时)。所以溢出在不重复 token 上损失 0.032,重复 8 遍后损失 0.038,前者的 85% 来自 6 个子集。在编程语言子集上,每块平均 1.9 字节,47% 的字节落在最后一个 slot 之后。给每个边界都留出 slot 后,regret 仍比纯字节高约 0.008,几乎都来自 4 个子集(twitterAAE、4chan、gab、ptb):它们比纯字节高 0.030,另外 12 个子集只高 0.0008。在这 4 个子集上,H-Net 不重复 token 的结果比纯字节低 0.025,重复 8 遍后比纯字节高 0.005。互换边界告诉我们的东西较少。用对方的边界时,两个模型都差很多(不重复 token 的模型差 0.098,重复 8 遍的模型差 0.075),尽管两者有 76% 的边界相同。所以每个主网络都适应了自己的分块器,互换不能干净地拆分 regret;w1042 和 w1043 会直接检验分块器的份额。第二个作业(w1050)重复这些打分。种子 1 的结果和日志一致(1.3755 和 1.4049),给每个边界都留出 slot 后是 1.3352 和 1.3610,regret 是 0.0258。两个种子的平均值 1.3381 和 1.3638,在不重复 token 上比纯字节低 0.010,重复 8 遍后比纯字节低 0.001。无前瞻的一对 run 是 1.3450 和 1.3779,regret 是 0.033;目标每块 9.5 字节的一对是 1.4096 和 1.4278,regret 是 0.018。
These chunks are not tokens. We score every Paloma byte with a count model that knows nothing about H-Net (the next byte given the current and previous word, from 381M bytes of fineweb-edu). A chunk's first byte costs that model 4.2 bits on average, its second 2.6 and its fifth 1.4. On the Marin tokenizer's tokens the first byte costs 3.0 and the second 4.9, because many tokens open with a space. So H-Net tends to open a chunk at a hard byte and hands that byte to the main network. On seed 0, 40 percent of its boundaries fall on a Marin token start, and it takes 83,405 distinct chunk strings to cover 90 percent of the repeated text's bytes (134,678 for the 8-pass model), against 14,470 Marin tokens. With a slot for every boundary, its regret is nearly flat over how often the Marin token holding a byte occurs in the repeated text: 0.015 to 0.024 bits per byte from 100 to 10 million occurrences, and about 0.1 below 100 occurrences (4.2 percent of the bytes), the mean of 2 seeds. On the same axis the Marin tokenizer's regret is 0.44 below 100 occurrences, 0.28 from 100 to 1,000, and 0.03 to 0.08 from 1,000 to 10 million.
这些块不是 token。我们用一个与 H-Net 无关的计数模型给 Paloma 的每个字节打分(根据当前词和前一个词预测下一个字节,统计来自 fineweb-edu 的 3.81 亿字节)。对这个模型,块的第一个字节平均花费 4.2 比特,第二个 2.6 比特,第五个 1.4 比特。Marin tokenizer 的 token 上,第一个字节花费 3.0 比特,第二个 4.9 比特,因为很多 token 以空格开头。所以 H-Net 倾向于在难预测的字节上开块,把这个字节交给主网络。种子 0 的边界只有 40% 落在 Marin token 的开头;覆盖重复文本 90% 的字节需要 83,405 种不同的块(重复 8 遍的模型需要 134,678 种),而 Marin token 只要 14,470 种。给每个边界都留出 slot 后,按字节所在 Marin token 在重复文本中出现的次数来看,它的 regret 几乎是平的:出现 100 到 1000 万次时是每字节 0.015 到 0.024 比特,少于 100 次时约 0.1 比特(占 4.2% 的字节),都是 2 个种子的平均。同样的横轴上,Marin tokenizer 少于 100 次时是 0.44,100 到 1,000 次时是 0.28,1,000 到 1000 万次时是 0.03 到 0.08。
The two seeds learn different chunkers and still reach the same scores. On Paloma, 40 percent of seed 0's boundaries fall on a Marin token start and 57 percent of seed 1's. Measured by intersection over union, their unique-token models share 46 percent of their boundaries, while each unique-token model shares 66 to 68 percent with its own 8-pass model. Covering 90 percent of Paloma's bytes takes 75,308 chunk strings on seed 0 and 21,606 on seed 1. Their chunks have the same average length, 3.3 bytes, and their regrets with a slot for every boundary are 0.0255 and 0.0258. So in these two runs the exact segmentation does not set the regret. The subsets do move: on programming languages the regret is 0.030 on seed 0 and 0.081 on seed 1.
两个种子学到的分块器不一样,分数却几乎相同。在 Paloma 上,种子 0 的边界有 40% 落在 Marin token 的开头,种子 1 是 57%。按交并比算,两个种子的不重复 token 模型只有 46% 的边界相同,而每个不重复 token 模型和自己的 8 遍模型有 66% 到 68% 相同。覆盖 Paloma 90% 的字节,种子 0 需要 75,308 种块,种子 1 只要 21,606 种。两者的块平均长度相同,都是 3.3 字节;给每个边界都留出 slot 后,regret 是 0.0255 和 0.0258。所以在这两次运行里,具体的切分方式决定不了 regret。各子集的 regret 则有变化:在编程语言子集上,种子 0 是 0.030,种子 1 是 0.081。
Figure 39 reads the regret byte by byte. A third job (w1058) scores plain bytes and the pair with a chunk every 5 bytes on the same windows, so every byte has a regret under each model. The left panel places each setup by its unique-token score and its regret. At about the same unique-token score, H-Net has less than half the regret of the Marin tokenizer's largest vocabularies. The middle panel repeats the axis of Figure 12. From 1,000 to 10 million occurrences of the Marin token holding a byte, plain bytes and H-Net stay between 0.01 and 0.02 bits per byte, while the Marin tokenizer rises from 0.03 to 0.09, and to 0.28 below 1,000 occurrences. The right panel sorts the bytes by what the count model pays for them. In every model, the harder the byte, the more regret it carries: the 23 percent of bytes that cost the count model at least 4 bits hold 64 percent of plain bytes' regret and 67 and 70 percent of H-Net's.
图 39 逐字节地看 regret。第三个作业(w1058)在相同的窗口上给纯字节和每 5 字节一块的一对 run 打分,所以每个字节在每个模型下都有一个 regret。左栏按不重复 token 的分数和 regret 摆放每个设置。在差不多的不重复 token 分数上,H-Net 的 regret 不到 Marin tokenizer 大词表的一半。中栏沿用图 12 的横轴。字节所在的 Marin token 出现 1,000 到 1000 万次时,纯字节和 H-Net 都在每字节 0.01 到 0.02 比特之间,而 Marin tokenizer 从 0.03 升到 0.09,少于 1,000 次时达到 0.28。右栏按计数模型为字节付出的比特数给字节排序。所有模型都是字节越难,regret 越高:让计数模型付出至少 4 比特的字节占 23%,却占纯字节 regret 的 64%,占 H-Net regret 的 67% 和 70%。
Pooled over all bytes, plain bytes lose 0.015 bits per byte and H-Net with a slot for every boundary loses 0.016 and 0.023, so it sits 0.001 and 0.008 above plain bytes. That excess falls mostly on a chunk's first byte (all of it on seed 0, 64 percent on seed 1) and on those hard bytes (all of it on seed 0, 83 percent on seed 1). Plain bytes also lose twice as much on the same first bytes (0.023 against 0.011 on later bytes), so most of the first-byte regret comes from where H-Net opens its chunks and only the rest from the chunk itself. On later bytes, seed 0 matches plain bytes exactly (0.011). The pair with a chunk every 5 bytes loses only 0.006, and its 8-pass model beats its unique-token model on whitespace (by 0.020) and on programming languages (by 0.015). We do not yet know why.
按全部字节合起来算,纯字节损失每字节 0.015 比特;给每个边界都留出 slot 后,H-Net 损失 0.016 和 0.023,比纯字节高 0.001 和 0.008。这部分差距主要落在块的第一个字节上(种子 0 是全部,种子 1 是 64%),也主要落在上面说的难字节上(种子 0 是全部,种子 1 是 83%)。纯字节在同样这些第一个字节上的损失也是其他字节的两倍(0.023 对 0.011),所以第一个字节的 regret 大部分来自 H-Net 开块的位置,只有余下的部分来自块本身。在其他字节上,种子 0 和纯字节完全一样(0.011)。每 5 字节一块的一对 run 只损失 0.006,而且它的 8 遍模型在空白字符上(好 0.020)和编程语言子集上(好 0.015)比不重复 token 模型还好。我们还不知道原因。
All six ablation pairs have finished. The first answers our question about the Marin tokenizer. With its tokens as chunks and no lookup rows (w1047), the pair ends at 1.3261 and 1.3425, a regret of 0.016. A separate job (w1059) scores it again with a slot for every boundary and gives 1.3247 and 1.3409, the same regret. The Marin tokenizer with its rows has a regret of 0.081 at the same amount of text and the same number of steps, and plain bytes have 0.018. So its segmentation alone leaves about a fifth of its regret, and the rest goes with its lookup rows; this pair also adds the byte encoder, the decoder and the residual path. The orange line in the middle panel of Figure 39 shows this on the same Paloma bytes and the same chunks as the 128K line: from 10 to 100 million occurrences, the regret without rows stays between 0.009 and 0.021 bits per byte, while with rows it rises from 0.016 to 0.44. Below 10 occurrences, on 2.6 percent of the bytes, the pair without rows has a regret of -0.17 bits per byte, and nearly all of that part is on programming languages. We do not know why, and it could come from the boundaries, which depend on later bytes. For the same reason we read this pair's regret and not its level. Its repeated text is also another draw than the 128K run's, with noise of up to about 0.02.
六组消融全部跑完。第一组回答了我们关于 Marin tokenizer 的问题。用它的 token 做块、不用查表行(w1047),这一对 run 的结果是 1.3261 和 1.3425,regret 是 0.016。另一个作业(w1059)给每个边界都留出 slot 后重新打分,结果是 1.3247 和 1.3409,regret 相同。在相同的文本量和步数下,带查表行的 Marin tokenizer 的 regret 是 0.081,纯字节是 0.018。所以它的切分本身只留下约五分之一的 regret,其余跟查表行有关;这一对 run 同时也加上了字节编码器、解码器和残差。图 39 中栏的橙色线在相同的 Paloma 字节和相同的块上显示了这一点:从出现 10 次到 1 亿次,没有查表行时 regret 保持在每字节 0.009 到 0.021 比特之间,有查表行时则从 0.016 升到 0.44。少于 10 次的 token 占字节的 2.6%,这部分没有查表行时的 regret 是每字节 -0.17 比特,而且几乎全部在编程语言子集上。我们还不知道原因,它可能来自边界,因为边界取决于后面的字节。出于同样的原因,这一对 run 我们只看 regret,不看绝对值。它重复的文本也和 128K run 是不同的抽样,抽样噪声最多约 0.02。
With a chunk after every whitespace byte (w1046), no boundary is learned. The pair ends at 1.3583 and 1.3890, a regret of 0.031, and at 1.3564 and 1.3877 with a slot for every boundary. More than half of that regret (56 percent, pooled over all bytes) sits on chunks of a single byte, which hold only 1.9 percent of the bytes. Nearly all of it is on programming languages, where 13.6 percent of the bytes are such chunks, all of them whitespace, and the 8-pass model pays 0.68 nats more on each. The other bytes of that subset show no regret (-0.002 nats). Without the one-byte chunks' part, the pair's regret is about 0.020, close to plain bytes. So chunking bytes does not by itself add much regret. In this pair the excess depends on where the chunks fall in code.
在每个空白字节之后开块(w1046)时,边界完全不用学习。这一对 run 的结果是 1.3583 和 1.3890,regret 是 0.031;给每个边界都留出 slot 后是 1.3564 和 1.3877。这部分 regret 有一半以上(按全部字节合起来算是 56%)落在只有 1 个字节的块上,这些块只占字节的 1.9%。它们的 regret 几乎都在编程语言子集上:这个子集有 13.6% 的字节是这样的块,全部是空白字符,8 遍模型在每个字节上多付 0.68 奈特。这个子集的其他字节没有 regret(-0.002 奈特)。去掉这些单字节块的部分后,这一对 run 的 regret 约为 0.020,接近纯字节。所以把字节分块本身不会增加多少 regret。在这一对 run 里,多出来的部分取决于块在代码中落在哪里。
When the chunker stops learning after pass 1, in both runs of the pair (w1042), the regret stays at 0.029, the same as the two seeds of the chunker that keeps learning (0.031 and 0.029). Both results rise by about 0.05, to 1.4236 and 1.4525. So the chunker's later learning lowers the level and does not set the regret. With a slot for every boundary (w1102) it ends at 1.3827 and 1.4140, a regret of 0.031, and both results stay about 0.05 above the chunker that keeps learning. So overflow does not explain the rise.
第 1 遍后分块器停止学习(一对 run 都如此,w1042)时,regret 保持在 0.029,和继续学习的两个种子(0.031 和 0.029)相同。两个结果都高了约 0.05,分别是 1.4236 和 1.4525。所以分块器后面的学习降低的是分数本身,不决定 regret。给每个边界都留出 slot 后(w1102),它的结果是 1.3827 和 1.4140,regret 是 0.031,两个结果仍然比继续学习的分块器高约 0.05。所以这部分升高不是溢出造成的。
When only the ratio loss trains the routing (w1043), the pair ends at 1.4153 and 1.4242, a regret of 0.009, and at 1.4137 and 1.4242 with a slot for every boundary (w1102), a regret of 0.011. That is below plain bytes' 0.018 and near the pair with a chunk every 5 bytes (0.007). Both results are worse than the learning chunker's, by about 0.04 and 0.02 as trained. Without the task's pull the chunks stop following the text. By intersection over union, its boundaries share 15 and 16 percent with H-Net's two seeds, about the same as a chunk every 5 bytes (14 percent). Only 15 and 16 percent of them fall on a Marin token start, and the pair's two runs share 17 percent with each other, against 66 to 68 percent for H-Net. And p stays near the boundary threshold: on Paloma windows its mean at a boundary is about 0.53, against about 0.85 for H-Net, so the moving average gives the chunks before nearly half of the weight.
只用比例损失训练路由(w1043)时,这一对 run 的结果是 1.4153 和 1.4242,regret 是 0.009;给每个边界都留出 slot 后(w1102)是 1.4137 和 1.4242,regret 是 0.011。这低于纯字节的 0.018,接近每 5 字节一块的一对 run(0.007)。两个结果都比继续学习的分块器差,按训练时的设置分别差约 0.04 和 0.02。没有任务梯度的牵引,块就不再跟着文本走。按交并比算,它的边界和 H-Net 两个种子分别共享 15% 和 16%,和每 5 字节一块(14%)差不多。其中只有 15% 和 16% 落在 Marin token 的开头,这一对 run 彼此也只共享 17%,H-Net 是 66% 到 68%。p 也停在边界阈值附近:在 Paloma 窗口上,边界处 p 的平均值约为 0.53,H-Net 约为 0.85,所以滑动平均把将近一半的权重给了前面的块。
Without the residual path (w1100, w1101), the decoder gets no byte-level input for the bytes of a chunk. The pair ends at 2.9961 and 3.0916, about twice H-Net's score, and its curve is unsteady. This pair shows that the path is needed and says little about regret.
去掉残差(w1100、w1101)后,解码器拿不到块内字节的字节级输入。这一对 run 的结果是 2.9961 和 3.0916,约为 H-Net 的两倍,曲线也不稳定。这一组说明残差不可缺少,但对 regret 说明不了什么。
Without the moving average (w1044, w1102), each chunk's output is its own main-network state. The task gradient still reaches the routing through the straight-through factor, and the chunks stay like H-Net's: 3.2 and 3.4 bytes per chunk, 55 and 59 percent of the boundaries on a Marin token start, and 46 and 51 percent of the boundaries in common with H-Net's two seeds, which share 46 percent with each other. The pair ends at 1.4087 and 1.4154, a regret of 0.007, and at 1.3730 and 1.3703 with a slot for every boundary, a regret of -0.003. H-Net's two seeds have 0.030 as trained and 0.026 with a slot for every boundary, and plain bytes have 0.018. Removing the average costs 0.034 on unique tokens and 0.011 after 8 passes as trained, and 0.035 and 0.007 with a slot for every boundary. So most of what the average adds on unique tokens does not survive 8 passes. The fall does not rest on the noisy subsets: on the 11 subsets other than programming languages, twitterAAE, 4chan, gab and ptb, with a slot for every boundary, the regret is 0.000, against 0.014 and 0.015 for H-Net's seeds and 0.013 for plain bytes. Nor does the run fit its text less: the 8-pass run's training loss sits 0.017 nats per byte below its unique run's, against 0.018 for H-Net. Pooled over all bytes with a slot for every boundary, the regret on a chunk's first byte falls from 0.023 to 0.040 bits to about -0.02, and on later bytes from 0.011 to 0.016 to -0.003. On programming languages and 4chan this pair's 8-pass model beats its unique-token model, by 0.07 and 0.09, and we do not know why.
去掉滑动平均(w1044、w1102)后,每个块的输出就是它自己的主网络状态。任务梯度仍然通过直通因子到达路由,块也和 H-Net 的相近:每块 3.2 和 3.4 字节,55% 和 59% 的边界落在 Marin token 的开头,和 H-Net 两个种子分别共享 46% 和 51% 的边界,而这两个种子彼此也只共享 46%。这一对 run 的结果是 1.4087 和 1.4154,regret 是 0.007;给每个边界都留出 slot 后是 1.3730 和 1.3703,regret 是 -0.003。H-Net 两个种子的 regret 按训练时的设置是 0.030,留出 slot 后是 0.026,纯字节是 0.018。按训练时的设置,去掉滑动平均让不重复 token 的结果差 0.034,重复 8 遍的结果差 0.011;留出 slot 后是 0.035 和 0.007。所以滑动平均在不重复 token 上带来的收益,大部分撑不过 8 遍。这个下降不靠噪声大的子集:除了编程语言、twitterAAE、4chan、gab 和 ptb,其余 11 个子集上,留出 slot 后的 regret 是 0.000,H-Net 两个种子是 0.014 和 0.015,纯字节是 0.013。这也不是因为模型更少拟合文本:8 遍 run 的训练损失比不重复 run 低 0.017 奈特/字节,H-Net 低 0.018。留出 slot 后把全部字节合起来算,块首字节的 regret 从 0.023 到 0.040 比特降到约 -0.02,其他字节从 0.011 到 0.016 降到 -0.003。在编程语言和 4chan 上,这一对 run 的 8 遍模型比不重复 token 模型还好,分别好 0.07 和 0.09,我们还不知道原因。
Together these pairs point to two conditions for H-Net's extra regret: chunks that follow the text, and a moving average that blends them. With both, the regret stays at about 0.03: H-Net, the chunker stopped after pass 1, and the chunker with no lookahead. With no task gradient the chunks no longer follow the text, and the pair looks like a chunk every 5 bytes. Without the average the chunks stay and the regret goes, so that fall does not come from different chunks. Fixed chunks have no blend to remove, since p is 0 or 1: the Marin tokens have 0.016, and chunks after whitespace have 0.031, of which the one-byte chunks in code hold more than half. We have not separated the blend from the task gradient that reaches the chunker through it. A pair that keeps the blend and stops only that gradient (wq w1152, scored by w1153) ends at 1.4066 and 1.4217 as trained, a regret of 0.015, and at 1.3566 and 1.3753 with a slot for every boundary, a regret of 0.019, against H-Net's 0.026 and 0.003 below zero without the average. So with every slot, stopping the gradient changes little and the blend itself carries most of the fall; as trained the order flips, because overflow costs this pair 0.050 on unique tokens against 0.032 for H-Net.
这几组合起来,指向 H-Net 多出来的 regret 需要的两个条件:块跟着文本走,以及滑动平均把块混在一起。两个条件都有时,regret 保持在约 0.03:H-Net、第 1 遍后停止学习的分块器、没有前瞻的分块器都是如此。没有任务梯度时,块不再跟着文本走,这一组就和每 5 字节一块差不多。去掉滑动平均时,块还在,regret 却没了,所以这个下降不是因为块变了。固定的块没有混合可以去掉,因为 p 只有 0 和 1:Marin token 是 0.016,空白之后开块是 0.031,其中一半以上在代码的单字节块上。我们还没有把混合和经由它流向分块器的任务梯度分开。保留混合、只切断这条梯度的一对 run(wq w1152,由 w1153 打分)按训练时的设置是 1.4066 和 1.4217,regret 0.015;每个边界都有槽位时是 1.3566 和 1.3753,regret 0.019,H-Net 是 0.026,去掉滑动平均是 -0.003。所以按每个边界都有槽位的口径,切断梯度变化不大,下降主要来自混合本身;按训练时的口径顺序反过来,因为溢出让这一对在不重复 token 上损失 0.050,H-Net 是 0.032。
One case still breaks the two conditions: chunks after whitespace have no blend and keep 0.031, more than half of it on one-byte whitespace chunks in code. A pair whose chunks open only at a non-whitespace byte after whitespace, so that a run of whitespace joins the chunk before it (wq w1172, scored by w1237; route=word, otherwise as w1046; owner popup 2026-11-05), scores 1.3672 on unique tokens and 1.3932 at 8 passes, a regret of 0.026 with or without a slot for every boundary, since almost no window overflows. The drop from 0.031 sits mostly in the four small subsets (0.037 to 0.023, against 0.022 for plain bytes). Code keeps nearly all of its regret (0.132 to 0.120, against 0.031 for plain bytes) at 10.5 bytes per chunk instead of 4.3, so the one-byte chunks are not the exception. On code, both setups cut at whitespace keep about four times plain bytes' regret, while chunks every 5 bytes (-0.018) and the Marin tokens as chunks (-0.047) keep none; we have not found why.
还有一组和这两个条件对不上:空白之后开块时没有混合,regret 却是 0.031,一半以上在代码的单字节空白块上。另一对 run 只在空白之后的非空白字节开块,连续的空白因此并进前一个块(wq w1172,由 w1237 打分;route=word,其余同 w1046;owner 弹窗 2026-11-05)。它在不重复 token 上是 1.3672,重复 8 遍是 1.3932,regret 0.026;每个边界都有槽位时也一样,因为几乎没有窗口溢出。比 0.031 少的部分主要在 4 个小子集上(0.037 降到 0.023,纯字节是 0.022)。代码的 regret 几乎没变(0.132 降到 0.120,纯字节是 0.031),这时代码里每块 10.5 字节,按空格切时是 4.3 字节,所以单字节块不是这个例外的原因。在代码上,两种按空白切的设置 regret 都约为纯字节的 4 倍;每 5 字节一块(-0.018)和用 Marin token 做块(-0.047)在代码上都没有 regret。原因我们还没有找到。
An independent review of the code (2026-11-05, tmp_plots/vocab/hnet_diag/audit/hnet_impl_review.md) checked the port against goombalab/hnet and found it faithful: routing, chunking, the dechunk EMA, the straight-through factor, the residual, the ratio loss and every ablation flag do what they claim, and no route or flag lets a prediction read a later byte (20 lookahead tests). Four cautions follow. The static slot cap damages the as-trained scores by different amounts per arm, so arms are compared with a slot for every boundary; the cap also acts in training, where 5 to 10 percent of the default's repeated windows overflow. The Marin-token pair's flags carry up to 0.20 bits per byte about later bytes (0.62 on code), and without code its regret is 0.021 against plain bytes' 0.016, so its fifth of the 128K regret is not resolved from plain bytes. One run resolves regret gaps of about 0.008 and more: H-Net's seeds differ by 0.002, plain bytes' seeds at the 4096 window by 0.008, and 128K's four runs span 0.077 to 0.088. The 128K reference reads other text in 4096-token windows, so each share of the 128K regret mixes the draw with the window. Two small bugs change no reported number: Levanter's logged bits per byte is wrong for the Marin-token pair, whose flagged ids index past the byte table (we use the exact tables), and the straight-through factor reads the capped boundaries, so in training the bytes past the last slot push their p the wrong way. The port also differs from the reference in its residual without a bias, MuonH steps for q and k, and attention layers in place of Mamba-2.
一次独立的代码审查(2026-11-05,tmp_plots/vocab/hnet_diag/audit/hnet_impl_review.md)把移植版和 goombalab/hnet 逐项对照,结论是实现忠实:路由、分块、去块时的滑动平均、直通因子、残差、块数损失和每个消融开关都和说明一致,没有哪种路由或开关让预测读到后面的字节(20 个前瞻测试)。有四点需要注意。固定的槽位上限按训练时的口径损伤各组的分数,损伤大小各不相同,所以各组比较用每个边界都有槽位的分数;上限在训练时也起作用,默认设置的重复窗口有 5% 到 10% 溢出。Marin token 那一对的标记最多带有 0.20 比特/字节的后面字节信息(代码上 0.62);去掉代码后它的 regret 是 0.021,纯字节是 0.016,所以“只剩 128K regret 的五分之一”这一点和纯字节分不开。一次运行能分辨的 regret 差距约为 0.008 以上:H-Net 两个种子差 0.002,4096 窗口下纯字节的两个种子差 0.008,128K 的四次运行在 0.077 到 0.088 之间。128K 的参照读的是另一批文本、用 4096 token 的窗口,所以“占 128K regret 的多少”同时混着抽样和窗口的差别。有两个小 bug,都不改变已报告的数字:Marin token 那一对的 Levanter 日志里的比特/字节是错的,因为带标记的 id 超出了字节表(我们用精确的表);直通因子读的是截断后的边界,所以训练时最后一个槽位之后的字节会把自己的 p 往反方向推。移植版和参考实现还有三处不同:残差没有偏置项,q 和 k 用 MuonH 更新,编码器和解码器用注意力层而不是 Mamba-2。
Answered已有结论Should the vocabulary shrink as data repeats?词表应该随数据重复而缩小吗?
Qian Liu asked us whether a single run should use a smaller vocabulary as its data starts to repeat, and proposed two ways to do it. The first (Path 1 in the post) tokenizes each window at one of 128K, 64K, 32K, 16K and 8K, with shares that move toward the small vocabularies over the passes. The second (Path 2) cuts the vocabulary each time the pass count doubles. These vocabularies are nested truncations of the Marin tokenizer, so one table holds them all. To avoid the noise between draws of the repeated text, every run here reads the text of the plain 128K 8-pass run at 300m, and each K has a control on all 8 passes of that text (wq w1065 to w1088). A cut takes the dropped rows out of the softmax and the optimizer. A mixed run keeps every row in the softmax, so after training we can score it at any K by cutting the softmax to that K's rows (w1074).
Qian Liu 向我们提出一个问题:同一个 run 是否应该随数据开始重复而改用更小的词表,并提出了两种做法。第一种(博客里的 Path 1)把每个窗口切成 128K、64K、32K、16K 和 8K 之一,比例随遍数偏向小词表。第二种(Path 2)在遍数每翻一倍时缩小词表。这些词表是 Marin tokenizer 的嵌套截断,所以一张表就能装下。为了避开重复文本不同抽样之间的噪声,这里的每个 run 都读 300m 上普通 128K 8 遍 run 的文本,每个 K 都有一个 8 遍都读这批文本的对照(wq w1065 到 w1088)。缩小词表时,被去掉的行离开 softmax 和优化器。混合的 run 把所有行都留在 softmax 里,所以训练结束后可以把 softmax 限制在某个 K 的行上,在任意 K 上打分(w1074)。
Cutting the vocabulary gains little (Figure 40, upper left). Over two seeds, a cut each time the pass count doubles ends 0.004 below a fixed 32K, less than the 0.008 between the fixed run's own seeds. At 16K it ends 0.016 below, with one seed of the cut, and one late cut after pass 4 gains less at both. The mix gains much more (upper right). With Qian Liu's shares, the eighth pass has no 128K windows, so the run ends 0.045 below the fixed vocabulary at 16K and 0.044 above it at 128K. The same overall shares with no shift (Path 1a in the post) end below the fixed vocabulary at every K, by 0.017 at 128K and 0.050 at 16K, for about 16 percent more token steps than the plain 128K run. Its best scores, about 1.420 at 32K and 16K, are below the best earlier result for any vocabulary from 1K to 128K (1.4251, from a stack of changes at 128K). A fixed 512-token vocabulary and plain bytes still end lower.
缩小词表的收益很小(图 40 左上)。两个种子的平均显示,遍数每翻一倍缩小一次,结果比固定 32K 低 0.004,小于固定 run 两个种子之间的 0.008。在 16K 上它低 0.016,缩小的 run 只有一个种子;第 4 遍后缩小一次,在两个 K 上的收益都更小。混合的收益大得多(右上)。按 Qian Liu 给出的比例,第 8 遍已经没有 128K 窗口,所以这个 run 在 16K 上比固定词表低 0.045,在 128K 上高 0.044。总比例相同、每遍不变的 run(博客里的 Path 1a)在每个 K 上都低于固定词表,128K 上低 0.017,16K 上低 0.050,token 步数比普通 128K run 多约 16%。它的最好分数约为 1.420(32K 和 16K),低于 1K 到 128K 所有词表之前的最好结果(1.4251,来自 128K 上叠加的多项改动)。固定 512 词表和纯字节的结果仍然更低。
The lower left panel asks what in the mix does the work, scored at 16K. The shift does not: the run with no shift ends lowest, and the shift reversed ends 0.014 above it. On 8 times the text (wq w1166, w1167), the shift reversed (Path 1c in the post) has a regret of 0.020 at 8K and 0.027 to 0.032 from 16K to 128K, about the same as the no-shift mix. Drawing the tokenizers again on each pass does: when a window keeps its tokenizer on every pass (Path 1b), so its tokens repeat exactly, the run ends 0.030 higher. Two tokenizers give part of the gain, with or without a large one: half 128K and half 16K, or half 16K and half 8K, end about 0.03 below the fixed vocabulary. The same mix on 8 times the text, with no window twice, ends 0.036 below the fixed vocabulary on unique tokens, so part of the gain at 16K does not depend on repeated data. A mixed run also keeps every row in its softmax and its optimizer step, and a fixed 16K run does not, so this difference may explain part of that gain.
左下栏检验混合里起作用的是什么,都按 16K 打分。比例变化不起作用:比例不变的 run 结果最低,比例反向变化的 run 比它高 0.014。在 8 倍文本上(wq w1166、w1167),比例反向变化的 run(博客里的 Path 1c)regret 在 8K 上是 0.020,从 16K 到 128K 是 0.027 到 0.032,和比例不变的混合差不多。每遍重新抽分词器起作用:窗口每遍保持同一分词器(Path 1b)、token 完全重复时,结果高 0.030。两种分词器就能拿到一部分收益,有没有大词表都一样:128K 和 16K 各一半,或 16K 和 8K 各一半,结果都比固定词表低约 0.03。同样的混合用 8 倍文本、窗口不重复时,结果比固定词表在不重复 token 上的结果低 0.036,所以 16K 上的一部分收益不依赖重复数据。混合 run 还把所有行都留在 softmax 和优化器步骤里,固定 16K 的 run 没有,这个差别可能解释这部分收益的一部分。
Scoring the mix and its run on 8 times the text at each K separates the regret from the level (Figure 41). A fixed vocabulary's regret climbs from 0.024 at 8K to 0.080 at 128K. With a new tokenizer on each pass, the mix's regret stays at 0.02 to 0.03 at every K, and it is 0.027 at 128K. When a window keeps its tokenizer, the regret returns to 0.081 at 128K. So most of the 128K regret comes from seeing the same tokens again, not the same text. With the 128K boundaries and no lookup rows it falls to 0.016 (Figure 39), so this regret takes both a free row per token and the same tokens coming back. We expected the new tokenizers to help mostly on rare tokens. Instead the regret at 128K falls by half or more at every token count (right). Tokens below 1K occurrences hold 9.5 percent of the bytes and about half of the drop in bits.
在每个 K 上比较混合 run 和它的 8 倍文本 run,可以把 regret 和分数本身分开(图 41)。固定词表的 regret 从 8K 的 0.024 升到 128K 的 0.080。每遍换分词器时,混合的 regret 在每个 K 上都是 0.02 到 0.03,128K 上是 0.027。窗口保持同一分词器时,128K 上的 regret 回到 0.081。所以 128K 的 regret 大部分来自再次看到相同的 token,而不是相同的文本。用 128K 的边界、不用查表行时,它降到 0.016(图 39),所以这部分 regret 同时需要每个 token 有一行自由参数和相同的 token 再次出现。我们原来预期新分词器主要帮助少见 token。实际上 128K 的 regret 在每个出现次数上都下降一半以上(右栏)。出现少于 1K 次的 token 占字节的 9.5%,占下降比特数的约一半。
How often a rare token comes back accounts for these regrets (tmp_plots/vocab/blog/token_repeats.py, 2026-11-05). Take a rare token of a window's 128K tokenization (ids 64K and up) and count the passes that read it, averaged over its readings. From the shares, the count is 8 for the fixed 128K (regret 0.080) and for the mix whose windows keep their tokenizer (0.081), 6.6 and 4.5 with 80 and 50 percent of the windows at 128K (0.060 and 0.039), 2.3 for the mix with no shift (0.027) and 2.1 with Qian Liu's shares (0.025). BPE-dropout (Q10) cuts the text again on every pass, but re-encoding 1,500 of its windows seven times with the run's dropout tokenizer keeps 88.5 percent of the rare tokens on each pass (96.9 percent of those below 8K), so its rare tokens come back 7.3 times; it has no unique-token run of its own and ends 0.068 above plain 128K's unique-token score. The regret rises with the count in all seven runs and not with the share of 128K windows: the mix that keeps its tokenizers has 18 percent of its windows at 128K and the regret of the fixed 128K.
少见 token 回来的次数可以解释这些 regret(tmp_plots/vocab/blog/token_repeats.py,2026-11-05)。取一个窗口 128K 切分里的一个少见 token(id 64K 以上),数它在几遍里被读到,按每次读到加权平均。由各 run 的比例算出:固定 128K 和窗口保持分词器的混合是 8(regret 0.080 和 0.081),128K 窗口占 80% 和 50% 时是 6.6 和 4.5(0.060 和 0.039),比例不变的混合是 2.3(0.027),Qian Liu 的比例是 2.1(0.025)。BPE-dropout(Q10)每遍都重新切分文本,但用该 run 的 dropout 分词器把 1,500 个窗口重新编码 7 次,每遍仍保留 88.5% 的少见 token(8K 以下的 token 保留 96.9%),所以它的少见 token 回来 7.3 次。它没有自己的不重复 token run,比普通 128K 在不重复 token 上的分数高 0.068。七个 run 的 regret 都随这个次数上升,而不随 128K 窗口的比例上升:窗口保持分词器的混合只有 18% 的窗口是 128K,regret 却和固定 128K 一样。
This does not yet rescue 128K. On unique tokens the mix's score is about flat over K, 0.036 above the fixed 128K and 0.036 below the fixed 16K (middle). So on 8 passes it gains 0.017 at 128K, against 0.040 for the best earlier setup.
这还没有救回 128K。在不重复 token 上,混合的分数在各个 K 上大致不变,比固定 128K 高 0.036,比固定 16K 低 0.036(中栏)。所以 8 遍时它在 128K 上只低 0.017,之前最好的设置低 0.040。
A larger share of 128K windows trades one cost for the other (Figure 41, left and middle; wq w1119, w1120, w1127, w1128, w1129). At 128K, with 18, 50, 80 and 100 percent of the windows at 128K, the regret is 0.027, 0.039, 0.060 and 0.080, rising with the share, and the score on unique tokens is 1.421, 1.397, 1.384 and 1.385, so the unique-token cost is gone by 80 percent. On 8 passes the same runs end at 1.449, 1.436, 1.443 and 1.465 (Figure 40, lower right). The best share we tried is 50 percent, 0.029 below the fixed 128K, about three quarters of the best earlier setup's 0.040. Using 128K alone on passes 1 to 4 ends at 1.442 (w1121). The mix with the best earlier stack ends at 1.433 with EMA and at 1.430 with plain weights, at a regret of 0.011 and 0.014 (w1122, w1123, w1137), and does not go below that stack's 1.4251. At 16K the same runs end at 1.410 and 1.405, level with a fixed 512-token vocabulary and above plain bytes.
提高 128K 窗口的比例,是拿一种代价换另一种(图 41 左栏和中栏;wq w1119、w1120、w1127、w1128、w1129)。128K 窗口占 18%、50%、80% 和 100% 时,128K 上的 regret 分别是 0.027、0.039、0.060 和 0.080,随比例上升;不重复 token 的分数是 1.421、1.397、1.384 和 1.385,所以到 80% 时不重复 token 上的代价已经没有了。同样这些 run 重复 8 遍的结果是 1.449、1.436、1.443 和 1.465(图 40 右下)。我们试过的比例里 50% 最好,比固定 128K 低 0.029,约为之前最好设置(0.040)的四分之三。第 1 到 4 遍只用 128K 的结果是 1.442(w1121)。混合叠加之前最好的设置,EMA 是 1.433,原权重是 1.430,regret 是 0.011 和 0.014(w1122、w1123、w1137),没有低于那个设置单独的 1.4251。同样这两个 run 在 16K 上是 1.410 和 1.405,和固定 512 词表持平,高于纯字节。
At small K, the gain on unique tokens comes from large tokenizers. On unique tokens at 16K, half 128K and half 16K windows give 1.399, the same as the full mix (w1125). Half 16K and half 8K windows give 1.420 (w1126), and 16K windows alone with every 128K row kept in the softmax and the optimizer step give 1.419 (w1118, w1124), against 1.435 for the fixed 16K. Keeping the unused rows changes the head: at the end of training the used rows' RMS norm is 0.54, against 0.99 for the fixed 16K, and they turn about twice as fast. Two runs test these two properties at 16K on 8 passes (w1138, w1139). Doubling the kept rows' step ends at 1.452, and scaling the head's norm at init by 0.55 ends at 1.451, against 1.470 for the fixed run (mean of 2 seeds) and 1.443 with every row kept. Each gets 60 to 70 percent of the every-row gain, and the remaining 0.009 is about the 0.009 between the fixed run's seeds. The two runs change different things and end level, so this test does not pick one property. With either change the fixed 16K still ends about 0.03 above the mix, so the mix still wins at 16K.
在小的 K 上,不重复 token 上的收益来自大分词器。在不重复 token 上按 16K 打分,128K 和 16K 窗口各一半是 1.399,和完整的混合相同(w1125)。16K 和 8K 窗口各一半是 1.420(w1126);只用 16K 窗口、但在 softmax 和优化器步骤里保留全部 128K 行是 1.419(w1118、w1124),固定 16K 是 1.435。保留用不到的行会改变 head:训练结束时,在用的行的 RMS 范数是 0.54,固定 16K 是 0.99,它们转动的速度也约快一倍。两个 run 在 16K 重复 8 遍上检验这两个性质(w1138、w1139)。把保留行的步长乘以 2,结果是 1.452;把 head 的初始范数乘以 0.55,结果是 1.451;固定 run 是 1.470(2 个种子的平均),保留全部行是 1.443。每个改动都拿到保留全部行收益的 60% 到 70%,剩下的 0.009 约等于固定 run 两个种子之间的 0.009。这两个 run 改的东西不同,结果却相同,所以这个测试选不出一个性质。用了其中任一个改动,固定 16K 仍然比混合高约 0.03,所以混合在 16K 上仍然更好。
Qian Liu's two proposals now have their own regret (wq w1156 to w1158, Figure 41). With the fast shift, the regret is 0.032 at 8K and 0.025 to 0.027 from 16K to 128K, about the same as the no-shift mix from 16K up. On unique tokens the shifting run scores 1.400 at 8K and 16K and 1.484 at 128K, because its last passes have almost no 128K windows. The cut to 32K ends at 1.393 on unique tokens, 0.014 below a fixed 32K, with a regret of 0.056 against the fixed 32K's 0.047. So most of what its 128K passes add on unique tokens is gone after 8 passes.
Qian Liu 的两种做法现在都有了自己的 regret(wq w1156 到 w1158,图 41)。比例快速变化时,regret 在 8K 上是 0.032,从 16K 到 128K 是 0.025 到 0.027;从 16K 起,和比例不变的混合差不多。在不重复 token 上,比例变化的 run 在 8K 和 16K 上是 1.400,在 128K 上是 1.484,因为最后几遍几乎没有 128K 窗口。砍到 32K 的 run 在不重复 token 上是 1.393,比固定 32K 低 0.014;它的 regret 是 0.056,固定 32K 是 0.047。所以它前几遍用 128K 在不重复 token 上带来的收益,重复 8 遍后大多没了。
Takeaways核心结论
We compare a run that repeats part of its text 8 times with a run of the same steps on unique tokens, and we call the gap in validation loss the multi-epoch regret. At 300m the 128K Marin tokenizer has a regret of 0.081 bits per byte, its 8K truncation 0.026 and the 256 bytes 0.0003, and the same order holds at 130m and 520m. With windows that hold the same text, the vocabularies from 256 bytes to 4K have 0.02 to 0.03. The regret appears in the low-rate part of training, and much of it falls on tokens that the repeated text rarely holds. A shorter window and more steps leave the Marin tokenizer's regret almost unchanged, and its rare input rows carry about half of its gap to the 8K truncation. No setup we tried removes this regret at 128K. Our two best setups close about half of the gap between its 8-pass and unique-token results (45 and 51 percent, one run each), and the best weight decay lowers the regret to 0.055. With the 128K tokens as chunks and no lookup rows the regret falls to 0.016, and with a new tokenizer for each window on every pass it falls to 0.027, so it takes both a row per token and the same tokens coming back. With a slot for every chunk boundary, the H-Net has 0.026 with no rows at all, and -0.003 without its moving average over chunks, which makes both its losses worse.
我们比较两个步数相同的 run:一个把部分文本重复 8 遍,一个只用不重复 token,并把两者验证损失之差叫作 multi-epoch regret。在 300m 上,128K 的 Marin tokenizer 的 regret 是 0.081 比特/字节,它的 8K 版本是 0.026,256 字节词表是 0.0003;130m 和 520m 上的顺序相同。每个窗口装同样的文本时,256 字节到 4K 词表的 regret 是 0.02 到 0.03。regret 出现在训练中学习率较低的阶段,其中很大一部分落在重复文本里很少出现的 token 上。更短的窗口和更多的步数几乎不改变 Marin tokenizer 的 regret;它和 8K 版本的差距约有一半来自少见词自己的输入行。我们试过的设置都没有消除 128K 的 regret。最好的两个设置消掉了它重复 8 遍和不重复 token 结果之差的约一半(45% 和 51%,各一次 run),最好的 weight decay 把 regret 降到 0.055。用 128K 的 token 做块、不用查表行时,regret 降到 0.016;每遍给窗口换分词器时,它降到 0.027。所以这个 regret 同时需要每个 token 有一行和相同的 token 再次出现。给每个块边界都留出 slot 时,H-Net 完全没有查表行,regret 是 0.026;去掉块之间的滑动平均后,regret 降到 -0.003,但不重复 token 和重复 8 遍的损失都变差了。
Acknowledgements致谢
The author is pleased to acknowledge that the work reported on in this post was substantially performed using the Princeton Research Computing resources at Princeton University. Princeton Research Computing is a consortium of groups including the Princeton Institute for Computational Science and Engineering (PICSciE) and Research Computing at Princeton University.
本文报告的工作主要使用普林斯顿大学 Princeton Research Computing 的计算资源完成。Princeton Research Computing 是由普林斯顿计算科学与工程研究所(PICSciE)和普林斯顿大学 Research Computing 等团队组成的联合体。
Experiment record实验记录
Citation
@misc{chai2026vocab,
title = {How Vocabulary Size Shapes Overfitting},
author = {Chai, Wenhao},
year = {2026},
howpublished = {Blog post},
url = {https://wenhaochai.com/exps/vocab-overfitting.html}
}