Shaun Abram
Technology and Leadership Blog
What are Small Language Models?
We hear a lot about Large Language Models (LLMs) such as OpenAI’s GPT (Generative Pre-trained Transformer), Google’s Gemini and Anthropic’s Claude.
Small Language Models (SLMs) are much less well known, but include the Phi family of SLMs from Microsoft, Mistral Small, and Llama from Meta.
The “large” or “small” in these models refers to both the number of parameters in the models, and the amount of data used for training. SLMs have both a smaller number of parameters and a smaller training data set when compared to LLMs.
Admittedly, the line between LLM and SLM is blurry. There is no well defined distinction between them, but below I cover some of the common characteristics.
Parameters
Parameters are the weights in the neural network that a model learns during its training phase; the numbers by which the model captures patterns. These weights represent the model’s “knowledge”.
LLMs may have high billions or low trillions of parameters. OpenAI doesn’t publish an official parameter count for it’s GPT models, but estimates are that there are a staggering 1 trillion parameters in its GPT 4 model. Large indeed.
For SLMs, the number of parameters may be high millions low billions.
Training data
The other aspect of models is the data upon which they are trained; Words pulled from sources such as books, websites (including Wikipedia), academic papers and code repositories, as well as “multimodal data” such as images, audio and videos.
Data sets can be measure in tokens.
LLMs are trained on vast datasets that may includes trillions of tokens.
SLMs are trained on substantially smaller data sets, more to be in the billions.
| Model | Parameters (billions) |
Tokens (billions) |
| GPT-4 (LLM) | 1,800 | 13,000 |
| Phi3 Medium (SLM) | 14 | 4,800 |
However, the size of the training data is just one consideration. The quality and focus of the data is where SLMs add value. SLMs training data, while smaller, is typically highly curated and selective, focused on specific use cases such as healthcare or legal, for example.
SLM examples
One of better known is the Phi family of SLMs from Microsoft, “created to give developers tools to implement AI directly on a device without the need for cloud connectivity.”
Another is Mistral Small. The Mistral 3.1 SLM can be run locally on a Mac with 32GB RAM.
SLM characteristics and use cases
While LLMs can certainly be hosted on your internal infrastructure, the most well known models are hosted in the cloud running on hardware at a scale beyond most enterprises.
SLMs on the other hand typically run run entirely on a local device device such as a phone, or laptop, often without an internet connection. As a result, SLMs can be faster with lower latency and increased privacy and security.
Some example uses cases for SLMs include:
- An AI assistant on a smartphone
- Customer Service chatbots running within an app
- Coding assistant agents running with an IDE (Integrated Development Environment)
Tags: AI, artificialintelligence, largelanguagemodel, llm, slm, smalllanguagemodel
Subscribe to RSS Feed