How does retrANSMIT compress BF16 weights in llama.cpp, and what are the tradeoffs compared with running the original weights or a quantized model?
Can retrANSMIT make BF16 models fit in less VRAM without quantizing?
Answers
Yes, the idea is to keep the weights compressed in VRAM while reconstructing the exact original BF16 bits for computation. The reported weight savings are around 29 to 32%, with no quantization and no offline conversion of the GGUF file.
It takes advantage of redundancy in BF16 exponents. Pairs of exponents are entropy coded with rANS, with a separate model for less frequent pairs. The sign and mantissa bits are stored unchanged. Compression happens on the GPU as the model loads.
During generation, decoding is fused into the matrix-vector kernel rather than writing a full decompressed matrix to GPU memory. Prompt processing uses a separate decode step into a temporary BF16 buffer capped at 64 MiB, then calls cuBLAS.
Reply to this answer
There is a pretty noticeable speed tradeoff. In the reported RTX 5090 tests, Qwen3.5-4B dropped from about 163 to 114 tokens per second, while Apertus-8B went from 99 to 69. The reported generation slowdown across the examples was roughly 25 to 34%.
Those are specific model and GPU results, not a guarantee for every setup. Prompt processing and loading are separate parts of the workload, so generation numbers alone do not tell you their speed.
Reply to this answer
The useful case is when you want the original BF16 weights but they are too big for your GPU. One reported 12B example went from 23.8 GB of weights to 16.3 GB, with generation dropping from about 62 to 44 tokens per second.
That saving is for weights, not the whole VRAM budget. You still need room for the cache, temporary buffers and other runtime memory, so a model fitting on paper does not necessarily mean your desired context will fit too.
Reply to this answer
It is not a general compressor for quantized models at this point. The stated support is BF16 only, and quantized models load unchanged. FP8 and Q8_0 support were described as work in progress, with a smaller potential saving of around 10 to 12%.
Reply to this answer
Exploiting the low entropy of BF16 exponents is not a new idea by itself. The distinction here is the variable rANS encoding, GPU compression at load time and fused decoding for generation, rather than a fixed 12-bit representation.
Whether that trade is worthwhile depends on how much you value exact BF16 weights. Quantization makes a different compromise by changing the weight representation and potentially affecting output quality.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Marbles:
So the saved weight memory could leave more room for context, but it depends on the rest of the runtime allocation?
Harbor Light:
Right. Check the total memory use for your model and context settings rather than subtracting 30% from the whole VRAM requirement.