Back to directory

llama-zip

A lossless compression utility that uses a user-provided LLM as the probabilistic model for an arithmetic coder, achieving high compression ratios on structured or natural-language text.

llama-zip

llama-zip is a lossless compression utility that uses a user-provided LLM as the probabilistic model for an arithmetic coder, so text the model predicts with high confidence needs very few bits to encode. This gives it high compression ratios on structured or natural-language text.

A sliding context window means it is not limited by the LLM's own context length and can compress strings of arbitrary length. It also handles arbitrary binary data, not just text, by encoding invalid UTF-8 bytes as code points in Unicode's private-use areas, though at a reduced compression ratio compared to text input.

Its compression ratios were benchmarked on the Calgary Corpus text files against other compression utilities, including cmix, paq8px, zpaq, brotli, bzip2, lzma, xz, zstd and gzip, using three open-weight LLMs at two context lengths each.

More in CLI tools

See all 181
  • grev

    github.com

    A set of Unix coreutils-style filters — grep, sort, cut and more — that answer a plain-language question about each record instead of matching a pattern, using a small decision model.

  • A Node.js script that exports a Google Doc to HTML and CSS with high fidelity, preserving headings, spacing, alignment, bullet lists, images and right-to-left text.

  • gpusched

    github.com

    A VRAM-aware GPU job scheduler for a single machine: declare how much memory each shell command needs, and it places jobs the moment a GPU has room and reports when a guess was wrong.