# Poster 29408

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/29408

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hello, my name is Julie Kalini and I am a second year computer science PhD student at Stanford University. I'm excited to be presenting our paper, Mr. D5 Dynamic Token Merging for Efficient Byte -Level Language Models.
I'll begin by introducing subword tokenization, a fundamental preprocessing step used in almost all modern language models. Subword tokenization has several drawbacks, including sensitivity to character-level noise like spelling errors, as well as unfair compression rates across different languages and scripts. I'll defer to Andrej Karpathy for a more comprehensive list of its many shortcomings.
So what is the alternative to subword models? That would be tokenization-free models, which skip this preprocessing step entirely. The focus of this talk will be on Byte T5, a byte-level counterpart to multilingual T5. Byte T5 operates directly on raw bytes without any downsampling. While Byte T5 matches or even surpasses MT5 on many downstream tasks, its heavy encoder and lack of sequence length reduction make it inefficient and impractical for real-world use cases.
In short, operating at the byte level comes with huge inference costs. We'll be asking: Can we make an existing byte -level model more efficient? This is where mr.t5 comes in. mr.t5 is a more efficient variant of ByteT5 that uses dynamic token merging to reduce the sequence length processed by its encoder. As we saw before, feeding raw characters or bytes into ByteT5's encoder results in long sequences.
mr t5's encoder is a modification of the ByteT5 encoder. mr t5 merges the sequence dynamically using a delete gate and an early encoder layer. After processing through a few layers, mr t5's delete gate takes in the contextual hidden states for the byte sequence and outputs a sequence of numbers that tell us which tokens can be deleted from the sequence and which can be retained to be processed by future encoder layers.
During training, mrT5 uses soft deletion via soft attention masking. Deleted tokens are masked out from the attention mechanism of future encoder layers and cross attentions. During testing, mrT5 uses hard deletion via hard column removal which results in inference runtime speedups.
Mr. T5 can also target a specific deletion ratio, which we call delta, using a tunable regularizer loss, and we provide the details in the paper. In our continued pre-training experiments, we train several Mr. T5 and baseline models on ByteT5's Span Corruption pre-training objective. All training and evaluation data is sampled from multilingual C4 and covers 15 typologically diverse languages.
And all models are initialized from a pre -trained Byte-T5 small with 300 million parameters. I'll now walk through the results. On the y-axis, we plot bits per byte, a tokenizer-independent version of perplexity. And on the x-axis, we plot the sequence length reduction achieved by the model. Byte-T5 is plotted in the lower left corner since it presents a bound on the best possible bits per byte we can achieve, and it does not reduce the sequence length.
Next, I have the performances of several mrTFive models with different deletion rates. More deletion results in higher bits per byte, but mrTFive is generally competitive with byteTFive while significantly reducing the sequence length. This is especially true when we compare mrTFive to alternative deletion baselines and baselines that use alternative downsampling or pooling methods as well.
Mr. T5 has much lower bits per byte at the same sequence length reduction rates as other baselines, showing that it is the best option for balancing both efficiency and performance.
If we home in on one MrT5 model with an overall sequence length reduction rate of fifty percent, and test it on individual languages separately, we can see that MrT5 learns language specific deletion rates. At the same time, MrT5 only introduces a slight bits-per-byte increase compared to byteT5 for each language.
And finally, Mr. T5's sequence length reduction corresponds to a decrease in inference runtime relative to ByT5, with more deletion resulting in a greater speedup. Separate from the models I've talked about so far, we also trained a large ByT5 and a large Mr. T5 model with 1.23 billion parameters each, and we found that Mr. T5's efficiency gains are even greater at a larger model size, while Bits per Byte comes much closer to matching ByT5's.
Mr. T5's small and Mr. T5 large models are now available for download on HuggingFace. Check out the model card for a quick start example. Thanks for listening, and be sure to check out the paper for additional fine -tuning results on several multilingual and character-level downstream tasks.
