tufazip compresses 1GB of Wikipedia to 105MB with one transformer

Tommy He of Tufa Labs describes tufazip, an entry that took second place on Matt Mahoney's Large Text Compression Benchmark at the time it was submitted, September 7. It compresses one billion bytes of Wikipedia to 105,388,353 bytes, a figure that includes the trained weights and the decoder. He says it is the best-performing entry that uses a neural network as its sole prediction model; the entries above it mix a transformer with hand-built models.
The system is a 12-layer, 163M-parameter transformer initialized from a 34M-parameter model trained offline and quantized to 4.33MB. Two offline-trained layers are copied into twelve independent layers, which keep learning as the file is compressed. The decoder repeats the same learning process step for step, so the full model's learned weights never have to be shipped with the archive.
The benchmark has run for more than 20 years and rests on the link between prediction and compression: a model that assigns probability p to the next token can encode it in about -log2(p) bits, so better prediction means a smaller file. The code is on GitHub.

Larger replay windows shrink the enwik9 payload at the cost of encoding compute. Chart: Tufa Labs.

The 4K word tokenizer gave the smallest payload of the four configurations tested. Chart: Tufa Labs.

On enwik8, more parameters helped up to 77M and then stopped paying for themselves. Chart: Tufa Labs.