Small Language Models (SLMs) is a pattern that uses compact, task-specific models (1B to 13B parameters) instead of large general-purpose models for targeted tasks. Fine-tuned SLMs can match or exceed large model performance on narrow domains at a fraction of the cost and latency.
At a Glance
- Problem: Large models are expensive to run and too slow for interactive use, but swapping in a smaller model degrades quality enough that users notice. Teams end up choosing between an expensive model that works and a cheap one that does not.
- Forces: Cost and latency versus output quality; the large upfront investment of distillation versus the moderate savings of quantization; the lower latency of speculative decoding versus running two models with no reduction in total compute.
- Solution: Cut serving cost with three techniques: distill a narrow task into a small student model, quantize weights to lower precision, or use a small draft model whose proposed tokens a large model verifies in one pass.
- Consequences: Gains: cheaper hardware, lower memory use, and lower latency, with a distilled 7B model far cheaper per call than a 70B API call. Costs: distilled models break outside their training distribution, aggressive quantization degrades quality, speculative decoding adds complexity, and all three need task-specific evaluation.
What problem does Small Language Models solve?
Frontier language models are expensive to run and slow to respond. A single inference on a 70-billion parameter model needs a lot of GPU memory and compute, and at production scale the hardware bill is large. Latency is a problem too. Generating a 500-token response from a large model can take several seconds, which is too slow for interactive applications where users expect near-instant feedback.
The obvious fix is a smaller model, but smaller models produce worse outputs: they miss subtleties, make more factual errors, and struggle with complex reasoning. Swapping a 70B model for a 7B model degrades quality enough that users notice. You end up choosing between an expensive model that works and a cheap model that does not.
Neither option is good. You want the quality of the large model at the cost and speed of the small one, and three complementary techniques get you closer to that than you might expect.
How does Small Language Models work?
Distillation is the easiest of the three to picture. You have a large "teacher" model that performs well on your task. You use it to generate a training dataset of high-quality outputs, then train a smaller "student" model on that dataset. The student does not need to learn everything the teacher knows. It only needs to learn the narrow slice of capability that your application requires.
A general-purpose 70B model knows how to write poetry, solve math problems, translate languages, and generate code. If your application is a customer service chatbot, the student model only needs to handle customer service. By narrowing the training distribution, a 7B model can match the teacher's performance on your specific use case even though it would fall apart on general benchmarks. Good distillation depends on careful curation of the training data. Generate examples that cover the full range of inputs your application will see, including edge cases, and run the teacher at low temperature for consistency. The student model can only be as good as the distillation dataset.
Quantization takes a different approach. Instead of training a smaller model, you take the existing large model and reduce the precision of its numerical weights. Neural network weights are typically stored as 32-bit floating point numbers. Quantization converts them to 16-bit, 8-bit, or even 4-bit representations. A model quantized from FP32 to INT4 uses roughly one-eighth the memory, which means it can run on cheaper hardware or fit on a single GPU that previously could not hold it.
Surprisingly, this precision reduction barely affects output quality for most tasks. Models are over-parameterized, and quantization compresses the redundancy in those billions of weights. At 8-bit quantization, quality loss is typically imperceptible. At 4-bit, there is measurable degradation, but it is often small enough to be acceptable, especially for less demanding tasks. Methods such as GPTQ and AWQ identify the weights that matter most and keep more precision there.
Speculative decoding keeps the large model's quality intact. It uses a small "draft" model to propose candidate tokens quickly, then has the large model verify those proposals in a single forward pass. Verification is faster than generation because the large model can check multiple tokens in parallel. When the draft model guesses correctly (which happens frequently for common patterns), you get the speed of the small model with the guaranteed quality of the large one. When the draft model guesses wrong, the large model corrects it with minimal overhead.
When should you use Small Language Models?
Distillation is the right choice when you have a well-defined, narrow use case and the resources to create a training dataset. It delivers the largest cost savings because you end up running a small model. But it requires upfront investment in dataset creation, training infrastructure, and ongoing model maintenance.
Quantization is the easiest to adopt. If you are self-hosting a model and memory is your bottleneck, quantization can be applied to an existing model with minimal effort. Tools like llama.cpp, GPTQ, and bitsandbytes make the process straightforward. Teams often try it first because it takes little effort for a useful gain.
Speculative decoding is the right fit when you cannot tolerate any quality degradation but need lower latency. It requires running two models simultaneously, so it does not save memory. It can still cut time-to-first-token and speed up overall generation noticeably, which matters for user-facing applications.
In practice, these techniques compose. You can distill a task-specific model, quantize it for deployment, and use it as the draft model in a speculative decoding setup with a larger verifier. Each technique works on a different side of the trade-off among cost, quality, and speed.
When not to use it: Avoid distillation while the application's scope is broad or still shifting, because the student breaks on inputs the teacher never covered; keep the full-size model, with a Model Router sending only simple requests elsewhere, until the task settles. Do not use speculative decoding to cut cost, since it runs two models and saves no compute; Prompt Caching or Inference Optimization address cost instead. And if you cannot build task-specific evaluation, you cannot tell whether a smaller model is good enough.
Worked Example: Cost and Latency
A customer service chatbot handles 50,000 requests a day, each with 800 input tokens and a 250-token answer, and a distilled small model, assumed to cost the same as the small-model reference rate, replaces the large model.
| Setup | Calls per request | Tokens per request (in / out) | Cost per 1,000 requests | Latency per request |
|---|---|---|---|---|
| Large model | 1 | 800 / 250 | $6.15 | 4.7 s |
| Distilled small model | 1 | 800 / 250 | $0.27 | 2.2 s |
The large model costs 800 × $3.00 per million + 250 × $15.00 per million = $0.00615 per request and takes 0.5 s + 250 / 60 s ≈ 4.7 s. The small model costs 800 × $0.15 per million + 250 × $0.60 per million = $0.00027 and takes 0.5 s + 250 / 150 s ≈ 2.2 s. Daily spend falls from $307.50 to $13.50, a 96% cut. Generating 20,000 training examples with the large teacher costs about $123 once, recovered in under a day of traffic, though training compute and evaluation are not included.
The numbers favor distillation for a narrow, stable, high-volume task; at 500 requests a day the saving is about $3 a day, and if drift forces frequent re-distillation and re-evaluation, that recurring work can outweigh it.
What are the common pitfalls?
Distilled models are brittle outside their training distribution. If user behavior shifts or you add new product categories or your application scope expands, the student model may fail on inputs the teacher never generated examples for. You need a monitoring pipeline that detects distribution drift and triggers re-distillation.
Quantization has a quality floor. At aggressive compression levels (3-bit or 2-bit), output quality degrades noticeably, especially for tasks requiring precise reasoning or factual recall. Always benchmark quantized models on your specific task rather than trusting general-purpose benchmarks. A model that scores well on an academic benchmark may still fail on your domain-specific evaluation.
Speculative decoding adds system complexity. You are now managing two models, their alignment, and the verification logic. If the draft model's vocabulary or tokenizer differs from the large model, integration becomes more involved. The speedup also depends on the acceptance rate. For tasks where the large model would produce unusual or creative outputs, the draft model's guesses will be wrong more often, reducing the benefit.
All three approaches require evaluation infrastructure. You need automated benchmarks for your specific use case to know whether the optimized model is good enough. "Good enough" is a product decision rather than a technical one, and you have to keep measuring against it.
What are the trade-offs?
Distillation requires the largest upfront investment but delivers the largest ongoing savings. You need to generate training data, train the model, evaluate it, and maintain a retraining pipeline. That is real operational work, but once deployed, a 7B distilled model costs far less than a 70B API call.
Quantization is nearly free to apply but provides moderate savings. You reduce memory requirements, which may let you use cheaper hardware or increase throughput on existing hardware. The quality loss is small, and it accumulates: slightly worse outputs across millions of requests wear down the user experience.
Speculative decoding improves speed without sacrificing quality but does not reduce cost in terms of total compute. You are running two models instead of one. You gain lower latency and leave total efficiency where it was. For applications where speed matters more than cost per request, this is the right trade-off.
Goes Well With
Prompt Caching reduces the number of requests that reach the model at all. Combining caching with a smaller, optimized model means you pay less for the cache misses and nothing for the cache hits. Production systems get their costs down by layering the two.
Inference Optimization techniques like continuous batching and KV cache management multiply the throughput of whatever model you deploy. A quantized model running on an optimized inference server gets the gains of both.
Model Router sends each request to the model that fits it. Simple questions go to the distilled model. Complex questions go to the full-size model. That way you neither overspend on easy tasks nor under-serve hard ones.