Neuralzip- per-file neural text compression with model weights included in the archive [P]

Reddit r/MachineLearning Tools

Summary

Neuralzip is an open-source Python tool for per-file lossless neural text compression that bundles small model weights with the arithmetic-coded stream, achieving 33.6% smaller archives than gzip-9 on a five-book test set while noting PPMd still wins on that collection.

I’m sharing Neuralzip, an open-source experiment in lossless text compression with a small neural model. The model learns from the text being compressed. Its byte probabilities are used by an arithmetic coder, and the archive stores the model weights together with the encoded stream. Decoding restores the exact original bytes without retraining. The quantity I’m measuring is the complete archive size, including the cost of storing the model. On one five-book collection: Original: 3,120,899 bytes gzip-9: 1,191,527 bytes Neuralzip: 791,134 bytes That is 33.6% smaller than gzip-9, including weights, stream, metadata, and checksum. Reconstruction was verified against the original bytes. The result doesn’t extend uniformly across inputs: gzip beat the saved Alice model, and PPMd beat Neuralzip on the five-book collection. Training and inference costs are also substantial compared with conventional compression. These results use completed research checkpoints. Fresh training runs can produce different archive sizes. The implementation is available as a Python package: python -m pip install neuralzip neuralzip encode notes.txt neuralzip decode notes.txt.nzip Code · Browser demo I’m interested in feedback on model overhead versus stream savings, evaluation methodology, and how to make deterministic decoding more efficient.
Original Article

Similar Articles