---
title: "T-FREE — paper by Deiseroth et al. (2024) — summary and ideas"
description: "T-FREE replaces learned subword vocabularies with hashed letter triplets, shrinking text embedding layers and improving English-to-German…"
canonical: "https://research.elamur.ai/free/en/papers/deiseroth-2024-t-free-subword-tokenizer-free/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Shryfti](https://md.shryfti.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/deiseroth-2024-t-free-subword-tokenizer-free/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2024](https://md.research.elamur.ai/free/en/papers/2024/) / T-FREE: Subword Tokenizer-Free Generative LLMs via Sparse Representations for Memory-Efficient Embeddings

# T-FREE: Subword Tokenizer-Free Generative LLMs via Sparse Representations for Memory-Efficient Embeddings

Paper · 2024 · Björn Deiseroth, Manuel Brack, Patrick Schramowski et al.

**Authors:** [Björn Deiseroth](https://md.research.elamur.ai/free/en/authors/bjorn-deiseroth/), [Manuel Brack](https://md.research.elamur.ai/free/en/authors/manuel-brack/), [Patrick Schramowski](https://md.research.elamur.ai/free/en/authors/patrick-schramowski/), [Kristian Kersting](https://md.research.elamur.ai/free/en/authors/kristian-kersting/) and [Samuel Weinbach](https://md.research.elamur.ai/free/en/authors/samuel-weinbach/) · **Year:** 2024 · **Venue:** Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[Cited by **8** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/deiseroth-2024-t-free-subword-tokenizer-free/cited-by/) · Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2024.emnlp-main.1217/)
- [PDF](https://aclanthology.org/2024.emnlp-main.1217.pdf)
- [DOI 10.18653/v1/2024.emnlp-main.1217](https://doi.org/10.18653/v1/2024.emnlp-main.1217)

## Summary

A system that generates text must decide what counts as a unit of text before it can learn to predict one. With [subword tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/), that decision depends on a vocabulary learned from a reference collection. A frequent word may get its own entry, while a word written in an underrepresented language may be divided into many pieces. Even minor spelling changes can lead to different entries whose representations are learned independently. T-FREE changes the interface between text and a [language model](https://md.research.elamur.ai/free/en/concepts/language-model/). It gives an ordinary word a single position in the sequence and represents it by several shared features derived from its spelling.

The method divides a word into overlapping triplets, including triplets that mark its boundaries. A fixed hash procedure maps each triplet to several rows in a trainable embedding matrix. The sum of the active rows represents the word. Words with common triplets can therefore share part of their representation from the start of training. To generate text, the network learns to predict the feature pattern of the next word. At inference, it scores candidate words by averaging the predicted values at their active features. The candidate dictionary can be changed independently of the trained weights.

In an English benchmark comparison at the 1B scale, the authors' strongest embedding-width setting used 8k rows against a 64k Unigram baseline. It used 12.5% of the baseline embedding parameters and remained competitive across the benchmark suite. On Wikipedia text, T-FREE generally required fewer sequence positions per reference word, with especially large advantages over the English-trained baselines in Russian and Arabic. The paper also compares English-pretrained systems at the 3B scale. During 20k steps of continued pretraining on German data with English replay, T-FREE improved more than Unigram on German HellaSwag and ARC-Challenge. The translated XNLI and TruthfulQA results changed comparatively little.

The evidence supports a compact way to encode text and a practical advantage in the English-to-German transfer tested here. A fixed spelling-based encoder and an editable output dictionary solve different problems. An unfamiliar input word can be represented immediately, while generating that word still requires an available decoding candidate. The experiments establish the tradeoff at the scales, in the languages, and on the tasks the authors studied.

## Deep dive: T-FREE: Subword Tokenizer-Free Generative LLMs via Sparse Representations for Memory-Efficient Embeddings

T-FREE replaces learned subword vocabularies with hashed letter triplets, shrinking text embedding layers and improving English-to-German transfer. · about 33 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Why the text interface matters

The paper starts from two operations that happen at opposite ends of a text generator. At the input, discrete strings have to become vectors that can enter numerical computations. At the output, numerical predictions have to become text again. A conventional tokenizer gives each entry in a fixed vocabulary an integer identifier. The embedding matrix has a row for each identifier, and selecting a row supplies the vector that represents a token in context. The input vectors feed the [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/), whose job includes relating each position to previous positions.

On the output side, the language-model head projects the final representation at a position into scores over the vocabulary. In autoregressive generation, the system predicts the next unit given the preceding ones, appends the chosen unit, and repeats. Under greedy decoding, it selects the unit with the highest score. The vocabulary supplies the text associated with the selected identifier. The same choice of textual units therefore governs how many input positions the network processes, the size of the matrices at the two ends of the network, and what it can produce in a single prediction.

These demands can pull vocabulary design in different directions. Giving often occurring words a dedicated entry can shorten sequences. Including more words, spellings, and character combinations can extend that benefit to more inputs, but each new entry expands the matrices. Restricting the vocabulary keeps the interface smaller at the expense of splitting more strings into pieces. A word's contribution to sequence length then depends on how well its spelling can be assembled from the available pieces. A description of the backbone alone leaves this source of computational cost out of view.

The authors use vocabulary sizes from previous systems to illustrate the pressure to add entries. [Llama 2](https://md.research.elamur.ai/free/en/papers/touvron-2023-llama-2-open-foundation-fine/) and [Mistral 7B](https://md.research.elamur.ai/free/en/papers/jiang-2023-mistral-7b/) are examples cited for a 32k vocabulary. The paper also describes systems whose vocabularies reach 128k or go beyond 250k. In its Command-R example, the authors give 12, 288 as the hidden dimension and 256, 000 as the vocabulary size. They report 6.3B parameters for the embedding and head together. The example concerns those matrices specifically. A wide vocabulary can also take up a large fraction of a small system's parameters, as the paper illustrates with [Gemma](https://md.research.elamur.ai/free/en/papers/gemma-2024-team-gemma-open-models-based-gemini/).

#### How the conventional vocabularies are learned

The paper describes the prevailing approaches through Byte Pair Encoding, or BPE, and Unigram. Both fit a vocabulary to the statistics of a reference collection. They build their vocabularies in opposite directions. BPE starts with individual characters and progressively constructs larger pieces. Unigram starts with a large collection of possible pieces and prunes it. In both cases the target vocabulary size determines when the construction process stops.

BPE counts neighboring token pairs in its training material. It merges a frequent pair into a new token and records the merge rule. As training continues, previously merged pieces can participate in new merges. At encoding time, the rules are applied in their learned order wherever they match the text. A familiar spelling can become a large piece through a sequence of merges. A spelling that seldom occurred may have few applicable rules and remain split across smaller pieces. The paper also points to the work of finding and applying eligible merges when input sequences and vocabularies are large.

Unigram starts from reference words, their frequencies, and proposed substrings. Training estimates how much the candidate pieces contribute to encoding the corpus and removes those judged least helpful. At inference, there can still be several plausible ways to divide a word using the surviving pieces. The Viterbi algorithm selects a preferred segmentation under the learned scores. The authors use [SentencePiece](https://md.research.elamur.ai/free/en/papers/kudo-2018-sentencepiece-simple-language-independent-subword/) to fit their own conventional baselines. Both approaches can use byte fallback, which lets a tokenizer encode characters that its learned inventory fails to cover. Fallback preserves representability, while the number of pieces required can still vary substantially.

#### Where a fixed inventory spends capacity

A distinctive part of the paper's argument concerns entries that are nearly redundant. If a vocabulary gives separate identifiers to forms that differ only by a leading space or a capital letter, their embedding rows start and train separately. A conventional generator can eventually learn that the forms serve similar roles. The input representation itself provides no shared parameter merely because their spellings nearly coincide. The same issue arises on the output side, where each identifier receives its own score.

There are reasons to preserve the differences. Capitalization can carry information, and spaces determine how pieces fit together in the output. The authors question the allocation of independent parameters for each variant. Their analysis treats case, leading spaces, and some digit groupings as forms of redundancy for this purpose. The proposal keeps spelling distinctions while making the parameters for related spellings overlap. That gives the paper's discussion of [morphology](https://md.research.elamur.ai/free/en/concepts/morphology/) a specific meaning. Spelling often exposes shared material between forms, and T-FREE can reuse that material without deciding whether it is a stem, suffix, or some other linguistic unit.

The reference collection presents a separate difficulty. An English-heavy collection favors pieces that make English text economical to encode. Other languages can still be processed, but more pieces per word consume more sequence positions and change how much source text fits in a fixed-length input. A tokenizer also requires its own fitting stage before pretraining. The paper draws on earlier work that asks how much the tokenizer matters to multilingual performance and how choices during its fitting affect later training. [How Good is Your Tokenizer?](https://md.research.elamur.ai/free/en/papers/rust-2021-how-good-is-your-tokenizer/) and [Tokenizer Choice For LLM Training: Negligible or Crucial?](https://md.research.elamur.ai/free/en/papers/ali-2024-tokenizer-choice-llm-training-negligible/)

#### The alternatives the authors build on

One way to avoid a corpus-specific sub-word inventory is to process characters or bytes directly. The price of a straightforward implementation is a long sequence. The related-work discussion describes approaches that aggregate smaller units or change the architecture that processes them. Charformer's segmentation mechanism can be trained through gradients. MEGABYTE groups bytes at a fixed width and uses separate processing at different scales. The fixed spans in that account can cross word boundaries, whereas T-FREE takes its ordinary input units from text splitting. MambaByte appears as an example of a byte-based approach using a state-space architecture. [Charformer](https://md.research.elamur.ai/free/en/papers/tay-2021-charformer-fast-character-transformers-gradient/), [MEGABYTE](https://md.research.elamur.ai/free/en/papers/yu-2023-megabyte-predicting-million-byte-sequences/), and [MambaByte](https://md.research.elamur.ai/free/en/papers/wang-2024-mambabyte-token-free-selective-state/)

The other strand of related work concerns the vectors themselves. Earlier work enriched [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/) with character fragments. The paper also discusses hash embeddings, an encoder that hashes words, and CANINE, whose encoding combines hashing with convolution. These precedents motivate learning representations from reusable features. T-FREE carries that idea through to the generative head. The features used to represent input text become the targets from which output words are recovered. [Enriching Word Vectors with Subword Information](https://md.research.elamur.ai/free/en/papers/bojanowski-2017-enriching-word-vectors-subword-information/) and [CANINE](https://md.research.elamur.ai/free/en/papers/clark-2022-canine-pre-training-efficient-tokenization/)

Weight tying addresses a different part of the capacity problem. It shares a matrix between the input embedding and output projection, reducing the combined parameter allocation for those functions. The authors discuss it as an earlier way of cutting the cost of the text interface. T-FREE changes what a row means. A row is a feature that can participate in the representation of many strings, so the number of rows can be chosen independently of the number of words the decoder can consider. [Using the Output Embedding to Improve Language Models](https://md.research.elamur.ai/free/en/papers/press-2017-output-embedding-improve-language-models/)

### The method, step by step

#### Divide the text into units

T-FREE begins with a rule-based form of [tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/). It separates words, digits, and special characters. Whitespace ordinarily marks a boundary between words. Digits are separated even when they occur next to other digits or letters. Punctuation can occupy its own position. In the paper's running example, `Hello_word!` yields `Hello`, `word`, and `!`, with the underscore standing for a space. An ordinary word is carried intact into the next stage. Its internal triplets will contribute features to one embedding at one sequence position.

The splitter and renderer follow whitespace conventions. Adjacent words usually need a space. The paper's rules often favor adjacency after a digit or before punctuation. A dedicated space unit and a dedicated no-space unit record exceptions so that splitting a string into textual units preserves the information needed to concatenate them again. For example, the paper divides `In 2024` into `In` and the individual digits, and its default rules suffice to recover the spacing. For `In20 24`, it records the missing space after `In` and the explicit space inside the run of digits. In both cases the network receives the digits separately. Larger numbers have to be interpreted through their sequence of positions.

The defaults are more detailed than the examples suggest. The appendix specifies characters around which the renderer favors omitting a space. It also describes merging runs of whitespace and newlines to cut the number of sequence positions used for formatting. A run of 8 consecutive spaces is the paper's example of a run that can be represented by one special unit. These rules affect sequence length because formatting that would otherwise be expressed over several positions can be represented more compactly.

How T-FREE encodes text and predicts continuations The steps in order.

#### Extract triplets that retain local order

Before forming triplets, T-FREE marks the beginning and end of an ordinary word with spaces, written as underscores in the paper's examples. It then moves a window of width three along the padded form. The triplets for `Hello` are `_He`, `Hel`, `ell`, `llo`, and `lo_`. The first and last of these make the beginning and end distinguishable from the same material in the middle of a word. The procedure in the main description advances at a byte-wise stride and calls out a Unicode fallback exception to the usual correspondence between the number of triplets and word length.

A triplet retains the order of its own letters. The embedding step will use a set of activated indices, so the succession of windows is represented indirectly through their overlaps. For ordinary spellings, the overlapping material can encode much of the word's identity. It also provides a specific kind of sharing. Two words that contain the same internal triplet can activate the same embedding rows for that triplet, even if it occurs at a different position in each word. Two words with the same beginning or ending can share boundary-specific material as well. A resemblance that leaves few triplets in common gives little deliberate overlap through this mechanism.

The paper calls this process trigramification. A [trigram](https://md.research.elamur.ai/free/en/concepts/n-gram/) here is a spelling feature created inside a unit. Treating the triplets as successive sequence tokens would change the architecture's computational behavior because the Transformer would then have to process them at separate positions. Aggregation keeps the triplet computation at the input boundary and passes one vector per split unit to the Transformer.

#### Use several hashes and control case sharing

For each triplet, the algorithm applies a hash in several indexed variants. A hash maps a string to a number deterministically. Each variant incorporates its own index in the string fed to the hash. The authors then use the remainder of division by the embedding width to choose a valid row. This is the indexing operation in the appendix.

```
rᵢ = hash(sᵢ, i) mod v
```

Here `rᵢ` is the row selected by variant `i`, and `sᵢ` is the triplet form passed to that variant. The notation `hash(sᵢ, i)` stands for hashing a string made from that form and the variant index. The operator `mod` gives the remainder after division by `v`, the number of available embedding rows. The appendix treats the hash function as a component of the procedure and uses the variant index to distinguish the calls.

The total number of hash variants for a triplet is `m`. The first `k` variants receive the lower-cased spelling of the triplet, and the others receive its original spelling. The permitted range is given as follows.

```
k ∈ [0, m)
```

Here `k` counts the lower-case variants and `m` counts all variants. The membership symbol `∈` places `k` in the interval starting at `0` and ending just before `m`. Because `k` is a count, it takes integer values. With `k = 0`, all variants use the original triplet. A positive `k` gives an upper-case triplet and its lower-case counterpart a planned set of shared hash calls. Variants that use the original case leave capacity for differences between the two forms.

If a word yields `n` triplets, the main description gives the nominal count of hash assignments as follows.

```
a = n · m
```

Here `a` denotes the number of assignments before duplicate indices are collapsed. The symbol `n` counts triplets for the word, `m` counts hash variants per triplet, and the centered dot denotes multiplication. The pattern in the appendix is binary. If a triplet repeats or different hash calls select the same row, setting that row again leaves its value unchanged. The number of distinct active rows can therefore be smaller than the nominal assignment count.

The word's pattern is sparse because only the selected rows are active. A single shared row is compatible with two cases. It can reflect a genuine common triplet, or it can result from different strings hashing to the same index. The multiple hashes are intended to keep unrelated inputs distinguishable despite individual overlaps. The paper reports a large theoretical space of patterns under illustrative settings. That counting argument treats a pattern as a selection of active positions from the row inventory.

```
C(v, n · m)
```

The symbol `C` denotes the number of combinations without regard to order. The first argument `v` counts all available rows. The second argument `n · m` is the nominal number of active positions, with `n` triplets and `m` hashes per triplet. This argument illustrates how many patterns could be formed under the assumed number of distinct active rows. The actual encoding uses patterns determined by a hash function and by the triplets that words contain. Some rows can merge through collisions, and the size of the theoretical space by itself gives no measured collision rate for words.

#### Sum the rows and keep the text interface compact

Once the word's pattern is known, the input computation is a row sum. The embedding matrix has `v` rows and a hidden width `h`. Each row is a learned vector of length `h`. The rule deciding which rows to sum is fixed before language pretraining. The row vectors themselves start as parameters and are updated during training.

```
e = ∑ᵢ bᵢ Eᵢ
```

Here `e` is the final vector for the word, `i` indexes the `v` rows, and `∑ᵢ` adds their contributions. The binary value `bᵢ` specifies whether row `i` is active. The vector `Eᵢ` is that row in the embedding matrix. Multiplication by `bᵢ` selects the row when the feature is present and contributes a zero vector otherwise. The appendix implements this by summing the active rows directly.

This design gives a straightforward route for transferring what has been learned about a spelling fragment. When a row is updated for a word, the update also changes the contribution of that row in any other word that selects it. Lower-case sharing adds a deliberate route for a capitalized form to benefit from the lower-case form's training occurrences. Because some variants preserve case, the two full embeddings can still differ. The language pretraining data determine what the shared and unshared rows come to express.

The input sum also explains how T-FREE separates the embedding width from the number of encodable words. A new string supplies a new combination of rows already in the matrix. Creating its pattern needs no newly trained row and no corpus lookup. In a conventional system, giving that string a dedicated token would require a vocabulary entry with its own parameters. With T-FREE, the size of the embedding and prediction matrices follows the feature width `v`. The size of an inference dictionary follows the candidate inventory chosen for that application.

#### Teach the network to predict a pattern

The backbone still learns from preceding positions to predict the next position. A conventional next-token target identifies a single entry. T-FREE's target identifies the active rows in the next unit's binary pattern. When the following unit is a word, training picks out the features of the whole word at once. The head therefore emits a score for every feature, and the loss assesses every feature against its binary target. This is a multi-label task because several features should be active in the same prediction.

The paper expresses the loss as binary cross-entropy over the feature inventory.

```
L_MLBCE = −∑ⱼ₌₁ᵛ [yⱼ log(ŷⱼ) + (1 − yⱼ) log(1 − ŷⱼ)]
```

The symbol `L_MLBCE` names the multi-label binary cross-entropy loss. The sum runs from feature `j = 1` through `v`, the head width. The value `yⱼ` is the binary target at feature `j`, and `ŷⱼ` is its predicted probability after the sigmoid transformation. The function `log` takes a logarithm. If `yⱼ` is active, the first term inside the brackets supplies the loss contribution. If it is inactive, the term containing `1 − yⱼ` supplies the contribution. The leading minus sign makes low probability for the correct binary outcome incur a larger loss. The paper describes the target's active count using `n · m`, with the binary construction in the appendix collapsing repeated indices as described above.

The target pattern comes directly from the training text. At each position, the method can compute the next unit's labels using the same fixed splitter and hashes it would apply to that unit on input. A word can thus contribute to the pretraining objective even if it will never be included in an inference dictionary. Pretraining still depends on the text the network sees. The corpus-independent part is the assignment of features to strings, while the contents of the embedding rows and the behavior of the prediction head are learned from examples.

#### Recover a word from the head scores

At generation time, the head gives a value for each feature. Applying the sigmoid separately to these values turns the output into probabilities of individual activations. Several features can receive high values simultaneously. The system then needs to choose a textual unit whose pattern fits those values. The authors solve that problem by preparing a dictionary and computing the same binary pattern for each candidate in it.

The dictionary can be stored as a sparse matrix with one row per candidate and one column per feature. An active feature contributes its predicted value to a candidate's score. The raw total is divided by the number of active features for that candidate.

```
sᵥᵥ = (∑ⱼ Dᵥᵥ,ⱼ σ(zⱼ)) / (∑ⱼ Dᵥᵥ,ⱼ)
```

Here the subscript `ᵥᵥ` labels a candidate word. The value `sᵥᵥ` is its averaged score. The entry `Dᵥᵥ,ⱼ` in the dictionary matrix indicates whether feature `j` belongs to that word's pattern. The head's raw value at feature `j` is `zⱼ`, and `σ` denotes the sigmoid function applied to that value. Each `∑ⱼ` runs over the feature positions. The numerator adds the predicted probabilities for the candidate's active features. The denominator counts those features. This averaging makes the score comparable across patterns that contain different numbers of active entries.

The appendix applies a softmax to the candidate scores and selects the index of the largest score in its greedy example. The softmax is a normalization over candidates. The selected index is looked up in the dictionary, and the whitespace rules determine how its text joins the preceding output. For another generation step, the chosen unit is available to the input side through the same encoding procedure. A related spelling can score well because it shares several high-scoring features with the expected word. The usefulness of that association depends on which distinctions the head has learned to make and which candidates can be selected.

The paper discusses assembling a dictionary from the top-500k words in the training data and adding prompt words that are missing. It also considers decoding with a dictionary of 512k entries in its computational comparison. The downstream evaluation uses a more specific construction, taking the top 80k words from SlimPajama and adding the top 20k words from German Occiglot. These are choices about what can be selected at inference. The representation matrix and the head can be trained without compiling that list, and changing the list leaves their dimensions fixed.

#### Train the interface with the backbone

The authors train the conventional and T-FREE variants from scratch with their adjusted implementation, released as `trigrams`. The decoder-only backbone follows the general architecture of Llama 2. The controlled change concerns the input splitting and embedding, the output head, and the objective used by that head. Changing the feature width alters the overall parameter count by changing the two matrices associated with text. The authors retain the same intervening backbone within the comparison.

SlimPajama supplies the English training material, and Occiglot Fineweb v0.5 supplies the German material. The paper describes both as filtered and deduplicated collections. For their reference tokenizers, the authors randomly sample 20GB of SlimPajama and fit BPE and Unigram with vocabularies of 32k and 64k. Their SentencePiece configuration also includes byte fallback and digit splitting. The sample is used to fit the baselines' inventory. T-FREE derives its split units and feature indices from its rules before the language pretraining stage.

The appendix gives a sequence length of 2,048 and batch size of 1,024 for the 1B ablations, with training lasting 50k steps. In the 3B configuration, it gives a sequence length of 4,096 and a batch size of 1,024. For the continuation experiment, the schedule associated with the plotted transfer results is 90k steps on English followed by 20k steps on the German mixture. English examples account for a 20% replay share in the latter phase. Replay keeps examples from the earlier training language in the stream after the switch. The appendix gives `3e-4` as the English phase's learning rate and `1e-4` as the continued phase's learning rate.

### Experiments and results

#### Measuring how much text fits into a sequence

The paper uses fertility to compare text splitting before evaluating the trained networks. Fertility is the ratio of a tokenizer's output count to a reference count for the same document. For the Wikipedia evaluation, the reference is the segmentation produced by UDPipe. A value of `1.0` corresponds to equal counts and is the paper's target for economical word-scale encoding. This comparison concerns the amount of segmentation. Equal counts would still allow the segmentations to disagree about particular boundaries.

The main Wikipedia comparison covers English, German, Russian, Vietnamese, and Arabic. It includes the authors' English-trained BPE and Unigram tokenizers as well as tokenizers associated with established systems. The appendix extends the comparison to French, Spanish, and Italian. Using a reference segmentation for each language makes it possible to measure how much the unit count changes even when the ordinary lengths of documents or words differ between languages.

Splitting methods on Russian Wikipedia by fertility T-FREE produces the fewest units per reference word among the systems shown.

**The numbers**

| System or setting | tokens per UDPipe token |
| --- | --- |
| Unigram (64k) | 11.431 |
| BPE (64k) | 11.423 |
| Mistral (32k) | 2.560 |
| Phi-2 (50k) | 6.729 |
| Gemma (256k) | 1.903 |
| Command-R (255k) | 1.590 |
| T-FREE (this paper) | 1.338 |

Russian shows how differently the fitted inventories handle the same input. The English-trained baselines produce many more positions per reference word, even with byte fallback available. Some released tokenizers handle Russian far more economically than those baselines. T-FREE has lower fertility than each comparator in the chart. The relative positions of the released tokenizers also make clear why vocabulary size alone gives an incomplete picture. Coverage depends on which pieces were selected for the inventory.

The raw scores provide a more precise account of the language differences than an overall average. On German Wikipedia, T-FREE has fertility of 1.182, compared with 2.004 for 64k Unigram and 1.411 for Command-R. On Vietnamese Wikipedia, T-FREE records 1.400, against 5.060 for 64k Unigram and 1.597 for Command-R. On Arabic Wikipedia, the corresponding values are 1.086, 9.455, and 1.578. These figures are from the main comparison and use its displayed precision. In the appendix's French comparison, Command-R reports 1.2079 and T-FREE reports 1.2363. On English in that comparison, they report 1.1525 and 1.1636, respectively. A conventional vocabulary can therefore still give the shortest segmentation on particular samples.

The authors offer a separate estimate for Mistral's 32k tokenizer. They report a 56% reduction in average encoding length across their English, German, Russian, Vietnamese, and Arabic comparison. The comparison is specific to those languages and that tokenizer. The underlying fertility results also show why one should distinguish a gain in available text positions from a gain in prediction quality. Fertility can be measured without pretraining a generator. It says how much text fits in the sequence, while a downstream benchmark tests what the trained system can do with it.

#### Counting entries that differ only in surface form

The vocabulary analysis asks a different question about efficiency. The authors scan conventional inventories for entries with close counterparts under capitalization changes, the presence or absence of a leading space, or certain digit variants. The measured quantity is a percentage of the vocabulary. It gives the same influence to a rare entry as to a frequently used one.

Near-duplicate entries across tokenizer vocabularies Conventional inventories allocate entries to variants that T-FREE represents through shared features.

**The numbers**

| System or setting | vocabulary entries % |
| --- | --- |
| Unigram baseline (32k) | 32.99 |
| Unigram baseline (64k) | 35.24 |
| Mistral (32k) | 31.47 |
| Gemma (256k) | 34.68 |
| Llama-3 (128k) | 21.22 |
| Command-R (255k) | 15.31 |
| T-FREE (this paper) | 0.00 |

The T-FREE entry has a specific interpretation. Its input layer contains feature rows and has no conventional inventory in which the named variants would occupy independent entries. Several distinct words, including capitalized variants, may still be present in the output dictionary. The table therefore illustrates a design difference in parameter allocation. It does not measure overlap or collision rates among the binary patterns, which serve a different role in the method.

The paper gives a concrete example using the spelling `words`. Including upper-case and lower-case possibilities and treating a leading space as optional yields 64 forms in its example. The tested sub-word inventory uses 194 token occurrences in total to encode the forms, spread across 37 distinct tokens. There are 24 possible initial tokens among the encodings. The example shows how ordinary changes in presentation can affect segmentation as well as token identity. Its counts give each writing equal weight, so they describe the inventory and the construction of the example rather than the frequency of those spellings in running text.

#### Comparing the English benchmarks at a fixed backbone size

The English downstream evaluation spans 18 standardized benchmarks. They cover language prediction, question answering, commonsense reasoning, and other text tasks. The appendix lists evaluations in 0-shot and 2-shot configurations. In 0-shot evaluation, the input has no completed demonstration of the task. In 2-shot evaluation, it includes the specified number of demonstrations. The embedding-width search uses differences against 64k Unigram across the 18 benchmarks in the 0-shot configuration. This gives a distribution of task-level comparisons. A favorable overall comparison can coexist with losses on individual tasks.

In the 1B width comparison, the authors hold the backbone fixed and use `m = 10` and `k = 0`. Their most successful width is 8k. At that width, the distribution of benchmark differences favors T-FREE in the paper's overall comparison. The main discussion describes the result as favorable on average, while the figure identifies a favorable median. The tested widths all win on some benchmarks, but the settings at widths of ≤ 2k have particularly weak outlying scores. The authors' central compression result applies to the tested 8k configuration. Its embedding and head widths are 12.5% of those of the 64k Unigram baseline, which the paper also expresses as an 87.5% reduction in the affected parameters.

The full networks have 0.84B parameters for the 8k T-FREE setting and 1.07B parameters for the Unigram baseline. The difference in the full counts follows from retaining the common backbone while changing the shapes of the embedding and head. The result establishes a comparison at matched backbone architecture, with the parameter saving included as part of the outcome. It leaves open how the systems would compare if the saved parameters were reassigned to additional layers or a wider backbone.

#### Continuing English pretraining in German

The language-transfer experiment moves from text segmentation to learned downstream behavior. The paper compares T-FREE with Unigram at the 3B scale. The T-FREE configuration uses `m = 7` and `k = 3`. The reported parameter counts are 2.77B for T-FREE and 3.11B for Unigram. Both systems start from English pretraining on SlimPajama and continue on the same German mixture. The change in training data and learning rate defines the continuation phase, while each system retains its original encoding procedure.

The main transfer figure follows average benchmark scores on HellaSwag and ARC-Challenge in English and in German translation. The German evaluation before continuation is already stronger for T-FREE on these tasks. The paper reports an average German improvement of 5% for T-FREE over the 20k continuation steps in the 0-shot and 2-shot evaluations. The authors describe the Unigram improvement as small. Performance on the English versions drops slightly for both systems in the figure, with the larger drop attributed to the conventional interface. The English replay therefore accompanies continued learning in German without completely preserving the original English scores in that comparison.

The appendix gives task-level values. The German ARC-Challenge results include 0-shot accuracy of 32.0 for T-FREE and 25.7 for Unigram at the end of continued pretraining, with corresponding 2-shot scores of 33.7 and 26.5. The German HellaSwag entries at that checkpoint give 31.9 and 26.3 for 0-shot, and 31.5 and 26.1 for 2-shot. These results are benchmark scores on translated evaluations. The German versions of XNLI and TruthfulQA are also reported as accuracy comparisons, but they move comparatively little during continuation. The improvement in the main figure chiefly describes the selected pair of tasks.

The English appendix results show a varied picture at the same endpoint. On English ARC Easy, the final 0-shot scores are 62.5 for T-FREE and 60.1 for Unigram, with 66.0 for each in 2-shot. On English PIQA, T-FREE records 74.6 and Unigram 73.5 in 0-shot, while Unigram has 74.2 to T-FREE's 74.1 in 2-shot. English Winogrande favors Unigram in both displayed settings at that checkpoint, at 58.5 and 61.8 against 57.9 and 57.1. In English WebQuestions, T-FREE has 7.4 and 20.3, against 3.2 and 13.1. Together these task-level results explain why the transfer experiment is best read using the named tasks and languages, particularly where differences vary by prompting condition.

#### Checking the footprint in training and on code

The authors also profile a training pass. They compare memory using a 1B system with a batch size of 8 and a sequence length of 4k. It includes a forward pass, a backward pass, and the optimizer's contribution to peak memory. This is a separate measurement from the number of embedding parameters. Peak memory also depends on the backbone, activations, and optimizer use.

Peak profiler memory for a 1B training pass The compact T-FREE interface lowers the measured peak in the profiled configuration.

**The numbers**

| System or setting | GB |
| --- | --- |
| Conventional tokenizer (64k) | 68 |
| T-FREE (8k) (this paper) | 38 |

The authors report that the lower footprint let them triple the micro-batch size in experiments without model or pipeline parallelism. A micro-batch is the group processed together before the system accumulates or uses its gradients. Increasing the size that fits in memory can change practical training throughput. The profile establishes the memory result for the stated run. The appendix treats end-to-end decoding separately because scoring dictionary candidates adds inference work even when the learned head is smaller.

Code appears in a separate length evaluation. For each of 22 programming languages, the authors take 10k random documents from the StarCoder dataset. They use Llama 2's tokenizer as the reference for normalized sequence length because they consider a ground-truth code segmentation difficult to define. T-FREE's overall normalized sequence length is 1.045557 and the StarCoder tokenizer's is 0.860748. A value near 1.0 corresponds to a similar length to the Llama 2 reference. The per-language values vary. For Python, T-FREE records 1.005064 and StarCoder 0.857439. For Kotlin, the corresponding values are 0.925868 and 0.846053. This test answers a question about representing source files compactly. The paper evaluates code generation and other downstream coding abilities separately only as subjects for future work.

### What the ablations show

#### How far the feature inventory can shrink

The width ablation isolates a practical design parameter inside T-FREE. It keeps both the number of hashes per triplet and the case treatment constant while varying the number of rows those hashes can select. Reducing the width encourages more sharing and saves parameters. The unfavorable outliers at widths of ≤ 2k show that compression has a cost once the space available to represent distinct patterns gets sufficiently restricted in this setup. The benchmark comparison makes the cost visible even though all tested variants can still form encodings for the same input strings.

The strongest result at 8k also qualifies the intuition that adding rows should automatically improve the feature representation. In the additional width comparisons, the authors report a slight decline beyond that setting. They suggest that the training runs may have been too short for the wider variants to realize their potential. The ablation compares performance at the given schedule. It does not identify a universal optimum or determine whether the ranking would persist after longer training. Since the vocabulary is replaced by a feature inventory, the width search concerns the level of useful sharing under those conditions.

#### What changes when case variants share features

The lower-case parameter provides a more directed intervention. Random hash overlap occurs when independent calls select the same row. Lower-case sharing makes some calls coincide on purpose for spellings that differ in case. This distinction matters for infrequent variants. If a capitalized spelling has few training occurrences, some of its rows can still receive updates through the lower-case form. Keeping a portion of the hashes case-sensitive lets the remaining rows distinguish the spellings.

The authors describe the downstream ablations as evidence that lower-cased overlap helps learning get started. The reported transfer setting combines a positive lower-case overlap with a different total number of activations from the width search. Because both settings change between the principal width and transfer comparisons, the transfer improvement cannot be attributed to the lower-case parameter alone. The paper's comparisons motivate the case-sharing mechanism and show that the full interface works with it. They give a weaker basis for assigning a particular share of the downstream gain to an individual hyper-parameter.

The supplementary loss comparison addresses training dynamics. It places a conventional 3B system with width 64k beside a T-FREE variant with width 16k. Both are trained on the same SlimPajama data, with the same token batch size and the same learning rate of 4.5e-4. The T-FREE curve has fewer pronounced spikes in the example. The authors connect this behavior to more evenly distributed updates, explicit overlap between similar forms, and the change to a multi-label target. The curves compare these mechanisms together. They show how the training trajectories differ in that configuration, while leaving the relative contribution of each change unresolved.

The appendix also notes a narrower comparison concerning normalization. The input representation sums the rows, while the decoder computes an average over active positions. The authors tested input normalization and found it unhelpful in their ablations. The decoding average addresses a direct scoring concern. A total of predicted activations tends to favor candidates with more active entries, even if their typical activation is weaker. The different treatment of input and output therefore reflects both a reported input comparison and the requirements of candidate scoring.

#### What the coverage and transfer analyses add

The authors examine how concentrated the vocabulary and triplets are across SlimPajama categories. They report that 100k frequent words cover > 95% of each category in the word-coverage analysis. The trigram analysis reports > 95% coverage with 10k trigrams. These are corpus-coverage observations. They explain why a finite dictionary can cover much of the running text in the authors' training domains and why a small feature inventory may see repeated reusable patterns. A rare word omitted by a frequent-word dictionary is still important for tasks that require that word exactly.

The transfer study is a controlled comparison of complete interfaces. Sharing the English source, continuation mixture, and backbone architecture makes the difference informative about the choice between T-FREE and Unigram in that setup. The fitted Unigram vocabulary stays tied to the pieces it learned from English. T-FREE applies the same hashing rules to both languages and has relatively low fertility in German. At a fixed sequence length, that difference affects how much German text fits into an update. Spelling overlap may also provide a starting point for related forms. The separate fertility result gives direct evidence about sequence length. The transfer experiment measures the combined downstream behavior of those properties and the altered prediction objective.

The translated task results help locate that advantage. German HellaSwag and ARC-Challenge account for the encouraging average in the main transfer figure. Translated XNLI and TruthfulQA show less movement. On the English side, the task-level results contain gains, losses, and close comparisons. The analyses support the specific claim that the interface can improve adaptation on some tasks under matched training settings. They also show that easier segmentation alone gives an incomplete account of how quickly an individual benchmark will respond to new-language pretraining.

### Limitations

#### Limits identified by the authors

The authors restrict their direct training evaluations to systems of up to 3B parameters. They report that the method transferred readily from their 1B experiments to the 3B comparison. They leave open how it behaves with substantially larger networks and training collections. The appendix includes a computational comparison with a proposed trigram-based version of a larger system. That comparison illustrates matrix sizes, sparse dictionary scoring, and estimated costs. The measured benchmarks and training curves come from the smaller configurations.

Long words create a possible numerical issue. Their input vector aggregates more active rows, and the sum can behave differently from sums for shorter words. The authors say the issue was rare enough in SlimPajama to have no observed effect in their benchmarks. The appendix's category analysis reports coverage of ≥ 95% for words of length ≤ 10. The authors propose extra splitting for long outliers or repeated strings as a possible mitigation. Such splitting would change the size and content of the prediction units for those inputs, so its effect on generation remains a separate empirical question.

Repetitions also expose the binary pattern's treatment of spelling. When a triplet appears again inside the same word, its features remain active with the same value. The representation records presence and leaves out multiplicity. The authors report that repetitive triplets were uncommon enough in their tests to make their effects difficult to measure. They suggest that splitting at repetition or adding position-dependent information might help. The reference to rotary embeddings is a suggestion for adding information about location, rather than a feature of the evaluated encoding. [RoFormer](https://md.research.elamur.ai/free/en/papers/su-2021-roformer-enhanced-transformer-rotary-position/)

The paper leaves detailed evaluations of [coding tasks](https://md.research.elamur.ai/free/en/topics/code-and-programming/) to future work. The length comparison on source files establishes how many positions the splitting rules consume against a chosen reference. It leaves execution correctness, code completion quality, and the handling of project-specific identifiers unmeasured. The authors also identify Chinese as an untested case for their representation and discuss possible character or word splitting and phonetic representations. These proposals matter because the word-sized positions that make the pipeline economical depend on being able to find useful boundaries.

Finally, the authors study one constructed hash scheme. Their parameter experiments vary its use rather than comparing independent designs for the hash itself. The reported spelling overlap and learning behavior therefore belong to that scheme and those settings. The paper also proposes a hybrid interface that keeps conventional tokenization at the front and applies trigram features to the resulting pieces. This preserves the possibility of reshaping the text interface while keeping the compact backbone representation. The hybrid appears as a design illustration.

#### Limits visible in the setup

A fixed input encoding and a replaceable dictionary give different kinds of coverage. The encoding can immediately assign features to a rare spelling in a prompt. The decoder scores only the candidates supplied to it. Adding an omitted spelling can make selection possible, but the hash rule provides no guarantee that the trained head will rank it correctly. Removing a word can prevent the system from emitting it through that dictionary entry. It does not establish that the generated text is factually accurate. The authors discuss dictionary control as a possible way to reduce hallucinations, while their experiments measure memory, segmentation, and benchmark performance in the specified settings.

The distinction between deliberate overlap and collision is similarly important. Shared trigrams enforce shared features, and unrelated trigrams can select the same row. Unordered binary patterns also discard the multiplicity of repeated triplets. Distinct trigram encodings alone would be insufficient to prove that every distinct word receives a distinct pattern after aggregation. The appendix's combinatorial example explains why many distinct patterns can fit in a small feature space, but there is no exhaustive collision experiment over possible spellings. The vocabulary-duplicate result concerns conventional entries with close spellings and cannot serve as that collision experiment.

The scope of the language evidence is uneven in a useful way. Fertility is measured across multiple languages with different spelling systems, while continued pretraining is tested for the English-to-German direction. The paper's explanations invoke spelling and language similarities, and the replay mixture retains English during the German phase. The measured gain is consequently tied to both the languages and the training regimen. Low fertility on Arabic or Russian Wikipedia establishes economical segmentation there. Performance after transferring an English generator into either language remains an empirical question.

Fixed sequence and batch sizes also leave an important exposure difference. When the two interfaces use different numbers of positions to represent the same raw text, a step at the same sequence length need not carry the same amount of original text. That difference is part of the practical case for T-FREE. It limits an interpretation that assigns the German gains only to representational sharing at equal exposure to raw text. A comparison matched by read text would answer a different question from the reported comparison matched by training settings.

The paper describes the English pretraining schedule differently in different places. The general setup gives 110k English steps before describing the continuation phase. The transfer figure and appendix configuration give 90k English steps and 20k continuation steps. The interpretation of the plotted German gains follows the schedule stated with that figure, while the inconsistency leaves the general English step count uncertain. The reported 20k continuation duration is consistent in those descriptions.

The runtime results also depend on what is being timed. A smaller learned head reduces dense projection work and the memory occupied by that projection. Candidate scoring requires a sparse dictionary operation after the head. The paper's appendix expects a slight increase in inference runtime across the pipeline in its illustrative comparison, while also emphasizing that fertility changes the number of positions needed for a passage. The relative costs depend on the vocabulary used for decoding, the size of the input, and the implementation of sparse operations. The training memory profile and the inference discussion therefore answer different practical questions.

### What came after

The later papers that cite T-FREE place it alongside work on multilingual generation, byte-based processing, and the ability to change tokenization as language changes. The citation links establish that these works refer to T-FREE. The relationship that can be described for each is the one visible in its stated subject.

[Fanar](https://md.research.elamur.ai/free/en/papers/abbas-2025-fanar-arabic-centric-multimodal-generative/) (2025) describes an Arabic-centric multimodal generative AI platform. Its point of contact with T-FREE is the language orientation of a generative system's text interface. T-FREE evaluates Arabic in the Wikipedia fertility comparison, where the authors' English-trained baselines use many positions per reference word and the fixed spelling-based rules give a shorter encoding. Fanar makes Arabic central to the platform's stated scope. Its citation places T-FREE's tokenizer analysis in that setting. The information available about the relationship establishes no specific adoption of the hashed embedding or candidate decoder.

[Byte Latent Transformer](https://md.research.elamur.ai/free/en/papers/pagnoni-2025-byte-latent-transformer-patches-scale/) (2025) frames its contribution around patches formed from bytes and their scaling relative to tokens. It addresses a question T-FREE also raises. If text can enter the network without consulting a learned sub-word vocabulary, the system still needs an economical unit at which to do expensive sequence processing. The patch-based direction and T-FREE's spelling-based word features identify different units for that work. T-FREE's experiments concern compression, fertility, and transfer for its own choice of units. The later paper's title locates its own comparison in scaling.

[FLEXITOKENS](https://md.research.elamur.ai/free/en/papers/owodunni-2026-flexitokens-flexible-tokenization-evolving-language/) (2026) takes flexible tokenization for evolving language as its subject. That concern connects to T-FREE's separation between encoding rules, learned weights, and the selection of decodable strings. In T-FREE, a new spelling can be assigned features by the existing rule, and a dictionary can be exchanged after pretraining. FLEXITOKENS frames change in the language itself as the reason to make the text interface flexible. Its citation connects that question to T-FREE, with the specific mechanism of transfer between the works left unspecified.

## Cite

Cite as Björn Deiseroth, Manuel Brack, Patrick Schramowski, Kristian Kersting and Samuel Weinbach. 2024. T-FREE: Subword Tokenizer-Free Generative LLMs via Sparse Representations for Memory-Efficient Embeddings. Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2024.emnlp-main.1217](https://doi.org/10.18653/v1/2024.emnlp-main.1217)

```bibtex
@inproceedings{deiseroth2024t,
  title = {{T-FREE: Subword Tokenizer-Free Generative LLMs via Sparse Representations for Memory-Efficient Embeddings}},
  author = {Björn Deiseroth, Manuel Brack, Patrick Schramowski, Kristian Kersting and Samuel Weinbach},
  booktitle = {Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.1217},
  url = {https://doi.org/10.18653/v1/2024.emnlp-main.1217}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
