Small language models (SLMs) are commonly taken to have roughly 1 to 14 billion parameters. Examples are Llama 3.2 1B and 3B, Phi-3 and Phi-4-mini, Gemma 2 and 3, Qwen 2.5 small and Mistral 7B. They run locally through Ollama, llama.cpp or MLX, often quantized to 4-bit to fit consumer hardware.
Quantization and LoRA on local hardware
Quantization formats such as GGUF or AWQ store model weights at lower precision. A 7B model then fits in roughly 4 to 5GB of RAM and can run on a CPU, GPU or NPU. The conversion saves memory at some cost in quality.
A small model can be adapted to a narrow task with LoRA (Low-Rank Adaptation). Training on your own dataset can close part of the gap to a larger model on that task.
- Quantize the weights to 4-bit.
- Fine-tune with LoRA for the specific task.
- Run on the device or on a local server.
Data that stays on the device
Running locally needs no internet connection after the model is downloaded. Latency is more predictable, and prompts and documents stay on the device unless your application sends them elsewhere. For a security reader this is the main attraction: no prompt or document goes to a third-party API, so privacy-critical work has a smaller exposure surface. Cost is predictable too, and there are no rate limits.
The alternative is sending every request to a frontier cloud API. That brings per-token cost, network latency and the privacy concern of sending sensitive data over the internet. For narrow, high-volume work such as classification, extraction or routing, a fine-tuned SLM can often reach comparable quality at a fraction of the cost.
SLM versus frontier model
| Requirement | Better fit |
|---|---|
| Privacy-critical, offline or latency-sensitive | SLM |
| High-volume, narrow tasks | SLM |
| Open-ended reasoning, long context, broad world knowledge | Frontier model |
Edge computing is the closest comparison, since processing happens near where data is generated. It differs in one respect: SLMs give up some frontier reasoning in return for privacy, offline operation and predictable cost. A common pattern is to handle the first pass with an SLM and escalate complex cases to a larger model.
Slow responses and quantization artifacts
Example scenario: SLM responses take over 500ms in 40% of cases. The figures are illustrative.
Two causes are worth checking. Quantization can shift the workload onto hardware or kernels that run slower than expected. Compressed weights can also lose nuance, so complex or long contexts may yield incoherent output, and users then retry.
- Confirm the quantization level is set to 4-bit as intended.
- Look at input context length and structure for problem queries, for example prompts over 100 tokens.
- Log quality metrics for incoherent responses to find patterns.
A higher-bit quantization may improve quality if the hardware allows it, at the cost of more memory. Track the share of incoherent responses and adjust with user feedback.