Skip to content

Model Compression

An umbrella term for methods that reduce model size and accelerate inference with minimal quality loss.

Main Methods

Method Description
Quantization Lower the precision of numbers in weights
Pruning Remove insignificant weights
Distillation Train a small model on the outputs of a large one
Weight Sharing Reuse the same weights

Why Is It Needed

Large models do not fit on weak hardware and are expensive to run in production. Compression allows:

  • running the model on a regular PC or smartphone;
  • reducing the cost of maintenance;
  • speeding up responses.

Trade-offs

Any compression is a trade-off between quality and size. A good result is achieved when the method is chosen for the task: for example, 4-bit quantization is almost imperceptible, while aggressive pruning may break the model.

See Also

← All Terms