Lossless BF16 compression that executes directly on the GPU.

Cirth compresses BF16 weights, KV-caches, and fine-tune deltas without quantization, then unpacks inside Apple Metal 3 and NVIDIA CUDA registers. Archives restore the original Hugging Face .safetensors SHA-256 via a 47 KB OS-only binary.

629.8 GB/s
RTX 2080 Ti CUDA effective BF16 (616 GB/s bus, 1.20x raw)
221.5 GB/s
Apple M2 Pro 16K KV25 peak (200 GB/s bus, up to 1.47x chat)
40% to 43%
Unseen 2K KV-cache savings, 13.74 GB/s CUDA rANS decode
57.87%
Fine-tune lineage delta (6.74 bpw, 44.3% under Zstd-22)

Decode trace

Recorded on Apple M2 Pro Metal 3 at true token cadence. Clone and run tools/cirth_arena.py to test live.

Speed: -- RAM: -- Token diffs: 0 / 96 Disk: --
Raw BF16 -- tok/s
RAM
-- MB
Ready 0 tok
Cirth SP-WIN3 v2 DONE FIRST-- tok/s
RAM
-- MB
Ready 0 tok

BF16 bit layout

Measured across 2.89B real weights, the 7-bit mantissa is near-random (6.972 bits of entropy) while the 8-bit exponent clusters around 2.630 bits.

Sign (1b) Exponent (8b -> 3b window) Mantissa (7b)
Bits per weight (lossless)
Standalone weights hit a 10.56 bpw Shannon floor. KV-caches and fine-tunes go further via history and parent correlation.
Raw BF1616.00 bpw
SP-WIN3 v2 (GPU weights)11.37 bpw (-28.9%)
Standalone Shannon floor10.56 bpw (-34.0%)
CKV6 v2 (2K KV-cache)9.10 bpw (-43.1%)
Fine-tune lineage6.74 bpw (-57.9%)

Benchmarks

Measured locally with isolated timings and SHA-256 or bit-exact GPU unpack verification.

NVIDIA RTX 2080 Ti (CUDA sm_75)
Ubuntu 22.04 x86_64 · 616 GB/s GDDR6 bus
Raw BF16 (DeepSeek-R1-1.5B)6.75 ms
526.4 GB/s
Cirth CUDA (Qwen3-0.6B)2.57 ms · 1.17x
584.5 GB/s
Cirth CUDA (DeepSeek-R1-1.5B)5.64 ms · 1.20x
629.8 GB/s
Red line: 616 GB/s physical GDDR6 bus (axis max 700).
Apple M2 Pro (Metal 3)
macOS 15.7.3 ARM64 · 200 GB/s unified bus
Raw BF16 (SmolLM2 16K KV)1.00x
173.8 GB/s
Cirth KV25 (DeepSeek 16K KV)1.23x · -27.8% RAM
213.2 GB/s
Cirth KV25 (SmolLM2 16K KV)1.27x · -27.7% RAM
221.5 GB/s
Red line: 200 GB/s physical LPDDR5 bus (axis max 240).
Workload Hardware Size Throughput / Speed Check
DeepSeek-R1-1.5B chat Apple M2 Pro 3,554 -> 2,526 MB (-28.9%) 40.1 -> 58.4 tok/s (1.46x) 0 diffs, -1.14 GB at 16K
Qwen3-0.6B chat Apple M2 Pro 1,503 -> 1,073 MB (-28.6%) 92.1 -> 104.5 tok/s (1.14x) 0 diffs, -896 MB at 16K
DeepSeek-R1-1.5B GEMV RTX 2080 Ti 3,554 -> 2,525 MB (-28.9%) 629.8 GB/s (1.20x raw) Bit-exact unpack, cos=1.0
Qwen3-0.6B GEMV RTX 2080 Ti 1,503 -> 1,073 MB (-28.6%) 584.5 GB/s (1.17x raw) Bit-exact unpack, cos=1.0
CKV6 v2 KV (SmolLM2 2K) RTX 2080 Ti 83.9 -> 50.3 MB (-40.1%) 13.74 GB/s (19,840 threads) GPU SHA-256 exact
CKV6 v2 KV (SmolLM2 2K) Apple M2 Pro 83.9 -> 50.3 / 47.7 MB (-43.1% xl) 7.61 GB/s (kv26-tok) GPU SHA-256 exact (Zstd-19: 24.6%)
Granite-4.0-350M lineage macOS / Linux 704.8 -> 296.9 MB (-57.9%) 6.74 bpw (35s pack, 8 thr) 44.3% under Zstd-22 patch

Install and verify

Compiles with standard Apple Clang, GCC, or NVCC. No external libraries or pip packages required.

# Cross-OS recovery test: packed on macOS ARM64, restored on Ubuntu 22.04 x86_64 $ ls -lh bin/cirth-recover && ldd bin/cirth-recover -rwxr-xr-x 1 rob rob 47K bin/cirth-recover libstdc++.so.6, libm.so.6, libgcc_s.so.1, libc.so.6 $ PATH="" ./bin/cirth-recover recover smollm2_360m.cirth restored.safetensors && sha256sum restored.safetensors e6bffe7435d7ddc10fd3b9a9efd429dafbacb1cb17015fb5562664e7532bf86e restored.safetensors

Limits