Live data from Hacker News

Show HN: Overfitted a 900KB Transformer to Compress a 100MB CSV into 7MB

news.ycombinator.com

31–40 of 83 posts

Re: Show HN: Overfitted a 900KB Transformer to Compress a 100MB CSV into 7MB

#31
I've had this idea of building a codec that would similarly overfit to specific images. But the codec itself would not be a fixed size transformer... instead you could just mess around with the sizing to get better quality/smaller size.

So the codec would be something like:

I've seen experiments where people have a "fixed" pipeline but I think having something more dynamic would work quite well.

Re: Show HN: Overfitted a 900KB Transformer to Compress a 100MB CSV into 7MB

#32
post #22

Earlier quoted context omitted.

And just for comparison, my absolute best compression method managed to get down to 10s of KB, but the real unlock got to the ~1KB figures. Note these numbers are ALL post-compression numbers. This is not raw data vs compressed data. The ~100KB figure IS POST COMPRESSION. For context these numbers are for a grid based game where players can perform 4 actions per second, and the numbers I’m sharing are for 30 minutes…

I was working on a multiplayer game a while ago, and one of the iterations of the netcode was "thin client" where clients just sent input, server simulated the game, and it dumped world state onto the pipe at 60hz. I didn't ship that version but I estimated a $3000 bandwidth bill with that approach! I started looking into diffing the state, compression, etc... until I realized, wait a minute! My player movement is li…

$3000 bill wow!!

Clever insight :) yes a specialised solution usually wins! Good effort

Did you end up publishing your game?

Re: Show HN: Overfitted a 900KB Transformer to Compress a 100MB CSV into 7MB

#33

What do those compress to with conventional approaches? For comparison. I am curious. A classic machine learning ensemble approach is to overfit a collection of small models then bag them (e.g. voting) allowing the models to generalize. I'm sure someone's tried to overfit a bunch of transformers for compression like this, then bag them to see how well it does?

Ensembling is not compute or parameter-efficient, so compression per se is a terrible application. (This is related to why people train ever larger LLMs like 1 10t-parameter LLM, rather than 100 GPT-3-scale LLMs.)

Re: Show HN: Overfitted a 900KB Transformer to Compress a 100MB CSV into 7MB

#35
Lo and behold, a nice arithmetic coding implementation that wasn't written by an LLM! A sight for sore eyes – a treat, even. Looks like it was written by someone else though.

Check it out: https://github.com/samyak112/pym-particles/blob/main/arithme...

Re: Show HN: Overfitted a 900KB Transformer to Compress a 100MB CSV into 7MB

#36
post #25

Earlier quoted context omitted.

No.. they're not. Do you understand random (the apparent or actual lack of definite patterns or predictability[0]) or compression (reduces bits by identifying and eliminating statistical redundancy[1])? [0]: https://en.wikipedia.org/wiki/Randomness [1]: https://en.wikipedia.org/wiki/Data_compression

by this definition, a random dataset could apparently present no patterns, while presenting non apparent patterns.

Sounds like presenting no patterns, apparently or otherwise, would be a pattern in itself.

Re: Show HN: Overfitted a 900KB Transformer to Compress a 100MB CSV into 7MB

#37
The model is the important part, a huffman code or adaptive huffman or other sorts of encoders would be much better on a dataset based on the model. You need the model to also decode. And on a dataset of sufficient size, embedding the model and the benefit of it's memorization of the file can be offset.

A non-general compression algorithm (model - I don't mean a distinct llm, but "modeling data") targeted at a specific dataset will always do better than a general algorithm.

The reason I mentioned the "encoder" doesn't matter - arithmetic coding, for the data it is presented, will beat huffman/adaptive huffman every day, but it's the model that is where the real "compression" comes into play.

I've implemented enough "coders" over the years, including arithmetic for both commercial and research purposes (was a student of Glen Langdon).

Re: Show HN: Overfitted a 900KB Transformer to Compress a 100MB CSV into 7MB

#39

Dumb question: can you train a model to predict the next byte of ANOTHER MODEL So apply this same logic to compressing a bigger model within a smaller model I know this is absolutely regarded, but humour me please

Not dumb at all. It's a whole field of active research - Speculative Decoding. A recent paper goes one level deeper with Speculative Speculative Decoding - https://arxiv.org/abs/2603.03251

Re: Show HN: Overfitted a 900KB Transformer to Compress a 100MB CSV into 7MB

#40
post #39

Dumb question: can you train a model to predict the next byte of ANOTHER MODEL So apply this same logic to compressing a bigger model within a smaller model I know this is absolutely regarded, but humour me please

Not dumb at all. It's a whole field of active research - Speculative Decoding. A recent paper goes one level deeper with Speculative Speculative Decoding - https://arxiv.org/abs/2603.03251

Oh man awesome! I’m so S-M-R-T

Compression is such an interesting field

Post reply on HN