What is Taco?
Taco is an experimental lossless compressor that uses GPT-2 to predict data and a range coder to encode it. It is aimed at people exploring language-model compression who need compressed files to decode identically across different hardware. Its integer-only engine is designed to produce the same predictions across processors, and the command-line tool folds and unfolds files. Taco is slow and remains an alpha proof of concept, so it is not a replacement for established compressors; keep another copy of important data.
Taco Features:
Lossless Coding: Taco uses GPT-2 to predict upcoming data, then a range coder stores what the model did not predict and restores the original bytes.
Integer Inference: Its HardShell engine runs the model with integer arithmetic only, avoiding floating-point differences in predictions between processors.
Cross-Platform Output: The same input can produce matching compressed-file hashes across tested CPU and GPU backends on macOS, Linux, and Windows.
CPU and GPU Backends: Implementations cover CPU NEON and AVX2, NVIDIA CUDA, and GPU backends using Vulkan, Metal, and DX12.
Text and Logs Profiles: The text profile restarts model context at 16 KiB blocks, while the logs profile uses 64 KiB blocks and 512 bytes of context overlap.
Command-Line Folders: The CLI folds a file into a .taco archive and unfolds that archive back into a byte-for-byte copy.
Taco Benefits:
Exact Recovery: Byte-for-byte restoration lets users verify that decoding preserved the original content rather than producing an approximation.
Hardware Portability: Matching output across tested hardware makes it possible to move an archive between machines without relying on the original processor or backend.
Smaller Text Files: Some measured English text, HTML, and log files compressed smaller than xz or zstd, offering a potential storage saving for those kinds of data.
Consistent Predictions: Integer-only calculations address a source of hardware-dependent decode failures in compressors whose model predictions use floating-point arithmetic.
Inspectable Design: The Apache-2.0-licensed source and open integer-inference specification give technically inclined users material to examine and test.
Use Cases:
Small Text Experiments: Try compressing a few-kilobyte English text file to explore how a language model and entropy coder handle ordinary prose.
Log File Compression: Use the logs profile to evaluate compression on server logs, where Taco has measured results against conventional compressors.
HTML Archiving: Test whether Taco can reduce the size of HTML pages before storing them as losslessly restorable archives.
Cross-Machine Checks: Fold a file on one supported machine and unfold it on another to check that the content survives a hardware change.
Backend Conformance: Run the included demo on different systems and compare its compressed-file hash to check whether the backends agree.

