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

I built an experiment that uses an overfitted transformer and arithmetic coding to compress individual files.Instead of training the model to generalize, I train a 900KB transformer to memorize a single file and predict the next byte. Those predictions are fed into an arithmetic coder to produce the compressed output.On a 100MB NYC taxi CSV, it compresses to about 7MB (~0.5 bits/byte). On a 100MB slice of enwik9, it compresses to about 21MB (~1.68 bits/byte).It's pretty slow right now (roughly 20–30 minutes of training and 45 minutes each for compression and decompression on my AMD 7800XT).Checkout the repo - https://github.com/samyak112/pym-particles

Hacker NewsToolAISource
0Sign in to voteCopy link

FL score

55

out of 100

Verdict

SKIP

high confidence

Competition

No competitor data yet

Trend

No signal yet

A file-specific transformer model combined with arithmetic coding to compress large CSV and text files significantly beyond standard methods.

The pain

Current compression tools do not adapt to individual files and often miss opportunities for better compression on specific datasets.

The gap

No widely used compression tool leverages overfitted neural models to memorize and compress single files, especially large structured data like CSVs.

Build angle

Focus on improving speed and usability, then validate if this approach consistently outperforms existing compressors on real-world datasets and use cases.

Strengths

  • Novel approach combining overfitted transformers with arithmetic coding.
  • Demonstrated strong compression ratios on specific datasets.
  • Open source with reproducible results.

Risks

  • Very slow training and compression times limit practical use.
  • Unclear if approach generalizes beyond tested datasets or scales well.
  • Market for compression tools is mature and dominated by fast, well-optimized algorithms.
  • Uncertain demand for file-specific compression models given existing solutions.

Questions about this idea?

FlyBot reads the scoring and gives you a second opinion on “Overfitted a 900KB Transformer to Compress a 100MB CSV into 7MB”.

Open FlyBot