What Is a Small Language Model? SLM vs. LLM Explained
Small language models like Google's Gemma 4, Microsoft's Phi-4-mini, Alibaba's Qwen3, and Hugging Face's SmolLM3 trade raw scale for on-device speed, privacy, and lower cost.

A small language model, or SLM, is an AI language model built with far fewer parameters than a flagship large language model (LLM) — typically under about 10 billion, versus the hundreds of billions to over a trillion found in frontier LLMs — so it can run directly on a phone, laptop, or single GPU instead of a data-center cluster. Google's Gemma 4, Microsoft's Phi-4-mini, Alibaba's Qwen3, and Hugging Face's SmolLM3 are current, real-world examples: each ships as open weights specifically so it can run on-device, at low cost, and with data kept local.
- SLMs generally run from well under 1 billion up to roughly 10–30 billion parameters, small enough to fit on consumer hardware.
- Google's Gemma 4 ships edge-sized E2B and E4B models designed to run offline on phones, Raspberry Pi, and NVIDIA Jetson Orin Nano, per Google's announcement.
- Microsoft's Phi-4-mini is a 3.8B-parameter dense transformer with a 128K-token context window, built for compute-constrained and on-device deployment via ONNX Runtime, per Microsoft's Azure blog.
- Alibaba's Qwen3 family spans 0.6B to 32B dense models plus mixture-of-experts variants, all released under an Apache 2.0 license, per the official Qwen3 GitHub repository.
What Is a Small Language Model?
A small language model is a neural network built on the same transformer architecture as a large language model, trained to predict and generate text (and increasingly images, audio, and video), but deliberately scaled down in parameter count so it can be trained, fine-tuned, and run with far fewer computing resources. According to Wikipedia's entry on small language models, SLMs are generally defined as having fewer than about 40 billion parameters, which makes it practical to run them on everyday hardware such as personal computers, laptops, and smartphones rather than requiring a dedicated server farm.
The "small" in SLM is relative. A model with a few billion parameters would have been considered enormous a decade ago; today it is small next to frontier systems. Most SLMs are built the same way larger models are — through pretraining on large text corpora followed by instruction tuning — and they are often further shrunk using techniques like knowledge distillation (training a small model to mimic a larger one), pruning (removing redundant weights), and quantization (storing weights at lower numerical precision).
How Do SLMs Differ From LLMs?
The core difference is scale, and the trade-offs that scale brings. An LLM such as the models behind major chatbot products typically has hundreds of billions of parameters and needs multiple high-end GPUs or a cloud-hosted cluster just to serve a single response. That scale generally buys broader world knowledge, stronger general reasoning, and better performance on open-ended tasks. For a sense of how those costs and capabilities are quoted for a current flagship model, see Pandromeda's explainer on GPT-5.2's pricing and context window.
An SLM trades some of that broad capability for practicality: it can load into the memory of a phone or a single consumer GPU, respond with lower latency because there's no round trip to a remote data center, and cost a fraction as much per request to run. Because the model and its weights can live entirely on the device, there's also no need to send a user's prompt to a third-party server, which matters for privacy-sensitive applications. SLMs are not simply "worse LLMs" either — several of the models below are explicitly trained and tuned to be strong at narrower jobs (coding, function calling, multilingual tasks) rather than trying to be a generalist.
Why Small Models Matter Now
Four practical pressures are pushing the industry toward smaller models alongside ever-larger ones:
- Edge and on-device AI. Phone makers and chipset vendors want assistants that work without a network connection. Google's Gemma 4 announcement names Google Pixel, Qualcomm, and MediaTek as hardware collaborators building for exactly this case, per Google's blog post.
- Cheaper inference. Serving a multi-hundred-billion-parameter model to millions of users is expensive. A model that fits on one GPU, or runs locally with no server cost at all, changes the unit economics of AI features.
- Privacy. When inference happens on the device, the user's data never has to leave it. This is central to Apple's on-device model strategy and to Google's offline Gemma deployments.
- Latency. Local inference removes network round-trip time, which matters for real-time use cases like voice assistants, in-car systems, and interactive agents. It can also matter for AI agents that need to make many fast tool calls rather than waiting on a single large response.
Google's Gemma 4 Family
Google DeepMind released Gemma 4 on April 2, 2026, describing it as built "from the same research and technology" used to create its Gemini models, per the official Google blog announcement. The family ships in four sizes: an "Effective 2B" (E2B) and "Effective 4B" (E4B) pair designed for edge devices, a 26B mixture-of-experts model that activates roughly 3.8 billion parameters per token, and a 31B dense model aimed at maximum quality. All four are released under an Apache 2.0 license, which Google calls "commercially permissive."
The edge-sized E2B and E4B models are built to run completely offline on phones, Raspberry Pi boards, and NVIDIA Jetson Orin Nano hardware, with a 128,000-token context window. The larger 26B and 31B models support context windows up to 256,000 tokens and, in unquantized form, fit on a single 80GB NVIDIA H100 GPU; quantized versions run on consumer GPUs. Per Google's technical documentation on ai.google.dev, all Gemma 4 sizes can handle text, images, and video, with native audio input supported on the E2B, E4B, and a separate 12B "Unified" multimodal variant. Google also points to mobile builds of E2B and E4B that use its LiteRT-LM runtime, needing roughly 1.1 GB and 2.5 GB of memory respectively in that form.
Microsoft's Phi-4-mini
Microsoft introduced Phi-4-mini alongside the multimodal Phi-4 model on February 26, 2025, as part of its Phi family of small language models, according to the Microsoft Azure blog post announcing it. Phi-4-mini is a dense, decoder-only transformer with 3.8 billion parameters, grouped-query attention, a 200,000-token vocabulary, and shared input-output embeddings — design choices Microsoft describes as aimed at speed and efficiency. It supports sequences up to 128,000 tokens.
Microsoft's post says Phi-4-mini is built for compute-constrained and on-device or edge deployment, particularly through ONNX Runtime, and highlights function calling and agentic use cases, such as controlling smart-home devices, as well as multilingual financial tasks like calculation, reporting, and document translation. The model is available through Azure AI Foundry, Hugging Face, and the NVIDIA API Catalog. Microsoft states the model was evaluated by its internal and external security teams using Microsoft AI Red Team methodology before release, and that it "continues outperforming larger models" on text benchmarks spanning reasoning, math, coding, and instruction-following, though the blog post itself does not print the underlying benchmark scores in text form.
Alibaba's Qwen3
Alibaba's Qwen team maintains one of the widest ranges of openly released small models. Per the official Qwen3 GitHub repository, the original Qwen3 release included dense models at 0.6B, 1.7B, 4B, 8B, 14B, and 32B parameters, alongside mixture-of-experts models at 30B-A3B and 235B-A22B (the "A" suffix denoting active parameters per token). A later 2507 update refreshed the 235B-A22B, 30B-A3B, and 4B sizes with separate "Instruct" and "Thinking" variants. All of the open-weight Qwen3 models are released under an Apache 2.0 license.
Every Qwen3 model can switch between a "thinking" mode for complex, multi-step reasoning and a faster non-thinking mode for ordinary chat, and the family supports over 100 languages and dialects. The GitHub repository documents extensive edge and on-device deployment paths for the smaller sizes: GGUF builds for llama.cpp, Ollama, and LM Studio; export to ExecuTorch for iOS and Android; Apple Silicon support through MLX LM; OpenVINO for Intel CPUs and GPUs; and MindIE for Huawei Ascend NPUs. The 2507 models support a native 256,000-token context window, extendable to 1 million tokens.
Hugging Face's SmolLM3
Hugging Face released SmolLM3 on July 8, 2025, as a 3-billion-parameter model the company describes as "fully open," with the model weights, training recipe, and configuration files all published, according to the official SmolLM3 blog post on Hugging Face. It is a decoder-only transformer based on the Llama architecture, using grouped-query attention with four groups and a technique Hugging Face calls NoPE, which removes rotary position embeddings from every fourth layer.
SmolLM3 was pretrained on roughly 11.2 trillion tokens, with an additional 100 billion tokens for long-context extension and about 140 billion tokens for reasoning-focused mid-training. It was trained with a 64,000-token context and extended to 128,000 tokens at inference using a technique called YaRN. The model supports six languages (English, French, Spanish, German, Italian, and Portuguese) and, like Qwen3, offers separate reasoning and non-reasoning modes, along with tool-calling and agentic capabilities. Because the full training recipe is public, SmolLM3 is often cited as a reference point for how a modern small model is actually built, in contrast to models whose training data and methods are not disclosed.
SLM Comparison at a Glance
| Model | Maker | Parameters | Context window | Where it's built to run |
|---|---|---|---|---|
| Gemma 4 E2B / E4B | Google DeepMind | "Effective" 2B / 4B | 128K | Phones, Raspberry Pi, NVIDIA Jetson Orin Nano |
| Gemma 4 26B MoE / 31B | Google DeepMind | 26B total (~3.8B active) / 31B dense | Up to 256K | Single 80GB H100; quantized on consumer GPUs |
| Phi-4-mini | Microsoft | 3.8B dense | 128K | Azure AI Foundry, Hugging Face, on-device via ONNX Runtime |
| Qwen3 (dense range) | Alibaba | 0.6B–32B dense; 30B-A3B / 235B-A22B MoE | Up to 256K (extendable to 1M) | llama.cpp, Ollama, MLX, ExecuTorch, OpenVINO |
| SmolLM3 | Hugging Face | 3B dense | 128K (via YaRN from 64K) | Open weights, recipe, and data for local or custom deployment |
Where SLMs Are Already Running
In practice, small models tend to show up in four kinds of places. The first is consumer devices: phone assistants and camera or photo-editing features that need to work without a signal, where Gemma's edge sizes and Qwen3's smallest dense models are explicitly tuned to fit. The second is embedded or specialized tools, such as a customer-support bot fine-tuned on one company's documentation, where a 3–8 billion parameter model fine-tuned for a narrow job can match a much larger general model at a fraction of the cost. The third is agentic and multi-step systems, where a workflow calls a model many times in sequence to call tools or retrieve information — a case where a fast, cheap SLM is often paired with a retrieval system; see Pandromeda's explainer on retrieval-augmented generation for how that pairing works. The fourth is developer experimentation and research, where SmolLM3's fully published training recipe and Qwen3's broad size range make them common starting points for fine-tuning.
Trade-offs and Limitations
Smaller models still have less capacity than large ones, and that shows up most in tasks that require very broad world knowledge, long multi-step reasoning across many distinct domains, or nuanced open-ended writing. Developers typically compensate in one of two ways: narrowing the task (fine-tuning a small model on one company's documents or one specific job) or combining a small model with outside knowledge, for example through a vector database that retrieves relevant facts for the model to use instead of relying purely on what it memorized during training. Even with those mitigations, smaller models are not immune to the kinds of invented facts and plausible-sounding errors that affect all language models.
What to Watch Next
Expect the size range labeled "small" to keep shifting. Each of the four makers above has already iterated at least once this year on the parameter counts, context windows, and licensing terms of its small models, and chipmakers are building dedicated support for them: Google names Qualcomm, MediaTek, and NVIDIA Jetson hardware as explicit Gemma 4 partners, and Qwen3's GitHub repository lists native support across OpenVINO, MLX, and Ascend NPU toolchains. For most readers evaluating whether to use an SLM in a product, the practical questions are the same ones these four releases answer differently: how many parameters actually need to load into memory, what context window the task requires, what license governs commercial use, and which runtime (ONNX, llama.cpp, LiteRT-LM, MLX) the target hardware already supports.
Frequently asked questions
What counts as a small language model?
There is no single official cutoff, but Wikipedia describes small language models (SLMs) as generally having fewer than about 40 billion parameters, small enough to train or run on everyday hardware like laptops and smartphones rather than a data-center cluster.
What is the main difference between an SLM and an LLM?
Parameter count and where they can run. Large language models typically have hundreds of billions to over a trillion parameters and need cloud-scale hardware, while small language models are built to fit on a single GPU, or even a phone, trading some general capability for lower cost, lower latency, and on-device privacy.
Can small language models run entirely offline?
Yes, for the smallest sizes. Google says Gemma 4's E2B and E4B models are designed to run completely offline on phones, Raspberry Pi boards, and NVIDIA Jetson Orin Nano hardware, and Alibaba's Qwen3 GitHub repository documents local deployment through tools like llama.cpp, Ollama, and Apple's MLX.
How many parameters does Microsoft's Phi-4-mini have?
3.8 billion. Microsoft describes it as a dense, decoder-only transformer with a 128,000-token context window, built for compute-constrained and on-device deployment via ONNX Runtime.
Are small language models open source?
Many current SLMs ship as open-weight models. Alibaba's Qwen3 and Google's Gemma 4 are both released under an Apache 2.0 license, and Hugging Face's SmolLM3 goes further by publishing its full training recipe and data mix alongside the weights.
Why are companies releasing more small models now?
Four main drivers: enabling on-device and edge AI that works offline, cutting the cost of serving AI at scale, keeping user data on the device for privacy, and reducing the network latency that comes with calling a remote server for every response.
Sources
- Google: Gemma 4 — Byte for byte, the most capable open modelsblog.google
- Google AI for Developers: Gemma model documentationai.google.dev
- Microsoft Azure Blog: Empowering innovation — the next generation of the Phi familyazure.microsoft.com
- GitHub: QwenLM/Qwen3 official repositorygithub.com
- Hugging Face Blog: SmolLM3 — smol, multilingual, long-context reasonerhuggingface.co
- Wikipedia: Small language modelen.wikipedia.org
Theo Park runs the AI desk at Pandromeda. He follows model launches from the frontier labs and the open-weight community, tracks the assistants and developer tools built on them, and explains what each release changes on pricing, capability and safety. His reporting leans on primary sources: model cards, technical reports, API documentation and the companies' own announcements.

