Home / Insights / AI in Practice
Small Models: Quantisation, Distillation and Running AI Cheaply
Techniques that shrink models so they run faster, cost less and can stay on your own hardware.
The largest models attract attention, but much practical work uses smaller ones. They respond faster, cost less per request and can run where data must not leave.
Distillation
Geoffrey Hinton and colleagues described training a small "student" network to match the output probabilities of a larger "teacher". The probabilities carry more information than a single correct label: they show which wrong answers the teacher considered almost plausible. Today, large models are also used to generate training examples for smaller specialised ones, subject to the terms of use of the model providing them.
Diagram by O&O Consulting.
Quantisation
Model weights are numbers, commonly stored in 16 bits. Representing them with 8 or 4 bits cuts memory and often speeds up inference. Methods such as GPTQ adjust the remaining values to compensate for rounding, preserving much of the accuracy. The more aggressive the compression, the greater the risk of degradation, particularly on harder tasks.
Pruning and mixtures
Other approaches remove weights that contribute little, or use "mixture of experts" designs in which only part of a large network is active for each token.
Choosing size
A sensible sequence is to prototype with a strong model to learn what good looks like, then try progressively smaller ones against the same test set. Narrow, repetitive tasks such as classification or extraction are often within reach of small models, especially after fine-tuning.
Hosting your own
Running a model yourself gives control over data and versions but adds responsibility for hardware, updates, security and monitoring. For low volumes, a managed service is frequently cheaper once staff time is counted.
Limitations and open questions
Compression can affect some abilities or languages more than others, and an average score can hide that. Recheck fairness and safety behaviour after shrinking a model, not just accuracy.
References
- Hinton, G., Vinyals, O. and Dean, J. (2015). "Distilling the Knowledge in a Neural Network." arxiv.org/abs/1503.02531
- Frantar, E. et al. (2022). "GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers." arxiv.org/abs/2210.17323
- Shazeer, N. et al. (2017). "Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer." arxiv.org/abs/1701.06538
This article is general information, not financial, legal or investment advice. AI research and rules change quickly; check the cited sources for the current position.