# Small language model (SLM)

> Canonical: https://skillalmanac.com/glossary/small-language-model | Last verified: 2026-11-25 | Index status: index-eligible

A small language model (SLM) has fewer learned parameters than a larger comparison model. It may fit modest hardware, but fit and resource use depend on its numeric format, runtime, context length and device.

Also called: SLM, SLMs, small language models, SLM vs LLM, small LLM, compact language model.

## In plain language

A small language model is a smaller version of the AI behind chat assistants. It has fewer of the learned numbers, called parameters, that store what a model has learned, which can reduce weight storage. Whether it fits a laptop, phone or company server, and how much power or time it uses, depends on the model, numeric format, runtime, context length and device. Think of a pocket dictionary next to a full encyclopedia: quicker to carry and consult, but it covers less. IBM says small models often do worse on complex tasks that need broad knowledge, and their outputs can still contain made-up facts, so answers need checking. They are often chosen for narrow, repeated jobs where lower running cost and keeping data in-house matter.

## Technical definition

An SLM is a language model, typically a transformer, with far fewer parameters than a large language model. IBM discusses pruning, which removes weights, neurons or layers; knowledge distillation, which can train a smaller student to imitate a teacher; and quantization, which reduces numerical precision and storage per weight, not necessarily the number of parameters. IBM puts the typical range at a few million to a few billion parameters. Fewer parameters or lower precision can reduce weight memory, but hardware fit, latency and power depend on the full runtime workload; they are not guaranteed by the size label.

## How it shows up when you use agents

Coding agents such as Claude Code and Codex normally call a hosted [large language model](/glossary/large-language-model). A small model matters when you want the opposite trade: run the model yourself, keep text on your own machine, or pay less per request. Microsoft's Phi-2 write-up presents its small model as a research platform and argues that training data quality matters, which is one reason a small model is not simply a worse large one.

Small does not mean interchangeable. IBM says small models can be "less proficient on complex tasks that require knowledge across a comprehensive spectrum of topics", so swapping one into a multi-step agent can lower the quality of plans and tool calls. That cost is often found late, after outputs are already in use.

The safer habit is to test on your own tasks before switching. Collect a small set of real examples with expected answers, run both models over it and compare. The [self-hosted LLM](/glossary/self-hosted-llm) page covers what running one yourself involves, and [fine-tuning](/glossary/fine-tuning) is a common way to make a small model good at one narrow job.

Before buying hardware, check that the model fits in memory. The sizing skill below does that arithmetic, and the cost skill shows whether the running-cost saving is real at your volume.

## Common confusions

- **Small language model versus large language model.** The difference is size, meaning the number of parameters. Both generate text. There is no agreed cut-off, and IBM gives a range, not a single number.
- **Small versus quantized.** Quantization stores a model's numbers at lower precision. It is one way to make a model cheaper to run, and it can be applied to a large model too.
- **Small versus distilled.** Distillation is a training method that can produce a small model, and a small model can also be pruned or trained directly. See [Distillation](/glossary/distillation).
- **Myth.** A small model is as capable as a large one because it is cheaper. IBM says small models can match larger ones on some benchmarks but often do worse on tasks needing broad knowledge, so test on your own work.

## Worked examples in this catalogue

### [local-model-sizing](https://skillalmanac.com/skills/skill-almanac/local-model-sizing)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A check of whether an open-weight language model will run on a given GPU, Mac or PC, using a script that computes the memory needed for the weights and related costs.

Why it exercises the concept: Small models are mostly chosen because they fit on hardware you already have. This skill turns that fit into a calculation instead of a guess.

### [llm-cost-estimator](https://skillalmanac.com/skills/skill-almanac/llm-cost-estimator)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A monthly cost range for an LLM feature, built from your own usage profile and your own price table, with cache, batch and subscription effects.

Why it exercises the concept: Lower running cost is a common argument for a small model. Entering the prices of a small and a large model into your own usage profile shows whether the argument holds at your volume.

### [Claude Code](https://skillalmanac.com/tools/claude-code)

```
/cost
```

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: The /cost command in Claude Code, documented at code.claude.com, reports usage and cost information for the current session.

Why it exercises the concept: Session usage is a baseline for a hypothetical alternative-model comparison. Estimate the alternative’s costs using its prices and workload, then evaluate task quality separately; this display alone establishes neither savings nor adequacy.

## Related terms

- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)
- [Self-hosted LLM](https://skillalmanac.com/glossary/self-hosted-llm.md)
- [Fine-tuning](https://skillalmanac.com/glossary/fine-tuning.md)
- [Inference](https://skillalmanac.com/glossary/inference.md)
- [Edge AI](https://skillalmanac.com/glossary/edge-ai.md)
- [Distillation](https://skillalmanac.com/glossary/distillation.md)

## Sources

- [What are Small Language Models (SLM)](https://www.ibm.com/think/topics/small-language-models), IBM (accessed 2026-11-23)
- [Phi-2: The surprising power of small language models](https://www.microsoft.com/en-us/research/blog/phi-2-the-surprising-power-of-small-language-models/), Microsoft Research (accessed 2026-11-23)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-25. [Glossary index](https://skillalmanac.com/glossary.md).
