Viqus Logo Viqus Logo
Home
Categories
Language Models Generative Imagery Hardware & Chips Business & Funding Ethics & Society Science & Robotics
Resources
AI Glossary Academy CLI Tool Labs
About Contact
Back to Glossary
Technical Concepts Advanced Also: Model Optimization, Model Efficiency, Neural Network Compression

Model Compression

Definition

A family of techniques that reduce the size, memory footprint, and computational cost of AI models while preserving as much performance as possible — enabling deployment on resource-constrained devices and reducing inference costs.

In Depth

Model compression addresses a fundamental tension in AI: the most powerful models are enormous (billions to trillions of parameters), but many deployment environments have strict constraints on size, speed, memory, and power consumption. A model running on a smartphone, an embedded sensor, or even a cost-sensitive cloud endpoint cannot afford the computational resources of the original training setup. Model compression techniques bridge this gap by producing smaller, faster models that retain most of the original's capability.

The three primary compression techniques are quantization, pruning, and knowledge distillation. Quantization reduces the numerical precision of model weights — from 32-bit floating point to 16-bit, 8-bit, or even 4-bit integers — dramatically reducing model size and speeding up computation on hardware that supports low-precision arithmetic. Pruning removes individual weights or entire neurons/layers that contribute little to the model's output, creating a sparser, more efficient network. Knowledge distillation trains a smaller 'student' model to mimic the outputs of a larger 'teacher' model, transferring the teacher's knowledge into a compact form.

Model compression has become increasingly important as the AI industry matures from research to production. Running inference on frontier models like GPT-4 at scale costs millions of dollars — compression directly reduces these costs. The open-source community extensively uses quantization to run large language models on consumer hardware (running a 70-billion parameter model on a gaming laptop via 4-bit quantization). Edge AI deployment on phones, watches, and IoT devices would be impossible without aggressive compression. Techniques continue to advance: structured pruning, mixed-precision quantization, and compression-aware training increasingly achieve near-lossless compression.

Key Takeaway

Model compression shrinks AI models through quantization, pruning, and distillation — enabling efficient deployment on devices, reducing cloud costs, and making powerful AI accessible beyond data centers.

Real-World Applications

01 On-device LLMs: 4-bit quantization allows large language models to run on consumer laptops and smartphones (e.g., Llama models via llama.cpp).
02 Mobile applications: compressed vision models enable real-time camera features like object recognition and augmented reality on phones.
03 Cloud cost reduction: quantized models serve inference at a fraction of the cost of full-precision models, critical for high-volume APIs.
04 IoT and embedded systems: pruned and quantized models run on microcontrollers with kilobytes of memory for sensor data processing.
05 Knowledge distillation: smaller student models (e.g., DistilBERT) achieve 95%+ of a large teacher model's performance at a fraction of the size and cost.