Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseResearch Paper · For R&DHabr AI→ original

A Transformer Compressed One Billion Bytes of Wikipedia to 105.39 MB and Took Second Place in the Benchmark

The author of tufazip trained a transformer to compress a billion bytes of Wikipedia to 105.39 MB, roughly 9.5 times smaller. The model predicts the next piece of text, and the more accurately it predicts, the fewer bits it takes to store. The decompressor repeats the same training step by step, so the weights are not stored in the archive. The takeaway for practitioners: prediction quality and archive size measure the same thing, and the cost is computation.

AI-processed from Habr AI; edited by Hamidun News
A Transformer Compressed One Billion Bytes of Wikipedia to 105.39 MB and Took Second Place in the Benchmark
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Resultsecond place in the Large Text Compression Benchmark as of September 7, 2026
Key metric #2A 12-layer transformer with 163 million parameters, starting from a 4.33 MB model
More training replaythe archive shrinks by 1.21%, but computation rises by 40%

The Large Text Compression Benchmark has run for more than 20 years, and its task is simple: losslessly pack the first billion bytes of English Wikipedia (the file enwik9) so that the final archive, together with the decoder, is as small as possible. As of September 7, 2026, tufazip took second place. It is a system in which the only text predictor is a transformer neural network. The result came to 105,388,353 bytes, or about 105.39 MB. The original file shrank roughly 9.5 times. For anyone working with language models, this story is useful because it shows, with real numbers, the price of every megabyte and every extra operation.

Why compression is prediction

The idea underlies the Hutter Prize. If a model predicts the next token (a fragment of a word) well, that token can be written in fewer bits. Predictable content takes little space, while unexpected content takes a lot. Doubling the probability of the correct token saves exactly one bit. Arithmetic coding turns these probabilities into a ready data stream: the numeric interval from zero to one is divided in proportion to the probabilities, the segment corresponding to the actual token is selected, and so on, step by step.

Therefore, the total error of a language model (cross-entropy, expressed in bits) equals the length of the compressed file. Work by Huang and colleagues on the link between compression and intelligence shows that for modern models, the degree of compression on external text correlates closely with average scores on tests. Compressing a single file remains a narrow measure, but an honest one: it cannot be gamed, and any shortfall in prediction immediately increases the archive size.

How tufazip works

The main trick, inherited from Fabrice Bellard's NNCP, is training without transmitting weights. The encoder and decoder start with the same model and repeat the same sequence: predict the next token, write or read it, update the weights. Because both sides do this deterministically and identically, the weights accumulated during the process do not need to go into the archive. The decompressor simply goes through the entire training path again.

The predictor is a decoder-only transformer: 12 layers, 163 million parameters, and a vocabulary of about 4,000 tokens. The author used a familiar modern set of components: RoPE positions, a SwiGLU-type MLP, RMSNorm normalization, and query-key normalization in the attention block.

Purely online training from scratch yielded 105.98 MB. For comparison, NNCP v3.2 in 2023 achieved 107.26 MB including the decoder. The author then added a pretrained small model with 34 million parameters, quantized to 4.33 MB. Its two layers are copied into the 12 independent layers of the large model, and those layers keep learning as compression proceeds. This "starting capital" costs 4.33 MB in the archive, but it pays off: the total dropped to 105.39 MB.

What produced the gain and what it costs

The most clear-cut lever turned out to be replay training. The model periodically returns to text it has already decoded and trains further on it. This does not add new data to the archive, because the text is already known to both sides. With the same 163 million parameters and a 4,000-token vocabulary, widening the replay window from 15 to 35 million tokens reduced the archive for the full enwik9 from 107.22 to 105.92 MB. The saving was 1.30 MB, or 1.21%, while computation rose by roughly 40%. Another observation: smaller vocabularies consistently performed better, while no stable dependence on model size was found.

To select configurations, the author used enwik8, the first 100 million bytes of the file, and ran only the best candidates on the full billion.

The limitations are also clear. The method is symmetric: decompression costs as much computation as compression, and replay training makes it even more expensive. This is a research record on a single English text file, not a replacement for gzip or zstd in production. Among the benchmark leaders are also hybrid systems, where a neural network works alongside statistical models and complex preprocessing. tufazip stands out because the neural network is the only predictor here.

What to take away

For practitioners, the lesson is that model quality and output size can be measured on a single scale, where every addition is counted together with its storage cost. The 4.33 MB pretrained model paid for itself, while extra hundreds of millions of parameters without proper tuning do not guarantee a gain. The project's code is open on GitHub in the Tufalabs/tufazip repository, so the results can be reproduced and checked on your own data.

Story

Key Questions Answered

Why compression is prediction?

The idea underlies the Hutter Prize. If a model predicts the next token (a fragment of a word) well, that token can be written in fewer bits. Predictable content takes little space, while unexpected content takes a lot. Doubling the probability of the correct token saves exactly one bit.

How tufazip works?

The main trick, inherited from Fabrice Bellard's NNCP, is training without transmitting weights. The encoder and decoder start with the same model and repeat the same sequence: predict the next token, write or read it, update the weights. Because both sides do this deterministically and identically, the weights accumulated during the process do not need to go into the archive. The decompressor simply goes through the entire training path again.

What produced the gain and what it costs?

The most clear-cut lever turned out to be replay training. The model periodically returns to text it has already decoded and trains further on it. This does not add new data to the archive, because the text is already known to both sides. With the same 163 million parameters and a 4,000-token vocabulary, widening the replay window from 15 to 35 million tokens reduced the archive for the full enwik9 from 107.22 to 105.92 MB. The saving was 1.30 MB, or 1.21%, while computation rose by roughly 40%.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — A Transformer Compressed One Billion Bytes of Wikipedia to 105.39 MB and Took Second Place in the Benchmark https://news.hamidun.com/en/news/18702/a-transformer-compressed-one-billion-bytes-of-wikipedia-to-1

What do you think?
Loading comments…