Show HN: Overfitted a 900KB Transformer to Compress a 100MB CSV into 7MB
TL;DR Highlight
A tiny transformer overfitted to one CSV reportedly shrank 100MB to 7MB.
Who Should Read
Backend developers weighing ML-based compression to cut storage costs for large logs or CSV files
Core Mechanics
- The headline result is 100MB to 7MB
- A 900KB transformer was deliberately overfitted to that file.
- The article body is missing, so method details are unavailable.
- The model ships with the compressed file
- Commenters assumed the 900KB model travels alongside the output.
- The same model is needed to decompress.
- Compression comes from next-byte prediction
- One comment says the real compression happens in the data model.
- Arithmetic coding turns those predictions into bits.
- The idea is not new, per commenters
- Comments mention Fabrice Bellard's attempt 7 years ago and LLMzip.
- This comes from comments, not the article.
Community Reactions
- Comparison with conventional compressors is lacking
- One commenter noted only WinZIP was compared and asked about LZMA2 level 9, BZIP2, and ZPAQ at max effort.
- Another said the 100MB CSV is not in the repo, so results can't be reproduced.
- Model overhead may set a break-even size
- A commenter asked whether small files lose the gains because of the 900KB model.
- Several asked if retraining is needed for each new file.
- Dataset-specific models beat general ones, one view says
- A commenter argued a model targeted at one dataset will always beat a general algorithm.
- They added that on large data the model's embedding cost can offset the benefit.
- Related work and ideas came up
- Comments mentioned the Hutter Prize, stavros's Stable Diffusion image compression, and TabPFN.
- Others floated HTML compression and image codecs.
How to Apply
- Measure baselines on your own CSV
- Today, pick your largest CSV and compress it with gzip, xz, bzip2, and zstd, noting sizes.
- Use these numbers as the baseline before trying ML compression.
- Count total size including the model
- Add the model file size to the compressed size when comparing.
- Check whether model cost eats the gain for small or one-time files.
- Add a round-trip check
- After decompressing, compare the file hash with the original.
- If hashes differ, don't use the method.
Try It
# Run in shell: baseline before trying ML compression (just change the filename)
f={{file.csv}}
ls -l $f
gzip -9 -k -c $f | wc -c
bzip2 -9 -k -c $f | wc -c
xz -9 -k -c $f | wc -c
zstd -19 -c $f | wc -cTerminology
Related Papers
A Beginner's Guide to Local AI with Inkling, Qwen, and Unsloth
Install Unsloth Desktop, load a quantized Qwen model, and share a private ChatGPT-like AI on your home LAN.
Muru – AI-assisted Rust server for Python apps by mod_WSGI's creator
mod_wsgi's creator is building Muru, an AI-assisted Rust ASGI/WSGI server, documenting it in public
87% of the Anthropic power will come from gas and 11% from coal in 2028
Analysis of Anthropic's contracted data centers: 87% gas, 11% coal power in 2028
Anthropic’s Nasdaq debut
Anthropic listed on Nasdaq and closed its first day below its opening price.
OpenAI still has a WebRTC Problem
WebRTC drops late audio, hurting voice AI; MoQ retransmits and buffers instead
Gemini 4 Neon
Gemini 4 Neon cuts cost per task 32% versus Carbon, at $3 input and $15 output per million tokens
AI is killing All About Berlin
After Google AI Overviews, a Berlin guide site lost 70-75% of its traffic.
Not Everything Needs an LLM
PostHog used small decision models to skip 98.7% of expensive LLM calls
Related Resources
- https://news.ycombinator.com/item?id=48644463
- https://news.ycombinator.com/item?id=27244004
- http://prize.hutter1.net/
- https://www.stavros.io/posts/compressing-images-with-stable-diffusion/
- https://github.com/samyak112/pym-particles
- https://www.tensordyne.ai/silicon-and-math
- https://news.ycombinator.com/item?id=42647343