# Poster 31457

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

> 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.

Hi, I'm Brian Lester. I'm going to walk you through parts of our paper Training LLMs over neurally compressed text. This work was done with my colleagues at Google DeepMind and was published in TMLR. The paper is quite long, so there's a lot of interesting findings that we're going to have to skip in this video.
First, let's talk about why we want to train over compressed text. So training over compressed text has a lot of intuitive advantages. When you have some sort of compression, you can fit a lot more content into the same amount of model input. So for example, if you're modeling raw bytes, you can't fit nearly as much text into the same context window. And then also when you're thinking about just a specific piece of text, compression means that your model is going to process a smaller sequence, they'll have less computation costs, attention scaling, all those kind of things.
kind of things. And this is really reflected in the way that we train models now where our tokenizers actually are compressors. So in this work, we're trying to push beyond that and increase the compression rate by using LLMs in this sort of compression slash tokenization step. Now, how do we do that?
So many compression algorithms can be divided into a modeling, which assigns probabilities to an alphabet of symbol step and a coding component, which takes those probabilities and produces a minimal bitstream. So in this case, we're going to use a 3 million parameter transformer trained on raw bytes as the modeling component. And then we're going to use arithmetic coding as the coding component.
So then once we have that bit stream, we're going to segment that into tokens, and then we're going to try to train an even larger transformer that we call M2 on these tokens, and this model is really the goal of the whole work. So let's kind of see how it did. So to evaluate this, we're going to use bits per byte, which is essentially a normalized negative log likelihood loss, and it really lets us compare between models that have different vocabularies.
So we also care about the model size, which we're going to capture that as flops per bytes as it takes into account both the model size and the compression rate. So really in this graph what we want to be is we want to be in the lower left-hand part. So as expected, we see that our sine is better than the bytes baseline in terms of bits per byte.
Now, how does our compression base model do? Uh, not very good. Maybe it has nice scaling. Oh, not really. It's still looking bad. Well, our final result at the full scale is just not good. And what's happening here is actually the model's not learning a single thing. It's actually predicting equal probability over all tokens. And so you're actually getting nothing over just running the original M1 model, that 3 million parameter transformer model. You might as well just run that.
So through some ablations, which are discussed in more detail in the paper, we found that this M2 model tends to struggle with the arithmetic coding part. So to try this make a bit easier, we're going to reset the state of both the arithmetic coding encoder and M1 after N bits are output. This can kind of be seen as like an entropy based segmentation because we want the same amount of information in each of these little windows. And so this results in basically all these little chunks that we're seeing.
being independently arithmetic coded. And this causes like a pretty large drop in the compression rate, but it also lets M2 learn. So here now we see that when we're training over this equal info compressed text, the purple lines, we're actually beating our byte level baseline, but we're not really getting quite to the point of sentence piece.
So clearly our results don't suggest that we shall rip out our tokenizers and switch to equal info compression just yet. So the next step we did was we examined what makes the modeling of this compressed text so hard and really kind of hoping to gain insights about what needs to be addressed when deciding the next iteration of compression-based tokenizers.
So one of the big issues with compression-based tokenizers is what we're going to call stability. In most tokenization, the same word gets tokenized the same way each time. But with equal info, we can see that it can actually get broken up in different ways depending on where it falls in these windows. So for example, elephants is getting broken up three different ways in this example text.
Another issue is how contextual these tokens have become. When you add just a single extra token to the start of a sentence, sentence piece is essentially unchanged. There's just an extra token at the start. Whereas here we see when you do that for arithmetic coding, you get a huge difference in tokens and our equal info kind of helps reduce that.
Viewed another way, this contextual nature can be seen as part of the underlying bitstream, where the bitstream doesn't truly align to tokens, so you can get these situations where text information is actually split between two different tokens, and this really hurts stability, and it means you really need to understand contextual right at the token level, not just at the high level that you normally use context for.
So in summary, it's clear that naively using arithmetic progression as a tokenizer doesn't work. Equal info windowing makes learning possible but still kind of lags behind sentence piece. But there are some clear signals moving forward, namely one is that a new tokenizer that's got a better compression rate but has more of these sentence piece like behaviors. And this has manifested in some new exciting work about like entropy based stuff. So if you have any questions, reach out or swing by our poster.
