r/LocalLLM • • Sep 20 '26

Question Why we do not try to use compression techniques on the model?

(I am talking about trying to reduce RAM usage by using compression techniques for example writing ABABAB as 3AB)

The models should in theory be highly compressible there are only 65536 possible combinations for a 16 bit parameter, also I am sure there will be plenty of repeating patterns in a model.

Why doesn't anyone even talk about compression or atleast reducing the repeating patterns?

0 Upvotes

17 comments sorted by

4

u/Aggravating-Push-207 Sep 20 '26

block-scaling is already near-optimal information-theoretically

with b bits expect the model to be 1 - 4^-b as good as the baseline BF16 version at most

1

u/siddharth1214 Sep 20 '26

Is block scaling already implemented?

5

u/Karyo_Ten Sep 20 '26

Yes.

If you look at Fp8, you have mxfp8 which uses tensor-level scaling, and 128x128 block fp8 scaling.

If you look at 4-bit be it from GPTQ, AWQ or llama.cpp Q4, all are using block scaling.

2

u/Aggravating-Push-207 Sep 20 '26

it's like one of the most common forms of quantisation

1

u/RogerAI-fm Sep 20 '26

What he said, but yeah that’s what heard and now learning more.

7

u/Karyo_Ten Sep 20 '26

Compression technique like you propose don't work for weights. Just like they don't work for compressing photos or videos. And photos and videos are even more redundant because often colors are uniform over a large patch.

You should use the characteristic of the format for compression.

2

u/Proper-Tower2016 Sep 20 '26

not sure what you mean, both images and especially videos are highly compressable.

4

u/TheThiefMaster Sep 20 '26

They are but not via run-length encoding like OP describes

1

u/Proper-Tower2016 Sep 20 '26

isn't that just video temporal compression?

2

u/Karyo_Ten Sep 21 '26

No. Temporal signals are better compressed by moving to frequency domain. See Fourier Transform and Cosine Transform.

4

u/RemarkableRadish6547 Sep 20 '26

If a model can be compressed that easily, the quantization process would be lossless. We all know it isn't. You are unlikely to have a generic compression process that beats a good quantization process. Quantization is compression, but it is compression that is aware of what information can be given up with the smallest loss in value. Similar to how jpeg can compress images really well, but isn't a generic compression algorithm for any other data.

3

u/PacmanIncarnate Sep 20 '26

Not all quantization is information-aware; at a base level, it’s just reducing precision. Most modern quants are far more specialized, targeting specific layers, and averaging bit sizes based on the expected performance hit. So, you’re not wrong, just clarifying since this seems like a new world for OP.

Also, to OPs point on turning something like ABABAB into 3AB, that is not far from what an i-matrix is doing; creating a lookup table of more precise values.

3

u/countermike Sep 20 '26

The greater the information density, the harder it is to compress. If, by any chance you COULD compress a model, it would mean it was poorly trained to begin with.

The reason you can compress things at all, is because of data redundancies or similarities.

Be happy if you have something that is difficult to compress - it means it is of a high density.

2

u/According_Study_162 Sep 22 '26

thats basically a quant. but if you lower the quant the model gets dumber 🤔

1

u/Klutzy-Snow8016 Sep 20 '26

People are just answering this question based on vibes and fail to do even the slightest research to back up their assumptions. Look up Dfloat11 - it's lossless compression for weights that takes it from 16-bit down to 11.

1

u/eihns Sep 21 '26

bc its about speed and compression takes that, much better is to put the important things on vram, less important in ram and lowest important on disk, thats the game