Bit-exact and 30% smaller: what lossless model compression buys you, and where it doesn't

retrANSMIT, Cloudflare's Unweight, DFloat11 and a controversial llama.cpp PR all make the same promise: shrink BF16 model weights without changing a single bit. We explain the shared trick, work out what it costs in speed, and show why there's next to nothing to gain on Q4 and Q8 GGUFs.

Analysis Dec 3, 2026 10 min read Original analysis by our editors
Illustrative image, AI-generated

What this is about

VRAM is scarce and expensive. According to The Register, DRAM prices were expected to double in early 2026, and Bloomberg doesn't see relief for more than a year at the earliest. That makes the pitch from several projects that have surfaced in recent months sound all the more tempting: BF16 model weights shrink by roughly a third without a single bit changing. This is genuine lossless compression, like a ZIP file. It's not quantization, where numbers are stored more coarsely and some precision is lost.

The newcomer is retrANSMIT, a codec built directly for llama.cpp. Alongside it there's Cloudflare's open-source kernel Unweight, the longer-established DFloat11, the storage format ZipNN, and an open llama.cpp pull request called QFX16, whose method is covered by a patent filing. We explain the trick they all share, run the numbers on what it costs, and finally answer the question of who it's actually worth it for.

The shared trick: wasted bits in the exponent

A BF16 number consists of 16 bits: 1 sign bit, 8 exponent bits for the order of magnitude (like the power of ten in "3.2 × 10⁻²") and 7 mantissa bits for the actual digits. Those 8 exponent bits could represent 256 different orders of magnitude. But trained model weights almost all sit in a narrow range around zero. Cloudflare measured that the 16 most common exponent values cover more than 99 percent of all weights in a typical layer. The Shannon entropy, meaning the actual information content, is about 2.6 bits rather than 8, according to the DFloat11 paper. The ZipServ paper arrives at 2.57 to 2.74 bits. Another paper (arXiv 2510.02676) traces this back to a mathematical property of training: the weights follow a distribution in which the exponents inevitably cluster.

The sign and mantissa, on the other hand, look practically random and barely compress. So every project does the same thing: leave sign and mantissa untouched and compress only the exponent using entropy coding. Common values get short codes and rare ones get long codes, a bit like Morse code, where the common "E" is just a single dot. DFloat11 and Unweight use Huffman codes for this, while retrANSMIT uses rANS (asymmetric numeral systems). According to the developer of the GPU library dietgpu in a Hacker News discussion, rANS gets closer to the theoretical minimum and is easier to parallelize.

The math: 1 + 7 + 2.6 gives you 10.6 bits instead of 16, so at most about 34 percent savings. In practice, DFloat11 lands at 10.81 to 11.12 bits per weight, or about 70 percent of the original size.

The projects compared

