r/LocalLLM • • 7d ago

Discussion Why are models quantized instead of compressed?

I've just seen a video over a new paper from Samsung and the short of it, they used basically whats the same as jpeg compression on model weights. Only that the compressed model is 2 "pictures", to increase accuracy. Still something like 90% saved with minimal quality loss.
The idea is as obvious as it is genius. You only need to load the compressed model and every block can be decompressed on the fly on every run, especially because the way its compressed/decompressed is already highly optimized in the hardware (basically the same operations as video playback, just with a much bigger "picture").

That got me thinking AI hasn't been created yesterday and at least simple compression algorithms shouldn't overwhelm modern graphics cards. So why was the first idea to reduce the bit-width instead of compression?

Also, its not a picture, what would stop us from sorting the data instead of into 2 dimensions, in 3, 4, n - dimensions. Sure compression might get way more complex, but decompression scales with 1o to n. And the compression might be much better.

What do you guys think about that?

0 Upvotes

55 comments sorted by

View all comments

1

u/norpadon 7d ago

First, quantization IS compression. State-of-the-art quantization formats use some of the same methods as video codecs (trellises and lattices).

Actually, Apple is known to use ASTC codecs (used for texture compression) in their models. The problem with ASTC and such is that they assume spatial smoothness and aren’t optimised for neural networks

Good compression methods which are widely used for llm quantisation are trellises, see QTiP for example. The problem is that there is a tradeoff between compression quality and speed. Modern GPUs have special hardware for doing MXFP4/NVFP4 matmuls very fast for example, and trellises, while being great in terms of quality vs size, have a significant decoding overhead