llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

Documentation fix: Quantum -> Quantized.

Open Ujjawal-K-Panchal opened this issue 1 year ago • 7 comments

Description of changes

I just fixed a small spelling error at imatrix/readme and server/readme (specifically: quantum models -> quantized models). While it would be great to have support for Quantum Mechanics based language models in future 1, I am sure this refers to quantized models (models compressed by reducing precision of parameters).

Why I bothered making such a small PR?

I refer to these documents (imatrix/readme, server/readme) very often. At first, I just ignored the spellchecks. After a while, it became irritating. So here I am.

Ujjawal-K-Panchal avatar Jul 24 '24 09:07 Ujjawal-K-Panchal

Adding Quantum in your llm model name increases t/s by 20%.

ExtReMLapin avatar Jul 24 '24 09:07 ExtReMLapin

Isn't "quantum" actually more appropriate than "quantized"? That's why we say "quantum physics" instead of "quantized physics".

ggerganov avatar Jul 24 '24 09:07 ggerganov

Isn't "quantum" actually more appropriate than "quantized"? That's why we say "quantum physics" instead of "quantized physics".

Hmm not sure but I think "quantized" here meaning quantization in signal processing, not in physics (or I didn't get the joke? let me know if I should remove my comment)

ngxson avatar Jul 24 '24 09:07 ngxson

Heh, I wasn't joking - I genuinely think that "quantum model" is correct. Yes, the process of converting continuous values into discrete values is "quantization". In a similar way, in quantum mechanics, bound states are quantized to discrete quantities [0]. I'm drawing the analogy that quantum mechanics is modelling nature, similar to how LLMs are modelling language and hence the same terminology should apply.

[0] - https://en.wikipedia.org/wiki/Quantum_mechanics

ggerganov avatar Jul 24 '24 09:07 ggerganov

Hmm ok that make sense. Thanks for the explanation.

But mixing naming quantum/quantized maybe a bit confused, so I think this PR is not really redundant (just my opinion)

ngxson avatar Jul 24 '24 10:07 ngxson

Interesting! While the ML community in general seems to use the word "quantized" (search "quantized" at: 1, 2, 3), I see the analogy @ggerganov is making. Thanks for the explanation!

Maybe one could add a short note somewhere in the two docs for the average user about your analogy for clarity. What do you think about that?

Ujjawal-K-Panchal avatar Jul 24 '24 10:07 Ujjawal-K-Panchal

Isn't "quantum" actually more appropriate than "quantized"? That's why we say "quantum physics" instead of "quantized physics".

No, I disagree. In quantum physics things like discrete energy levels are inherent properties. Models that have been compressed from 16 bit floats to low-precision integers on the other hand have been actively changed from their original state. I personally don't like or use the term "quantum model" because it in my opinion just sounds like some marketing buzzword but I ultimately think which term is used is inconsequential; to me this is on the same level as whether or not the first letter of a code comment should be capitalized and use punctuation at the end of the line.

JohannesGaessler avatar Jul 24 '24 11:07 JohannesGaessler