<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>SuperBPE: Space Travel for Language Models</title></titleStmt>
			<publicationStmt>
				<publisher>https://doi.org/10.48550/arXiv.2503.13423</publisher>
				<date>04/14/2025</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10631158</idno>
					<idno type="doi"></idno>
					
					<author>A Liu</author><author>J Hayase</author><author>V Hofmann</author><author>S Oh</author><author>N A Smith</author><author>Y Choi</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[The assumption across nearly all language model (LM) tokenization schemes is that tokens should be subwords, i.e., contained within word boundaries. While providing a seemingly reasonable inductive bias, is this common practice limiting the potential of modern LMs? Whitespace is not a reliable delimiter of meaning, as evidenced by multi-word expressions (e.g., "by the way"), crosslingual variation in the number of words needed to express a concept (e.g., "spacesuit helmet" in German is "raumanzughelm"), and languages that do not use whitespace at all (e.g., Chinese). To explore the potential of tokenization beyond subwords, we introduce a "superword" tokenizer, SuperBPE, which incorporates a simple pretokenization curriculum into the byte-pair encoding (BPE) algorithm to first learn subwords, then superwords that bridge whitespace. This brings dramatic improvements in encoding efficiency: when fixing the vocabulary size to 200k, SuperBPE encodes a fixed piece of text with up to 33% fewer tokens than BPE on average. In experiments, we pretrain 8B transformer LMs from scratch while fixing the model size, vocabulary size, and train compute, varying *only* the algorithm for learning the vocabulary. Our model trained with SuperBPE achieves an average +4.0% absolute improvement over the BPE baseline across 30 downstream tasks (including +8.2% on MMLU), while simultaneously requiring 27% less compute at inference time. In analysis, we find that SuperBPE results in segmentations of text that are more uniform in per-token difficulty. Qualitatively, this may be because SuperBPE tokens often capture common multi-word expressions that function semantically as a single unit. SuperBPE is a straightforward, local modification to tokenization that improves both encoding efficiency and downstream performance, yielding better language models overall.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Tokenizers are the lens through which language models (LMs) view data: they segment a stream of bytes into a sequence of tokens in the LM vocabulary. In the era of transformer LMs, tokenization is done at the level of subwords, meaning that tokens consist of parts of words (including complete words), but cannot bridge whitespace. Intuitively, subword tokens capture meaningful and composable semantic units.</p><p>While seemingly reasonable, is this common practice a good one? Whitespace is an unreliable delimiter of meaning <ref type="bibr">(Martin, 2017)</ref>-many groups of words (e.g., a lot of or search engine) function semantically as single units, and English speakers store thousands of such multi-word expressions in their mental lexicon <ref type="bibr">(Church, 2011;</ref><ref type="bibr">Contreras Kallens &amp; Christiansen, 2022)</ref>. Crosslingually, there is considerable variation in whether a given meaning is conveyed by a single word or several words. At the extreme, languages such as Chinese and Japanese do not use whitespace at all, so that tokens in these languages can span multiple words or even entire sentences (e.g., in the tokenizers of <ref type="bibr">GPT-4O [OpenAI, 2024]</ref> or DEEPSEEKV3 <ref type="bibr">[DeepSeek-AI et al., 2025]</ref>), yet this has seemingly not hindered LMs from Bytes per token ( ) BPE BPE w/o pretok SuperBPE BPE upper bound In the above text with 40 bytes, SuperBPE uses 7 tokens and BPE uses 13, so the methods' efficiencies are 40/7 = 5.7 and 40/13 = 3.1 bytes-per-token, respectively. In the graph, the encoding efficiency of BPE plateaus early due to exhausting the valuable whitespacedelimited words in the training data. In fact, it is bounded above by the gray dotted line, which shows the maximum achievable encoding efficiency with BPE, if every whitespacedelimited word were in the vocabulary. On the other hand, SuperBPE has dramatically better encoding efficiency that continues to improve with increased vocabulary size, as it can continue to add common word sequences to treat as tokens to the vocabulary. The different gradient lines show different transition points from learning subword to superword tokens, which always gives an immediate improvement. SuperBPE also has better encoding efficiency than a naive variant of BPE that does not use whitespace pretokenization at all. performing well on these languages. Including multi-word tokens promises to be beneficial in several ways: it can lead to shorter token sequences, lowering the computational costs of LM training and inference, and may also offer representational advantages by segmenting text into more semantically cohesive units <ref type="bibr">(Salehi et al., 2015;</ref><ref type="bibr">Otani et al., 2020;</ref><ref type="bibr">Hofmann et al., 2021)</ref>.</p><p>In this work, we introduce a superword tokenization algorithm that produces a vocabulary of both subword and "superword" tokens, which we use to refer to tokens that bridge more than one word. Our method, SuperBPE, introduces a pretokenization curriculum to the popular byte-pair encoding (BPE) algorithm <ref type="bibr">(Sennrich et al., 2016)</ref>: whitespace pretokenization is initially used to enforce learning of subword tokens only (as done in conventional BPE), but is disabled in a second stage, where the tokenizer transitions to learning superword tokens. Notably, SuperBPE tokenizers scale much better with vocabulary size-while BPE quickly hits a point of diminishing returns and begins adding increasingly rare subwords to the vocabulary, SuperBPE can continue to discover common word sequences to treat as single tokens and improve encoding efficiency (see Figure <ref type="figure">1</ref>).</p><p>In our main experiments, we pretrain English LMs at 8B scale from scratch. When fixing the model size, vocabulary size, and training compute-varying only the algorithm for learning the vocabulary-we find that models trained with SuperBPE tokenizers consistently and significantly improve over counterparts trained with a BPE tokenizer, while also being 27-33% more efficient at inference time. Our best SuperBPE model achieves an average +4.0%</p><p>After pretokenization, the iterative learning algorithm begins. The training text is first split into bytes; the starting vocabulary is the set of all bytes. Then, the frequencies of all pairs of neighboring tokens are recorded, and the most frequent pair is merged into a single, new token at every position in the text where it occurs. The newly merged token is added to the vocabulary. For instance, if the merge is (t, he), then all instances of the token sequence [t, he] will be replaced with the, which is added to the vocabulary. The token pair frequencies are then updated, and the next most frequent pair is again merged into a new token. This continues until vocabulary reaches the target size T.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">SuperBPE tokenization</head><p>SuperBPE introduces a simple intervention on the pretokenization step, separating tokenizer training into two discrete phases so that the tokenizer first learns subwords (by using pretokenization to prevent merges across whitespace) and then superwords (by lifting this restriction). Stage 1 is equivalent to regular BPE training and continues up to a certain vocabulary size t, which we call the transition point (t &lt; T). In stage 2, tokenizer training resumes from the vocabulary learned so far, but this time whitespace pretokenization is skipped. As a result, token pairs bridging whitespace are considered, making it possible for superwords to be added to the vocabulary. Intuitively, we wish for our tokenizer to first learn base units of semantic meaning, then combine these units into common sequences for a much more efficient vocabulary. Note that t = T corresponds to BPE, and t = 0 corresponds to a naive revision of BPE that foregoes whitespace pretokenization at any point in training. We note that training tokenizers requires more system memory and CPU time when done without whitespace pretokenization (as in stage 2 of SuperBPE). This is because the training data is typically represented by a dictionary of "words" along with their counts. With whitespace pretokenization, the "words" are whitespace-separated chunks (e.g., common words) stored once alongside a large count, granting substantial savings in memory. Without whitespace pretokenization, the "words" are extremely long (e.g., entire training documents), leading to minimal deduplication of the text and excessively large dictionaries. Fortunately, tokenizer training must be done only once; in our experiments, SuperBPE tokenizers train in a few hours on 100 CPUs, a negligible cost compared to LLM pretraining.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3">Encoding efficiency</head><p>A tokenizer's encoding efficiency can be measured in bytes-per-token, i.e., how many UTF-8 bytes are encoded, on average, in each token over a large corpus of text (see calculation in Figure <ref type="figure">1</ref>). We train a series of tokenizers on a 10 GB subset of data from OLMO 2's pretraining corpus, and evaluate encoding efficiency on a held-out subset.</p><p>Preprint Shown in Figure 1, SuperBPE scales much better with vocabulary size than BPE. BPE quickly plateaus around a vocabulary size of &#8764;50K, achieving 4.45 bytes-per-token at a vocabulary size of 200k. In fact, even with infinite vocabulary size (namely, if every whitespace-delimited word were in the vocabulary), BPE cannot exceed 4.68 bytes-per-token, i.e., the average word length in the held-out subset. SuperBPE exceeds this upper bound with a mere &#8764;12k vocabulary size, and reaches 5.55 bytes-per-token at 50K and 6.63 at 200k. 20k 60k 100k 140k 180k Transition point for 200K vocab size 6.1 6.2 6.3 6.4 6.5 6.6 Bytes per token ( ) Figure 2: Encoding efficiency varies smoothly with the choice of transition point t in SuperBPE's pretokenization curriculum.</p><p>Perhaps surprisingly, SuperBPE is also more efficient than BPE with whitespace pretokenization completely disabled. Since BPE is a greedy algorithm, completely disabling whitespace pretokenization may cause BPE to make highly suboptimal choices early on. In particular, tokens in this setting often consist of the end of the previous word and start of the next word, as opposed to sequences of complete words. By keeping whitespace pretokenization on at the beginning, we can avoid suboptimal choices while still obtaining a tokenizer with superwords.</p><p>Figure <ref type="figure">2</ref> shows how SuperBPE's encoding efficiency depends on the choice of transition point t. The relationship is smooth, with t = 80k achieving the best encoding efficiency. However, we will see in our experiments that the optimal tokenizer for LM pretraining is not necessarily the most encoding-efficient.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Experiments</head><p>In our main experiments, we pretrain models from scratch while fixing the total training FLOPs and vocabulary size, changing only the algorithm for learning the vocabulary.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">Setup</head><p>We first pretrain 8B models with BPE and SuperBPE tokenizers. We use the OLMO2 7B <ref type="bibr">(OLMo et al., 2024)</ref> training configuration,<ref type="foot">foot_1</ref> including the model architecture, training hyperparameters, and pretraining corpus, but reduce the total number of training steps to correspond to &#8764;330B tokens (compared to 4T) for the sake of compute. Following prior work <ref type="bibr">(Pagnoni et al., 2024)</ref>, we also fix the effective context size (measured in bytes) for each model. This prevents SuperBPE models from gaining an advantage by seeing more textual context for the same next-token prediction <ref type="bibr">(Xiong et al., 2024)</ref>. As more efficient models will have a shorter context length in tokens, the training steps are adjusted accordingly to match the total train FLOPs at the end of training. <ref type="foot">4</ref> Note that in this setting, a same-sized SuperBPE model uses fewer inference FLOPs compared to the BPE model.</p><p>We fix the vocabulary size of all tokenizers to 200,000 (in the same ballpark as e.g., GEMMA at 250k <ref type="bibr">[Google, 2024]</ref>, <ref type="bibr">GPT-4O at 200k, LLAMA3 at 130k [Meta, 2024]</ref>). <ref type="foot">5</ref> We consider three transition points for SuperBPE: t = 80k, which has the best encoding efficiency, and two later transitions, t = 160k and t = 180k. All tokenizers are trained on the same 10 GB subset of OLMO2's pretraining mix. We provide further details about tokenizer training in &#167;A.1.</p><p>We also train a slightly larger 11B SuperBPE model with t = 180k which approximately matches the 8B BPE baseline in total bytes of training data seen as well as both train and inference compute. See</p><p>Table 2 for exact specifications for all runs. Preprint 0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75 Train FLOPs 1e22 25 30 35 40 45</p><p>Avg Task Performance ( )</p><p>Figure <ref type="figure">3</ref>: Average task performance on 30 downstream tasks, evaluated at every 5000 steps in model pretraining. We see that SuperBPE models consistently outperform the baseline that uses a BPE tokenizer. All compared models share the same vocabulary size and train budget; t denotes the transition point in SuperBPE's pretokenization curriculum.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">Results on downstream tasks</head><p>We evaluate on 30 benchmarks covering knowledge, math &amp; reasoning, coding, reading comprehension, commonsense, language understanding, and string manipulation. The full evaluation suite is shown in Table <ref type="table">1</ref>; evaluation details can be found in &#167;A.3.</p><p>Figure <ref type="figure">3</ref> shows the task average during pretraining. All SuperBPE models substantially outperform the BPE baseline at the end of training. The strongest 8B SuperBPE model, which has transition point t = 180k (the latest one we consider), outperforms the baseline by 4.0% on average, and wins on 25 out of 30 individual tasks. Table <ref type="table">1</ref> shows the per-task performance for this model (see &#167;A.3 for results for the other models). The largest gains appear to be on multiple choice tasks; when considering these alone, the performance improvement is +9.7%. The only task on which SuperBPE loses in a statistically significant way is LAMBADA; here, we observe that SuperBPE is actually ahead for the majority of training checkpoints, but accuracy dips at the end from 75.8% to 70.6% (see Figure <ref type="figure">11</ref>).</p><p>Note that while the choice of transition point affects the performance of the resulting model, all reasonable choices are significantly stronger than the baseline. When using the most encoding-efficient transition point of t = 80k, we see a +3.1% task improvement over BPE while reducing inference compute by 35%. Later transition points empirically give up some gains in encoding efficiency in exchange for further improved performance.<ref type="foot">foot_4</ref> </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Analysis</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Language modeling</head><p>Following prior work <ref type="bibr">(Biderman et al., 2023;</ref><ref type="bibr">Xue et al., 2022;</ref><ref type="bibr">Yu et al., 2023;</ref><ref type="bibr">Wang et al., 2024)</ref>, we evaluate language modeling performance using bits-per-byte (BPB), which normalizes the loss by the encoding efficiency of the tokenizer to fairly compare models with different tokenizers. This is necessary because longer tokens, on average, contain more information and therefore are more difficult to predict. Bits-per-byte is defined as is the sum of the cross-entropy loss over the entire text. 7 We find that BPE 8B, SuperBPE 8B (t = 180k), and SuperBPE 11B attain 0.7465, 0.7482, and 0.7445 BPB, respectively, at the end of training. Though the numbers are all close, the rankings of the models according to BPB and downstream task performance are not consistent.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Fine-grained analysis of bits-per-byte</head><p>Per-Token Bits-per-Byte Table 1, measured over a large corpus of text. We see the SuperBPE model is a more consistent performer, making fewer predictions with very high or very low loss.</p><p>Why does the SuperBPE 8B model achieve slightly higher normalized language modeling loss ( &#167;4.1) than the baseline BPE model, despite outperforming it on a wide variety of downstream tasks ( &#167;3.2)? To investigate this, we plot the distribution of per-token BPB 8 for both models on data sampled from the pretraining data mixture in Figure <ref type="figure">4</ref>.</p><p>We see that, although the BPE and SuperBPE models have very similar BPB on average, that loss is distributed very differently over the training data. Compared to the baseline, the Su-perBPE model makes fewer predictions with either very high or very low loss.</p><p>Low-loss tokens. We find that the reduction in low-loss tokens is attributable to a small set of extremely common words that the BPE model can easily predict, but are not available to SuperBPE as they are merged into larger superword tokens. For instance, the tokens the, of, and to (the three most common words in the corpus) appear an order of magnitude more often under BPE than SuperBPE in the same corpus of text. When excluding these three token types alone, the BPB ranking reverses, with SuperBPE achieving 0.02 lower BPB than BPE.</p><p>The reduction in low-loss tokens also makes sense from a qualitative linguistic analysis of SuperBPE tokens. In Table <ref type="table">3</ref>, we show the most common POS tags among superword tokens in SuperBPE, along with random examples for each tag. The tokens often capture common multi-word expressions (by accident, of course, for a living) that function as a single 7 Bits-per-byte of different models are considered comparable because total cross-entropy loss is a universal quantity representing the number of additional bits required to reconstruct the text given the model. This quantity is normalized by the number of bytes for easier interpretation. 8 The per-token BPB is the per-token loss (in bits) divided by the average encoding efficiency. semantic unit <ref type="bibr">(Schneider et al., 2014)</ref>. As an example, prepositions (IN) figure prominently in superword tokens (e.g., depend on, distinction between) and require lexeme-specific memorization. The individual words in these fixed expressions are often semantically vacuous and have little possible variation in context, so they are easy to predict once memorized.</p><p>High-loss tokens. On the other hand, the much thinner tail of very high-loss tokens shows that, in the worst case, the SuperBPE model consistently puts more probability mass on the correct token. On average, we expect models to suffer high loss on tokens that are difficult to predict. This may explain why SuperBPE can outperform BPE on downstream tasks while having higher average BPB: the tokens that are scored in task evaluations tend to be among the hardest to predict. This is consistent with prior findings that models generally continue to improve in downstream tasks even as their overall loss plateaus, due to improving on a narrow and difficult slice of the distribution <ref type="bibr">(Liu et al., 2023)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3">Scaling</head><p>To characterize the scaling behavior of SuperBPE, we also perform experiments at smaller scales. <ref type="foot">9</ref> We train baseline models at 680M and 1.9B, and scale the base number of training tokens proportionately to the number of parameters. We also perform runs at 0.5&#215;, 2&#215;, and 4&#215; the base number of tokens to observe the trend with respect to training duration. Then, we train two SuperBPE models that match the training budget of each baseline BPE model: one that matches the baseline in parameter count (analogous to SuperBPE 8B), and a larger model that matches in both train and inference compute (analogous to SuperBPE 11B). We focus on the t = 180k tokenizer to reduce complexity.</p><p>We plot BPB at the end of training for each run in Figure <ref type="figure">5</ref>. In the undertrained regime, both SuperBPE models achieve lower BPB than the baseline. In the overtrained regime, the ranking from worst to best is SuperBPE (matching parameter count), BPE, and SuperBPE (matching inference compute). Additionally, the separation between the models increases with further overtraining. We provide more results and comments on scaling in &#167;B.3.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Related Work</head><p>Tokenization beyond subwords Prior work has explored processing text at multiple levels of granularity <ref type="bibr">(Lai et al., 2021;</ref><ref type="bibr">Zhang et al., 2021)</ref> or creating multi-word tokens through frequency-based identification of n-grams <ref type="bibr">(Gee et al., 2023;</ref><ref type="bibr">Kumar &amp; Thawani, 2022)</ref>. However, these were explored in limited experimental contexts (mainly for machine</p><p>Preprint 10 20 2 &#215; 10 20 3 &#215; 10 20 4 &#215; 10 20 6 &#215; 10 20 Train FLOPS 0.92 0.94 0.96 0.98 1.00 Bits per Byte BPE 680M SuperBPE 680M SuperBPE 912M (a) 680M model size 10 21 6 &#215; 10 20 2 &#215; 10 21 Train FLOPS 0.84 0.85 0.86 0.87 0.88 0.89 0.90 Bits per Byte BPE 1.9B SuperBPE 1.9B SuperBPE 2.5B (b) 1.9B model size Figure 5: Scaling results for 680M and 1.9B baseline model sizes. Compared to the BPE baseline, SuperBPE with matching parameter count achieves lower BPB in the undertrained regime, while SuperBPE with matching inference compute achieves lower BPB than the baseline at every model size and every training budget tested. Note that BPB comparisons between BPE and SuperBPE models do not track downstream task accuracy, due to differences in how BPE and SuperBPE models distribute loss over tokens ( &#167;4.2). translation) and had mixed effectiveness. Naively disabling pretokenization in BPE has been found to severely hurt model performance (Dagan et al., 2024; Schmidt et al., 2024; Kudo, <ref type="bibr">2018)</ref>, though it may be more promising for unigram tokenization <ref type="bibr">(Kudo &amp; Richardson, 2018)</ref>, as adopted by JURASSIC <ref type="bibr">(Lieber et al., 2021)</ref> and BLOOMBERGGPT <ref type="bibr">(Wu et al., 2023)</ref>. In concurrent work, <ref type="bibr">Huang et al. (2025)</ref> disentangle the input and output vocabulary, expanding only the former to include n-gram tokens. Their method requires significant modifications of the LM input component and considers fixed length of n-gram tokens.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Multi-token prediction Multi-token prediction (MTP) equips</head><p>LMs with some extra parameters to predict multiple tokens in a single time step <ref type="bibr">(Qi et al., 2020;</ref><ref type="bibr">Gloeckle et al., 2024)</ref>, and was recently adopted by DEEPSEEK-V3, though the MTP module is discarded at inference-time. The effectiveness corroborates that LMs are capable of predicting more than one subword in a forward pass. However, these approaches fix the number of tokens predicted in each time step and require modifications to the architecture and training objective. Nonetheless, the benefits of MTP and superword tokens may be orthogonal.</p><p>Tokenizer-free language modeling Some works have explored the possibility of removing tokenization entirely from LMs and directly modeling text as a sequence of bytes <ref type="bibr">(Clark et al., 2022;</ref><ref type="bibr">Xue et al., 2022;</ref><ref type="bibr">Wang et al., 2024)</ref>. To overcome the increased compute requirement due to expanded sequence lengths, alternative architectures have been proposed that either segment bytes into fixed-length patches <ref type="bibr">(Tay et al., 2022;</ref><ref type="bibr">Yu et al., 2023)</ref> or dynamically predict patch boundaries with sub-modules <ref type="bibr">(Nawrot et al., 2023;</ref><ref type="bibr">Pagnoni et al., 2024;</ref><ref type="bibr">Ahia et al., 2024)</ref>, increasing the complexity of the model.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">Conclusion</head><p>Although tokenization lies at the foundation of language modeling-acting as the lens through which models view text-the algorithms in use have remained largely unchanged over the past decade. SuperBPE builds on the natural observation that tokens need not be limited to subwords, extending the BPE algorithm to superword tokens. When replacing subword BPE tokenizers with SuperBPE tokenizers in pretraining, we find that language models achieve better performance over a large suite of downstream tasks, while also being substantially more efficient at inference time. These benefits are achieved without modifying the underlying model architecture, making SuperBPE a compelling alternative to BPE that seamlessly integrates with modern language model ecosystems.</p><p>Preprint Independently of whitespace pretokenization (i.e., for both BPE and SuperBPE tokenizers), we follow recent convention (as introduced by GPT-3.5 and borrowed by LLAMA3, OLMO2) and pretokenize digits into blocks of 3. We make one modification, by grouping digits into 3 from the right rather than from the left, so that, e.g., 1000 would be pretokenized as [1, 000] instead of <ref type="bibr">[100,</ref><ref type="bibr">0]</ref>. This choice was recently found to yield improved performance on math benchmarks, even when applied solely at inference time <ref type="bibr">(Singh &amp; Strouse, 2024)</ref>. Digit pretokenization is enforced with the following regex.</p><p>(?=(\d{3})+(?!\d))</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A.1.4 Special casing of colon</head><p>In order to make our tokenizer compatible with the common question-answering format where the prompt ends with a colon and the continuation is expected to start with a space, we "special-case" colon by preventing the algorithm from learning any tokens that contain ": " as a substring. Without this fix, common question/answer prompts might produce distorted distributions over completions. Please see &#167;C.3 for further discussion. This affects the resulting tokenizer minimally in terms of the learned vocabulary.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A.2 Scaling model configurations</head><p>When matching inference compute, the goal is to match the average flops per byte of generated text between two models with different tokenizers. To do so, we scale the model up to cancel the effect of longer tokens, which requires precise control over the model's size.</p><p>To produce a model config with an arbitrary inference compute cost, we first represent the inference flops per token as a polynomial in terms of the model dimension, MLP hidden dimension, and number of layers. Conveniently, once the model dimension and number of layers are chosen, the flops are affine in the MLP hidden dimension, so we can easily solve for the MLP hidden dimension that gets us closest to the desired budget. We fix the head dimension to that of the base model.</p><p>To find the best config overall, we grid search over the hidden dimension (which must remain a multiple of the head dimension) and number of layers, solving for the MLP hidden dimension at each step. We choose the config which expands the transformer by the most uniform factors. This is measured by taking the ratios of the current parameters with the base config's parameters, applying the logarithm, and taking the standard deviation. While prior work has explored the best way to scale transformer models <ref type="bibr">(Tay et al., 2021;</ref><ref type="bibr">Petty et al., 2023)</ref>, we believe that scaling all parameters uniformly is reasonable since we are only increasing the model size by a small amount.</p><p>We present the exact model hyperparameters for all model sizes used in our experiments in Table <ref type="table">4</ref>.</p><p>680M 910M 1.9B 2.5B 8B 11B Parameter count 678.2M 912.5M 1.893B 2.536B 8.115B 11.30B Model dimension 1024 1,216 2,048 2,304 4,096 4,608 MLP hidden dimension 8,192 9,728 16,384 18,432 22,016 24,704 Head dimension 64 64 128 128 128 128 Number of heads 16 19 16 18 32 36 Number of layers 16 18 16 19 32 37 Vocabulary size 20,0005 20,0005 20,0005 20,0005 20,0005 20,0005</p><p>Table 4: Model parameters for all model sizes. Model sizes 910M, 2.5B, and 11B are scaled versions of 680M, 1.9B, and 8B respectively. All other parameters match those of OLMO 300M (from the OLMO model ladder) for sizes 680M and 910M, OLMO 1B for sizes 1.9B and 2.5B, or OLMO2 7B for sizes 8B and 11B, respectively. Maximum sequence length values for various tokenizers are listed in Table 2.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A.3 Evaluation Suite</head><p>Our evaluation suite builds on DataComp-LM's core evaluation of 22 tasks <ref type="bibr">(Li et al., 2024)</ref>, which was found to provide low-variance signal of learning. We add 8 more popular tasks (e.g., MMLU, GSM8K) while also covering string manipulation tasks (e.g., CUTE), which are known to be challenging for LMs due to their tokenizers.</p><p>All evaluations are based on decoding from the model and scoring the generation by either comparing it to the ground truth or evaluating its functional correctness (in the case of coding tasks). For multiple choice (MC) tasks, we check whether the predicted answer choice is an exact match (EM) to the target (we observe that effectively 100% of model generations are valid answer choices, especially for later checkpoints). For open-ended tasks, we check whether the generated output contains the ground truth answer exactly, and for coding tasks, we report pass@10.</p><p>We provide 5 in-context examples for all tasks, except for CoQA, which naturally contains in-context examples in the conversational context, and the coding tasks (HumanEval and MBPP), which are evaluated zero-shot following prior work. We use a maximum of 5,000 examples from each dataset, though some datasets contain much fewer examples. BB below stands for BIG-Bench.</p><p>ARC consists of 4-way MC questions from grades 3-9 science exams. It contains two splits, ARC-Easy, which require knowledge of basic science, and ARC-Challenge, which require some procedural reasoning <ref type="bibr">(Clark et al., 2018)</ref>.</p><p>Arithmetic contains simple arithmetic problems <ref type="bibr">(Brown et al., 2020)</ref>. <ref type="foot">10</ref> We use the 2da, 2dm, and 2ds splits for addition, multiplication, and division of (up to) 2-digit numbers.</p><p>BoolQ contains naturally occurring yes/no questions paired with passages that provide an answer <ref type="bibr">(Clark et al., 2019)</ref>.</p><p>CommonsenseQA contains 5-way MC questions that require commonsense knowledge to answer <ref type="bibr">(Talmor et al., 2019)</ref>.</p><p>COPA contains two-way MC questions about cause and effect <ref type="bibr">(Roemmele et al., 2011;</ref><ref type="bibr">Kavumba et al., 2019)</ref>.</p><p>CoQA consists of passages with a series of conversational questions about the passage <ref type="bibr">Reddy et al. (2019)</ref>. Each question requires the prior conversational context, due to possible coreference across questions. Because these contextual questions naturally serve as incontext examples, we do not provide additional in-context examples.</p><p>BB CS Algorithms consists of two subtasks, determining whether a given series of parentheses is balanced and identifying the longest common subsequence in two letter strings <ref type="bibr">(BIG-bench, 2023)</ref>.</p><p>CUTE contains questions that require the model to understand and manipulate spelling, such as replacing all instances of a particular letter in a word with another letter <ref type="bibr">(Edman et al., 2024)</ref>.</p><p>DROP contains questions about passages, potentially requiring reasoning over multiple pieces of information in the passage <ref type="bibr">(Dua et al., 2019)</ref>.</p><p>BB Dyck Languages consists of a sequence of parentheses and requires the model to predict the correct sequence of closing parentheses so that the entire sequence is wellbalanced.</p><p>GSM8K contains grade school math word problems that require between 2 and 8 steps to solve. In the in-context examples, we provide the answer passage that contains intermediate steps with calculator annotations removed. The model is expected to provide the final numerical answer after four hashtags (####) that delimit the reasoning and final answer <ref type="bibr">(Cobbe et al., 2021)</ref>.</p><p>HellaSwag contains 4-way MC questions which ask for the most natural continuation given the context <ref type="bibr">(Zellers et al., 2019)</ref>.</p><p>HotpotQA contains questions along with a corresponding passage from Wikipedia containing the answer <ref type="bibr">(Yang et al., 2018)</ref>.</p><p>HumanEval contains programming problems where the model is tasked with completing a Python function given its docstring <ref type="bibr">(Chen et al., 2021)</ref>. We use "\nclass," "\ndef," "\n#," "\nif," as stop tokens. Following the original paper, we sample 20 continuations with top p = 0.95 and temperature = 0.8. Models are allowed to generate for a maximum of 128 new tokens. The functional correctness of generations is automatically evaluated using test cases.</p><p>We use the 20 generation to make an unbiased estimate of the pass@10 rate, i.e., how likely at least one of 10 sampled solutions for a problem is correct.</p><p>Jeopardy contains open-ended questions from the "Jeopardy!" quiz show.<ref type="foot">foot_7</ref> </p><p>Lambada contains narratives without the last word, which is inferrable given the context <ref type="bibr">(Paperno et al., 2016)</ref>. This task requires models to attend to the full narrative instead of only the local context.</p><p>BB Language Identification contains sentences in different languages, and the task is to choose the language of the sentence from a long list of options.</p><p>LSAT-AR contains MC questions that evaluate the analytical reasoning (AR) ability of LMs <ref type="bibr">(Zhong et al., 2022;</ref><ref type="bibr">2024)</ref>. Test questions are drawn from the Law School Admission Test (LSAT) from 1991 to 2016.</p><p>MBPP contains Python programming problems where the model is given a description of the desired function and a series of unit tests. We use the same evaluation setup as HumanEval.</p><p>MMLU contains 4-way MC questions covering 57 different domains, covering both world knowledge and problem-solving abilities <ref type="bibr">(Hendrycks et al., 2021)</ref>. Note that we report a straight average over the 5000-example sample, rather than a macro-average over subjects.</p><p>OpenbookQA contains 4-way MC questions that require multi-step reasoning and commonsense knowledge <ref type="bibr">(Mihaylov et al., 2018)</ref>.</p><p>BB Operators contains questions where the model is given a function definition and asked to compute the output of that function given a particular input.</p><p>PIQA contains MC questions that require physical commonsense reasoning <ref type="bibr">(Bisk et al., 2020)</ref>.</p><p>BB Repeat-Copy-Logic contains instructions that ask the model to produce a particular string <ref type="bibr">(Austin et al., 2021)</ref>.</p><p>SQuAD contains passages paired with questions about the passage <ref type="bibr">(Rajpurkar et al., 2016</ref>).</p><p>The answer is always a span from the passage.</p><p>Category Task BPE 8B SuperBPE 8B SuperBPE 11B t = 80k t = 160k t = 180k Knowledge ARC-Easy (MC) 46.6 60.8 63.6 67.1 60.6 ARC-Challenge (MC) 35.1 46.4 43.9 50.6 43.9 Jeopardy (EM) 42.1 40.2 41.8 41.8 42.2 MMLU (MC) 36.5 41.9 42.6 44.7 41.0 OpenbookQA (MC) 33.2 49.8 49.4 54.4 46.4 TriviaQA (EM) 60.6 59.7 61.9 61.3 62.3 WikidataQA (EM) 69.7 68.2 69.5 70.9 70.9 Math Arithmetic (EM) 54.8 63.2 58.6 59.3 56.9 &amp; Reasoning GSM8K (EM) 6.4 6.9 6.7 6.7 7.4 LSAT-AR (MC) 21.3 23.9 24.3 23.0 20.9 Operators (EM) 35.5 32.2 35.5 33.6 37.9 Repeat-Copy-Logic (EM) 3.1 6.2 6.2 6.2 3.1 Coding HumanEval (pass@10) 15.9 15.0 14.4 13.4 15.9 MBPP (pass@10) 27.5 25.3 28.4 28.3 29.4 Reading BoolQ (MC) 59.7 65.2 62.3 64.6 64.7 Comprehension CoQA (EM) 12.6 12.8 12.5 13.2 13.1 DROP (EM) 31.3 28.6 32.8 31.4 33.1 HotpotQA (EM) 53.5 52.5 54.7 55.2 54.6 SQuAD (EM) 75.1 74.3 76.2 75.8 77.2 Commonsense CommonsenseQA (MC) 33.5 50.0 52.3 53.8 50.5 COPA (MC) 77.0 86.6 87.6 85.8 97.0 PIQA (MC) 55.2 57.7 61.8 59.8 59.2 Winograd (MC) 50.4 52.5 55.2 53.1 52.3 Winogrande (MC) 47.3 51.2 51.6 52.6 50.2 Language HellaSwag (MC) 29.7 31.2 30.3 33.7 36.6 Understanding LAMBADA (EM) 77.0 72.8 75.1 70.6 75.8 Language Identification (EM) 8.8 10.2 9.7 9.0 10.1 String CS Algorithms (EM) 46.1 47.3 42.6 48.6 49.1 Manipulation CUTE (EM) 31.3 32.2 32.8 32.6 35.7 Dyck-Languages (EM) 15.9 23.2 18.8 14.2 16.7 Average 39.8 42.9 43.4 43.8 43.8 Table 5: Performance of BPE and SuperBPE models on 30 downstream tasks. This is an expansion of Table 1 with more models.</p><p>TriviaQA contains open-ended questions about world knowledge <ref type="bibr">(Joshi et al., 2017)</ref>.</p><p>BB WikidataQA require models to complete factual statements with the correct continuation.</p><p>Winograd contains binary MC questions where the model is given a context and asked to determine which entity a pronoun refers to, between two options <ref type="bibr">(Levesque et al., 2012</ref>).</p><p>Correctly answer the question requires commonsense knowledge and contextual reasoning.</p><p>Winogrande contain questions with the same schema as Winograd, but increases both the scale and difficulty of the dataset <ref type="bibr">(Sakaguchi et al., 2021)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B Additional Results</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B.1 Task evaluation</head><p>We report the individual task performance of BPE and all SuperBPE models in Table <ref type="table">5</ref> (this an expansion of Table <ref type="table">1</ref>). We also show a subset of task-specific performance curves during pretraining in Figure <ref type="figure">11</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B.2 BPB evaluation</head><p>See Figure <ref type="figure">6</ref> for the bits-per-byte during pretraining of all models we compare. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C Analysis of SuperBPE Tokenizers</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.1 Superword token analysis</head><p>How many superword tokens are in SuperBPE tokenizers? While the second stage of the pretokenization curriculum allows learning of superword tokens, subword tokens can still be learned. Shown in Figure <ref type="figure">8a</ref>, for transition points t &lt; 80k, the number of superword tokens is relatively steady around 120k. Past t &gt; 100k, almost all tokens learned in Stage 2 are superword tokens. Figure <ref type="figure">8b</ref> shows the number of whitespace-delimited words in the superword tokens of SuperBPE with t = 180k.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.2 Analysis of token frequencies in encoding</head><p>We also analyze token frequency statistics under BPE versus SuperBPE tokenizers. Figure <ref type="figure">9a</ref> shows the relation between token rank (in frequency) and frequency. While tokens in BPE demonstrate a standard Zipfian relation, the slope of SuperBPE curves have a more shallow slope, meaning that the rate of decay in token frequency is smaller. The smaller proportion of tokens with very low counts may reduce prevalence and severity of glitch tokens <ref type="bibr">(Rumbelow &amp; Watkins, 2023;</ref><ref type="bibr">Land &amp; Bartolo, 2024)</ref>.</p><p>Figure <ref type="figure">9b</ref> shows the minimum number of tokens from the vocabulary needed to cover any given proportion of data. For BPE, the relation is striking-only 57% of tokens are needed to encode 99% of the data! The remaining tokens make up a long tail of infrequent tokens. In contrast, SuperBPE tokenizers make better use of the vocabulary. For t = 80k and t = 180k, this statistic is 90% and 70% of tokens, respectively.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.3 Distributional Distortion at the Prompt Boundary</head><p>Prior work <ref type="bibr">(Lundberg, 2023;</ref><ref type="bibr">Phan et al., 2024)</ref> has shown that LMs using BPE tokenizers may produce distorted generations due to the forced partition in tokenization between a prompt and its completion. This issue stems from the fact that users typically desire completions conditioned on a text prompt. The natural approach to obtaining such completions is to take the prompt, tokenize it with the proper tokenizer, and then sample a completion of the resulting token sequence from the LM.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_0"><p>The algorithm originated in 1994 in the field of data compression<ref type="bibr">(Gage, 1994)</ref>.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_1"><p>OLMO2 7B has 7.30B parameters while our 8B BPE and SuperBPE models have 8.12B parameters due to their increased vocabulary size.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_2"><p>In practice, models using our more efficient tokenizers could shift some or all of the "saved" context FLOPs to longer effective contexts instead of more training steps.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="5" xml:id="foot_3"><p>For 8B models, 200k vocabulary size is close to the recommendation of<ref type="bibr">Tao et al. (2024)</ref> based on primarily-English data. We fix the vocabulary size to simplify comparisons between models.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="6" xml:id="foot_4"><p>This finding adds to the ongoing debate about the relationship between tokenization compression and LM performance<ref type="bibr">(Gall&#233;, 2019;</ref><ref type="bibr">Goldman et al., 2024;</ref><ref type="bibr">Schmidt et al., 2024)</ref>, providing further evidence that a higher compression does not necessarily lead to better performance.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="9" xml:id="foot_5"><p>For scaling, we focus on BPB, since our downstream evals are too noisy for our small models to make meaningful comparisons.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="10" xml:id="foot_6"><p>https://huggingface.co/datasets/EleutherAI/arithmetic</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="11" xml:id="foot_7"><p>https://www.kaggle.com/datasets/tunguz/200000-jeopardy-questions</p></note>
		</body>
		</text>
</TEI>