Project Method Savings (per developer) Speed Hardware / License
retrANSMIT 0.1.0 rANS on exponent pairs 29–32% VRAM Generation 66–72% of BF16, prompt 84–93% RTX 50 (Linux binaries) / MIT
Unweight (Cloudflare) Huffman, MLP exponents only 13% (inference), 22% (distribution) 30–41% lower throughput H100/H200 only / BSD-3
DFloat11 Huffman approx. 30% (≈ 11 bits) about half as fast at batch 1 CUDA GPUs / Apache-2.0
ZipNN Exponent coding on the CPU approx. 33% for BF16 decompresses on load CPU, for storage/download
QFX16 (PR #26136) "Z-RLE" factor of 1.14 (14.07 bits) Streaming: 2.1 tokens/s open, patent pending
Q12H fixed 16-entry exponent table 12.875 bits (80.5%) Generation 1.04–1.16× Vulkan, CPU

The Unweight numbers are easy to verify. MLP layers make up about two thirds of a model. Thirty percent savings on those gives you roughly 20 percent overall. If inference mode only compresses the gate and up matrices, i.e. two thirds of the MLP weights, you're left with 0.3 × 4/9, just over 13 percent. That's exactly the figure Cloudflare cites.

retrANSMIT's numbers are internally consistent too. According to the developer, Qwen3.5-4B shrinks from 8.4 to 5.8 GB. That's 69 percent, or just over 11 bits per weight, almost exactly the DFloat11 figure. What makes retrANSMIT technically stand out is that it doesn't convert anything in advance. The unmodified GGUF file is compressed piece by piece on the GPU while loading. During text generation, the CUDA kernel decompresses the weights directly inside the matrix-vector multiplication, without writing a decompressed copy to VRAM. Prompt processing uses a staging buffer of at most 64 MiB. You turn it all on with --compression on via a patch for llama.cpp b12900. A repository link is in the Reddit post. We couldn't find any independent measurements; all figures come from the developer.

The price: decompression costs compute

In theory, compression could even make things faster. During text generation, a GPU is usually memory-bound: it's waiting for weights to arrive from VRAM. Cloudflare writes that the tensor cores compute about 600 times faster than memory can deliver data. So fewer bytes ought to mean more speed.

In practice, decompression usually eats up that advantage, because variable-length codes are a poor fit for the parallel GPU architecture. Cloudflare puts it this way:

"Unweight is not a free lunch."

On the H100, Cloudflare measured a 41 percent throughput loss at batch size 1 and around 30 percent at batch size 1024. retrANSMIT, at 66 to 72 percent of BF16 speed, is in the same ballpark. According to its README, DFloat11 is about twice as slow as BF16 at batch size 1. Because the decompression overhead is constant per pass, it gets spread across many requests at large batch sizes, and the penalty shrinks.

There are counterexamples. The research project ZipServ reports an average of 1.22× more throughput than vLLM on the RTX 4090 and L40S, because it fuses decompression directly into the matrix multiplication. The small project Q12H measures 16 percent faster generation on an RTX 3070 with Vulkan. These are claims from the respective authors, not independent tests. But they show that the speed penalty isn't a law of nature; it's a question of kernel optimization.

Why there's almost nothing to gain on Q4 and Q8 GGUFs

If you run models locally, you most likely use quantized GGUFs such as Q4_K_M (about 4.9 bits per weight) or Q8_0 (8.5 bits). The exponent trick doesn't work there. Our explanation: quantization stores a shared scaling factor for each block of 32 or 256 weights. That factor does exactly the exponent's job, so the redundant magnitude information is already gone. The remaining 4-bit levels are used fairly evenly and look almost random to a compressor.

The literature confirms this. The paper arXiv 2508.19263 finds no usable compression for FP4 values (MXFP4/NVFP4) and stores them unchanged; only the scaling factors are compressible. For FP8, the ECF8 method still saves 9.8 to 14.8 percent on language models. For Q4_K_M files, a paper published in IJCA in 2026 reports, according to its abstract, about 4 percent across the whole file. The Q6_K tensors it contains barely shrink at all (factor of 1.01). We couldn't fully verify that number, but it fits the theory from arXiv 2510.02676: the lossless lower bound there is about 4.67 bits per weight ("FP4.67"). A Q4 quant is already below that.

Special case QFX16: slow, unreviewed and patent-encumbered

The title of llama.cpp PR #26136 touts "2.05x compression, zero quality loss." But the 2.05 only applies relative to FP32, where there's plenty to squeeze anyway. Against 16-bit weights, Llama-3.2-1B gets a factor of 1.14 (2357 to 2073 MiB), far from the theoretically possible ~1.5. In streaming mode, where weights stay compressed in memory, the 1B model manages 2.1 tokens/s. FP32 without compression hits 19 tokens/s.

A third type in the PR, QFX-Q, isn't lossless at all: it reaches a perplexity of 12.69 versus 12.54 for F16. Perplexity measures how "surprised" a model is by a test text; lower is better. One commit message also cites 12.1 tokens/s where the PR description claims 22.9. According to its description, the PR was created with AI assistance. A bot flagged its size; there's been no response from maintainers.

The tricky part is the note that QFX16 and QFX32 are covered by a provisional patent filing from QomputeAI, while the code is offered under the project's MIT license. A provisional filing mainly secures a priority date; the full application has to follow within a year. The MIT license doesn't mention patents, and whether it includes patent rights is disputed among lawyers. An article on opensource.com argues that the phrase "to deal in the Software without restriction" covers patents too, but it only addresses US law. Apache-2.0, DFloat11's license, by contrast contains an explicit patent grant. Our take: for a project like llama.cpp, a contribution with a pending patent is a risk maintainers have historically been reluctant to take.

Beyond that, llama.cpp has shown little interest so far. An RFC for the related, near-lossless BF16X format was automatically closed as "not planned" without any maintainer response.

Is it worth it for me? A worked example

Rough rule of thumb, for weights only: BF16 takes 2 bytes per parameter, lossless compression about 1.375 bytes, Q8_0 around 1.06 bytes, Q4_K_M around 0.61 bytes. On top of that come the KV cache (the buffer holding the conversation so far) and other buffers.

Model BF16 lossless (~11 bits) Q8_0 Q4_K_M
12B 24 GB 16.5 GB 12.8 GB 7.3 GB
27B 54 GB 37 GB 28.7 GB 16.5 GB
  • 24 GB VRAM: A 12B model only fits on the card at full precision once compressed. That's the Gemma 4 12B case from the retrANSMIT list, with 32 percent savings. But Q8_0 would be smaller and faster. In the cited measurements it was practically on par with F16 (12.53 vs. 12.54 on Llama-3.2-1B, 21.010 vs. 21.016 on MiniCPM5-1B).
  • 48 GB VRAM: A 27B model in BF16 doesn't fit uncompressed, but it does with lossless compression, leaving a good 10 GB for the KV cache. In exchange, it generates text about 30 percent slower.
  • Just short on memory: This is where the benefit is clearest. According to its paper, DFloat11 was 2.3 to 46 times faster than BF16 with offloading to system RAM.

The big picture

Lossless weight compression is solid computer science, not magic. The roughly 30 percent is well documented, and several projects independently arrive at about 11 bits per weight. Providers benefit most: Cloudflare ships smaller model packages to its data centers around the world, ZipNN saves download bandwidth, and freed-up memory allows larger batches. That's how ECF8 boosted DeepSeek-R1's throughput by 150 percent. The same principle is now moving into the KV cache: ZipFusion reports up to 26.3 percent more throughput on the H100.

Our verdict for home users: it's only worth it if you need bit-identical results to the original, say for evaluations, research or comparing against reference outputs, or if a BF16 model would otherwise just barely not fit in VRAM. For everyone else, a good Q8_0 or Q6_K quant remains the better choice: smaller, faster and hard to tell apart in quality. On an already quantized GGUF, lossless compression only gains you a few percent. And retrANSMIT is a version 0.1.0 with self-reported numbers that still need independent verification.

#compression#llama.cpp#bf16#quantization#vram#cloudflare

Ask the AI assistant

Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.

Connecting …

The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.

Comments

What do you think? Already tried it? Write it here, no sign-up needed.

  1. Loading comments …

Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.