Model Compression
Techniques that make models smaller, faster, or cheaper to run.
How much smaller is the weight file?
Imagine a kiosk model with one million stored weights. Use decimal megabytes and count only the raw weight values.
32-bit values
One million weights at four bytes each occupy 4 MB.
8-bit values
One million weights at one byte each occupy 1 MB. That is a 75% reduction in raw weight storage.
What to measure on the kiosk
Quantized formats can carry scales, metadata and values retained at higher precision. The deployed file and peak running memory can therefore differ from the arithmetic above. Compare accuracy on the same labels and time repeated inferences on the actual device, with the same input and runtime settings.
Common Compression Strategies
Teams compress models in several ways. Knowledge Distillation trains a smaller student model to imitate a larger teacher. Quantization reduces numerical precision to save memory and speed computation. Pruning removes less important parameters. Low-rank methods and adapters can also reduce the cost of adapting or serving a model.
Each method introduces trade-offs. Compression can reduce cost dramatically, but if done poorly it may damage quality, stability, or robustness. The right balance depends on the deployment target and the kinds of errors the system can tolerate.
Follow the idea
Knowledge distillation can shrink a model by training a smaller student.
On-device AI puts size, memory and response time into a deployment context.
Related concepts
Related Yenra articles (5)
Source · Google LiteRT documentation on post-training quantization
Return to Model Compression in the A–Z glossary