Taco: a lossless LLM compressor that produces identical bytes on every platform
A new alpha compressor called Taco uses a GPT-2 language model to achieve lossless compression while guaranteeing bit-for-bit identical output across macOS, Linux, and Windows, on CPU and GPU backends including NEON, AVX2, CUDA, Metal, and Vulkan. The project's engine, HardShell, runs integer-only inference so that every machine calculates the same predictions. A file folded on an Apple M2 unfolds byte for byte on an AMD Ryzen workstation or an NVIDIA RTX laptop, regardless of operating system or GPU vendor. Version 0.1.0 was released on 19 October 2026 as a proof of concept; the authors warn it is slow and not a replacement for zstd or xz.
How the model predicts and the coder stores residuals
Taco is a lossless compressor. The GPT-2 model predicts the next piece of data, and a range coder stores only what the model did not predict. The demo folds a 3,672-byte English text sample down to 648 bytes, and unfolds it back to the exact original bytes. The release program folded the demo sample on seven backends — three operating systems, two CPU architectures, and four kinds of processors — and every unfold restored the original file byte for byte. The SHA-256 hash of the .taco file was identical across all seven: 2fab1ef7a1c70cd4e39ddfd88a8d66389ae07a403111db131326ae425460652e.
Integer arithmetic eliminates platform-dependent floating-point drift
Most language-model compressors rely on floating-point arithmetic, which produces different results on different hardware due to non-associative operations and vendor-specific kernel implementations. Taco's HardShell engine runs the model with integer arithmetic only. The converter reads each float32 weight as mantissa × 2^exponent and calculates with exact fractions, so every machine makes the same model file byte for byte. The GPT-2 small model file (gpt2.hsm, about 127 MB) is the same on macOS and Linux, with SHA-256 aaa03eb96e9ad7957432168c8ac6b4a99ed55d57e637e4786a664b51001ba5c2.
Rules that force identical results across compilers and drivers
Integers alone do not guarantee identical results. Taco encodes rules that programmers, compilers, CPU types, and GPU drivers must obey. Every sum must have an accumulator wide enough, with the bound written in the code, or it wraps on overflow in a defined way. Every rounding and every clamp has one written rule. Signed division uses floor-division helpers. Tests on each push verify these conditions; they cannot prove the code obeys them everywhere, but they provide a strong check.
Cross-platform compatibility tested on seven backends
The release 0.1.0 was tested on seven configurations. Apple M2 ran CPU (NEON) and GPU (Metal) backends. AMD Ryzen 7 5800H ran CPU (AVX2) on both Linux and Windows. NVIDIA RTX 3060 Laptop ran CUDA on Linux and Windows, and GPU (Vulkan) on Windows. In every case, the folded file had the same SHA-256 hash, and the unfold restored the original file byte for byte. Cross-architecture checks confirmed that an M2 Mac can fold and a Linux x86 machine can unfold, and the reverse works as well. GitHub Actions CI on each push produces the same 50 conformance hashes on Linux x86-64 and Linux ARM64. Fuzzing — millions of cases involving damaged containers, coder streams, and model files — resulted in zero failures.
Compression ratios: competitive on text, weaker on binary
Taco's compression ratios are competitive on text but not state-of-the-art. On an English book of 32 KiB, Taco produces 8,432 bytes, compared to 12,400 for xz -9e and 12,463 for zstd -19. On an HTML page of 24,603 bytes, Taco produces 4,759 bytes, compared to 7,652 for xz -9e and 7,713 for zstd -19. Against another model-based compressor, ts_zip produces smaller files (21,713 bytes on alice29.txt at 1.14 bits per byte) but uses a larger, newer model (RWKV, 169M parameters); Taco's profile text restarts the model context at each 16 KiB block. On the 16 Loghub log files (4.46 MB total), Taco achieves 0.494 bits per byte, 10.8% smaller than xz -9e (0.554), but paq8px -8 is smaller still (0.348). Binary files such as Excel documents are stored raw with zstd.
Speed: GPU acceleration is essential for practical use
Taco is slow compared to traditional compressors. With a GPU, it folds text at about 85 to 129 KB/s and unfolds at about 26 to 31 KB/s. With the CPU only, it folds at about 0.3 to 2 KB/s and unfolds at about 0.1 to 0.5 KB/s. For comparison, zstd -3 compresses at hundreds of MB/s and xz -9e at about 0.7 MB/s. The GPU mixer on an RTX 3060 at 95 W CUDA reduced fold time for a 171 KB Apache log from 208.8 seconds on CPU to 4.5 seconds, and unfold from 90.1 seconds to 53.8 seconds. The largest files folded with GPT-2 so far are 2.4 to 2.7 MB.
Model quality: integer vs float differs by 0.2%
Model quality is measured in bits per byte. GPT-2 small in float gives 1.867 bits per byte across 16 text files (42,256 bytes). The integer version (gpt2.hsm) gives 1.871, a total increase of 0.2%. Single files change from −9.0% to +6.6%. The conversion saturates large activations, which changes the predictions; against a float model with the same saturation, the integer model is 2.3% larger. The model file is the same on every machine, so the slight quality trade-off is the price of cross-platform bit-for-bit compatibility.
Checksums detect errors but cannot repair them
Each .taco file stores the SHA-256 of the original data, and unfold checks it. If unfold fails, the checksum finds the error but cannot repair it. The authors advise keeping the original until you have unfolded the .taco file one time. Errors can come from bugs in Taco's code, GPU driver bugs, or hardware faults; Taco runs a self-test before using a GPU and falls back to the next backend if the test fails.
Known limits and hardware support status
Taco is English only; on German and French it is larger than PPMd, and on Chinese larger than gzip. Small files unfold slowly — about 10 to 13 seconds for a 16 KiB block on an RTX 3060. The model file is 127 MB and both machines must have the same file; the release does not download it yet. CUDA backend requires compute capability 8.0 or more (RTX 30 series, A100 and later); older NVIDIA GPUs use wgpu or the CPU, with the same bits but slower speed. On Windows, DX12 with the old FXC shader compiler cannot compile 7 of the 14 kernels; the self-test then fails and Taco uses the next backend. Vulkan, Metal, and DX12 with DXC work. AMD and Intel GPUs need no special code; they use wgpu and the normal GPU driver. Not yet tested: Intel GPUs; AMD GPUs on Linux; AMD discrete GPUs; macOS on Intel; big-endian and 32-bit CPUs; phones and browsers.
Getting started and what Taco adds to prior work
To try Taco, git clone the repository and install rustup (Rust 1.99.0 from rust-toolchain.toml), uv for Python tools, and a C compiler for zstd. About 1.5 GB of disk and 8 GB of memory are required, with a GPU optional. Run ./try on macOS or Linux, or try.cmd on Windows, to fold and unfold the demo sample and compare the SHA-256 hash. Taco is not the first or the best compressor with a language model. ts_zip makes smaller files and is faster, and its results do not depend on GPU or CPU. Earlier work includes language models with entropy coders (LLMZip), integer networks for compression (Ballé et al., 2019), and integer-only Transformers (I-BERT). What Taco adds is the combination of an inspectable integer specification, a repeatable model conversion, several independent implementations, and tests that show they agree.