My reasearch of losslessly compressing LLM weights.
See the codeI'm researching ways to losslessly compress model weights.
Not quantize. Not prune. Shrink the exact bits, get every single one back.
I want SOTA models running locally on consumer hardware, affordably.
The blocker is memory. Frontier models are hundreds of gigabytes, and BF16 is a lazy encoding. Every weight burns 16 bits, but in a trained model the sign-and-exponent bits are wildly repetitive. The real entropy floor is far below what we store.
Lossless compression is my first foot forward. Every 2x saved on a model's footprint = headroom for a 2x bigger model on the same hardware.
So I run experiments. A lot of them. Most fail. This repo is the ledger of what survives.
The bar: bit-for-bit lossless, proven by exact round-trip on real weights. Estimates get labeled as estimates.
Split12 is the current leader.
The idea: byte-split BF16. Reconstruct the high byte from a codebook. Keep the low byte raw.
Compression on the full zai-org/GLM-5.2 753B scan:
Serving is the other half of the fight. The point is smaller and faster in VRAM. The inference record:
Method folder: Split12/ - format, verifier, references.
Serving and kernel record: Split12/inference/.
Writeup: the visual version.
Verify it yourself:
cd Split12 && uv sync
uv run verify.py <org>/<repo> # streams the model shard by shard from HF
ALL_BF16_TENSORS_LOSSLESS: true or it didn't happen.
Split12 is the best result so far. It won't be the last.
The emitted stream still isn't random. That means there's compression left on the table. New methods get their own folder here when they prove out.
More to come.
71 commits
1 commits
HTML
46.3%
Python
45.3%
PowerShell
8.4%
My reasearch of losslessly compressing LLM weights.
See the codeI'm researching ways to losslessly compress model weights.
Not quantize. Not prune. Shrink the exact bits, get every single one back.
I want SOTA models running locally on consumer hardware, affordably.
The blocker is memory. Frontier models are hundreds of gigabytes, and BF16 is a lazy encoding. Every weight burns 16 bits, but in a trained model the sign-and-exponent bits are wildly repetitive. The real entropy floor is far below what we store.
Lossless compression is my first foot forward. Every 2x saved on a model's footprint = headroom for a 2x bigger model on the same hardware.
So I run experiments. A lot of them. Most fail. This repo is the ledger of what survives.
The bar: bit-for-bit lossless, proven by exact round-trip on real weights. Estimates get labeled as estimates.
Split12 is the current leader.
The idea: byte-split BF16. Reconstruct the high byte from a codebook. Keep the low byte raw.
Compression on the full zai-org/GLM-5.2 753B scan:
Serving is the other half of the fight. The point is smaller and faster in VRAM. The inference record:
Method folder: Split12/ - format, verifier, references.
Serving and kernel record: Split12/inference/.
Writeup: the visual version.
Verify it yourself:
cd Split12 && uv sync
uv run verify.py <org>/<repo> # streams the model shard by shard from HF
ALL_BF16_TENSORS_LOSSLESS: true or it didn't happen.
Split12 is the best result so far. It won't be the last.
The emitted stream still isn't random. That means there's compression left on the table. New methods get their own folder here when they prove out.
More to come.
71 commits
1 commits
HTML
46.3%
Python
45.3%
PowerShell
8.4%