Quantization changes how model values are represented. Other compression methods reduce the number of values or the size of model structures. Pruning removes weights or structures, while knowledge distillation trains a smaller student to reproduce a teacher’s behavior.
Serving a smaller model is often an effective inference optimization. It reads fewer weights and may use less cache, depending on its layer count, KV heads, and head dimension. It may also allow larger batches or cheaper hardware. The difficult part is preserving the behavior the application needs and ensuring that the compressed structure is supported efficiently by the runtime.
Model Compression Beyond Quantization.Photo by Kutan Ural. Some rights reserved.
Pruning sets selected model parameters to zero or removes larger structures. Magnitude pruning starts with a simple assumption: weights with small absolute values may have less effect on the output.
Source: Machine Learning Mastery — Read the full article on the original site ↗
Get the best of this topic in your inbox
Join the newsletter. A short, useful digest, no spam.
