14 comments

[ 2.9 ms ] story [ 33.1 ms ] thread
The leader boards are from the pre Fabrice Bellard days, btw. Neural network modeling helped finding better patterns in text.

Also, you could say the same for the related data search problem. How to prepare data, so that it can most efficiently searched. Smallest encoding vs fastest search. Databases are mostly very, very stupid compared to more data-specific tuned algorithms. Like factor 1000 slower and bigger.

Matt is a great guy to explain this kind of stuff. He's very helpful.
does anyone have any sources to read about ai-based compression?

I remember hearing a lot about "compression is a lot about prediction", but I don't remember reading any practical result

compression = prediction + entropy coding was already an insight from Claude Shannon in the 1950s

Since LLM are inherently token predictors, that makes using them for losless compression almost trivial. For something close to the state of the art see e.g. Fabrice Bellard (of course) ts_zip: https://bellard.org/ts_zip/

I think some of the confusion comes from the fact that there is a pretty big difference between the techniques employed by compressors that optimize compression ratio at the cost of nearly everything else, like ts_zip above, and practical tools that intend to balance compression ratio with limitation on CPU speed / memory, like zstd.

When optimizing for compression ratio, the prediction + entropy coding paradigm dominates. Practical tools, even modern ones like zstd, are mostly based around sliding window compression à la LZ77 (unzip/deflate), with the main selling point of more modern tools being that they scale up to larger window sizes and run really really fast. Some of these (like LZO) don't even have an entropy coding step to save time. zstd has both Huffman coding and FSE: Huffman coding is suboptimal but presumably it's an option because it's faster, and on lower compression levels it's preferable to be fast.

Anyway, the bottom line is: don't get confused between the state of the art in terms of compression ratio, and practical tools. Those are quite different things.

(comment deleted)
This is the guy who created Zpaq btw. Super interesting but niche backup/archive software.
Isn’t the idea of AI precisely to find universal compression from arbitrary input data, at least with LLMs?
I say transformers are the best compression systems
Matt Mahoney is one of the best when it comes to compression. He is retired now.
i was told that middle-out was best
I wonder what if anything has changed ever since this article. Is llm-based compression more mainstream?
Fabrice Bellard did something with neural nets and a transformer model [1] that was very successful.

I suspect that LLMs wouldn't be ideal to use as compressors, because they are large, consume a lot of resources, and are constantly changing. You need the model to produce exactly the same output at encoding and decoding time, or else you get gibberish.

[1] https://bellard.org/nncp/