Small Language Models

Small Language Models

Phi, Qwen, Gemma; on-device inference; distillation; tool-call fine-tunes.

84Articles
84Topics covered
Articles in this category

All 84 articles, sorted alphabetically

Advertisement
ARTICLE · 01

Alpaca Format

instruction + input + output triple. Simple + widely-adopted.

Read article
ARTICLE · 02

Anthropic Fine-Tuning Format

AWS Bedrock + Anthropic Console. Similar chat JSONL, Claude-specific fields.

Read article
ARTICLE · 03

AWQ + GPTQ Quantization

GPU-optimized 4-bit quantization. Serving standard for OSS models.

Read article
ARTICLE · 04

ChatML Format

Special tokens delimit roles. Standard for chat model tokenization.

Read article
ARTICLE · 05

Dataset Ordering

How training order affects learning. Shuffling defaults + curriculum learning.

Read article
ARTICLE · 06

Distillation for Production Inference

Teacher-student in 2026: when distillation is worth it.

Read article
ARTICLE · 07

DPO

Preference pairs → policy. Simpler than PPO. Modern RLHF replacement.

Read article
ARTICLE · 08

Evaluating SLMs

MMLU + GSM8K + HumanEval + chatbot arena. Choose per use case.

Read article
ARTICLE · 09

Fine-Tuning Phi-4

QLoRA recipe for narrow tasks.

Read article
ARTICLE · 10

Fine-Tuning Operations Pipeline

Data → train → eval → deploy → monitor. Production ML workflow for LLMs.

Read article
ARTICLE · 11

Gemma Family

Gemma 1/2/3. Built on Gemini research. Open weights for commercial use.

Read article
ARTICLE · 12

GGUF Format

Model + tokenizer + metadata in one file. Cross-platform. Standard for CPU + Apple + edge.

Read article
ARTICLE · 13

JSONL Format for Fine-Tuning

Newline-delimited JSON: one training example per line. Universal format.

Read article
ARTICLE · 14

Llama Chat Template

Llama 2's [INST]/[/INST] tags. Llama 3's newer role tokens.

Read article
ARTICLE · 15

llama.cpp

C++ inference. Foundation of Ollama, LM Studio, Jan. Runs on any hardware.

Read article
ARTICLE · 16

LoRA

Freeze base weights, train small rank-r matrices. 10-100x fewer trainable params.

Read article
ARTICLE · 17

MCP for Edge Devices

Run MCP servers on IoT + mobile. Sensor + local file + control tool exposure.

Read article
ARTICLE · 18

Model Deployment at Edge

ONNX Runtime, MLC, Executorch, Core ML. Cross-platform edge inference.

Read article
ARTICLE · 19

Ollama

One-command LLM install + run. Foundation of local LLM stack.

Read article
ARTICLE · 20

On-Device LLM Inference

What runs on phones, laptops, and edge boxes in 2026.

Read article
ARTICLE · 21

On-Device SLMs

3B models baked into OS. Privacy + latency + battery matter.

Read article
ARTICLE · 22

OpenAI Fine-Tuning Data Format

Chat format JSONL with weight parameter. Function calling + tools supported.

Read article
ARTICLE · 23

PEFT

Umbrella: LoRA, adapters, prompt tuning, prefix tuning. Compare + choose.

Read article
ARTICLE · 24

Phi Family

Phi-1 through Phi-4. 'Textbooks are all you need' philosophy.

Read article
ARTICLE · 25

Phi, Qwen, Gemma: Small Models Compared

The 1B-9B parameter sweet spot in 2026.

Read article
ARTICLE · 26

Preference Data Collection

Ranked pairs for DPO/RLHF. Human + LLM annotators. Real workflow.

Read article
ARTICLE · 27

QLoRA

4-bit quantized base + LoRA adapters. Fine-tune 65B on single GPU.

Read article
ARTICLE · 28

Qwen Family

Strong Chinese + multilingual. 0.5B to 72B. Growing worldwide.

Read article
ARTICLE · 29

RLHF Pipeline

Full RLHF: supervised fine-tune, reward model, PPO. ChatGPT's original recipe.

Read article
ARTICLE · 30

SFT

Fine-tune base model on instruction/response pairs. Foundation of instruct models.

Read article
ARTICLE · 31

ShareGPT Format

Conversation list with role tags. Common for Vicuna-style training.

Read article
ARTICLE · 32

SLM batching -- throughput for small-model serving

Deep-dive on SLM batching: the per-request inefficiency, static vs continuous batching (join/leave per decode step), the throughput-latency tradeoff, …

Read article
ARTICLE · 33

SLM Deployment Architecture in Depth

A 2500-word walkthrough of SLM deployment: signed artifact, distribution, device runtime, canary rollout, cloud fallback, telemetry, thermal, rollback…

Read article
ARTICLE · 34

SLM Edge Deployment

How to deploy SLMs on mobile, embedded, and edge hardware using ONNX, GGUF, and specialized runtimes.

Read article
ARTICLE · 35

SLM distillation architecture

Deep-dive on small-language-model distillation: teacher forward, KD loss, temperature, curriculum, data augmentation, eval, and deployment.

Read article
ARTICLE · 36

Knowledge Distillation

How distillation transfers capability from a teacher model to a student, and why distilled models often beat directly-trained equivalents.

Read article
ARTICLE · 37

SLM Distillation Architecture in Depth

A 2500-word walkthrough of SLM distillation: teacher, task data, student, response/logit/reasoning distillation, diverse sampling, filtering, evaluati…

Read article
ARTICLE · 38

SLM Distillation Data Recipe

Teacher outputs filtering and CoT capture.

Read article
ARTICLE · 39

SLM distillation from LLM architecture

Deep-dive on SLM distillation from LLM: teacher, prompts, rationale outputs, student SFT/KD/RLHF, task distribution, eval.

Read article
ARTICLE · 40

DPO alignment architecture for small language models

Deep-dive on Direct Preference Optimization for SLMs: preference-pair pipelines, frozen reference models and precomputed log-probs, the beta dial, LoR…

Read article
ARTICLE · 41

SLM early-exit inference architecture

Deep-dive on early-exit (adaptive-depth) inference for small language models: intermediate exit classifiers and confidence thresholds, shared LM heads…

Read article
ARTICLE · 42

Small Language Model Edge Deployment Architecture in Depth

A 2500-word walkthrough of SLM edge deployment: base model, distillation, quantization, edge runtime, router, cloud fallback, telemetry, OTA, and gove…

Read article
ARTICLE · 43

SLM Evaluation

How to evaluate SLMs: benchmarks (MMLU, GSM8K, HumanEval), task-specific eval, and calibrating against larger models.

Read article
ARTICLE · 44

SLM evaluation architecture

Deep-dive on SLM evaluation: benchmark suite, task-specific tests, human eval, safety, regression, latency + cost, CI integration.

Read article
ARTICLE · 45

Evaluating Small Models: Common Pitfalls

Why your small model looks worse than it is.

Read article
ARTICLE · 46

SLM Fine-Tuning

How to fine-tune SLMs effectively: data quality, hyperparameters, evaluation, and when fine-tuning beats prompting.

Read article
ARTICLE · 47

FlashAttention on-device

Deep-dive on FlashAttention for on-device small language models, the algorithmic reframing that computes attention without ever materializing the quad…

Read article
ARTICLE · 48

Small Models for Tool Calling

When a 3B model beats GPT-4 for the agent's tool layer.

Read article
ARTICLE · 49

SLM function calling architecture

Deep-dive on reliable tool use from small language models: schema registries compiled to decoding grammars, streaming validation, repair loops, fallba…

Read article
ARTICLE · 50

GGUF runtime architecture

Deep-dive on the GGUF runtime behind llama.cpp and on-device inference: a single self-describing file holding metadata, tokenizer, and block-quantized…

Read article
ARTICLE · 51

Guided decoding architecture for SLMs

Deep-dive on constrained/structured generation for small models: compiling JSON schema, regex, and CFG to a finite-state automaton, per-step logit mas…

Read article
ARTICLE · 52

SLM Inference Optimization

Techniques beyond quantization: batching, speculative decoding, flash attention, and continuous batching for SLM serving.

Read article
ARTICLE · 53

SLM KV cache architecture

Deep-dive on the KV cache in small-language-model serving: why decode is memory-bandwidth-bound, prefill vs decode, paged KV blocks and block tables (…

Read article
ARTICLE · 54

SLM Landscape 2026

State of small language models. Under 15B params. Runs on laptops + phones.

Read article
ARTICLE · 55

LoRA

How LoRA fine-tunes large models by learning small low-rank updates to weight matrices, saving memory and enabling many task adapters.

Read article
ARTICLE · 56

Multi-LoRA serving architecture

Deep-dive on multi-LoRA inference serving: the low-rank adapter decomposition and why the base GEMM is shareable, the adapter registry and GPU-residen…

Read article
ARTICLE · 57

Small MoE architecture

Deep-dive on small MoE for SLMs: base, expert count, top-K routing, load balance loss, distillation, serving fit, metrics.

Read article
ARTICLE · 58

On-device SLM NPU acceleration architecture

Deep-dive on running small language models on mobile NPUs: graph compilation and partitioning, the integer MAC array and on-chip SRAM, quantization fo…

Read article
ARTICLE · 59

SLMs on Mobile in 2026

iOS Foundation Models and Android Gemini Nano.

Read article
ARTICLE · 60

On-device SLM architecture

Deep-dive on on-device SLM: quantized checkpoints, memory-mapped load, runtimes, NPU/GPU, battery + thermal, cache, fallback, OTA.

Read article
ARTICLE · 61

Small Language Models

What SLMs are, why they matter, and how they compete with much larger models on many tasks.

Read article
ARTICLE · 62

PagedAttention architecture

Deep-dive on PagedAttention for SLM serving: fixed-size KV blocks mapped through per-sequence block tables, on-demand allocation with an O(1) free-lis…

Read article
ARTICLE · 63

Prefix caching for SLM serving

Deep-dive on prefix caching for small-language-model serving: block-hashing token prefixes, a radix index of cached KV blocks, paged and reference-cou…

Read article
ARTICLE · 64

Model Pruning

How pruning removes redundant weights or attention heads from models, and how sparsity accelerates inference.

Read article
ARTICLE · 65

SLM pruning -- removing weights to shrink the model

Deep-dive on SLM pruning: removing unimportant weights, unstructured (sparse) vs structured (dense) pruning, the crucial sparsity-vs-hardware question…

Read article
ARTICLE · 66

QLoRA

How QLoRA combines 4-bit quantization with LoRA to fine-tune 70B models on a single consumer GPU.

Read article
ARTICLE · 67

Model Quantization

How quantization reduces model size and inference cost by using lower-precision weights and activations.

Read article
ARTICLE · 68

SLM Edge Quantization Architecture in Depth

A 2500-word walkthrough of SLM edge quantization: GGUF, MLC, Core ML, INT4/Q4_K_M formats, weight sharing, KV quantization, device constraints, qualit…

Read article
ARTICLE · 69

SLM router architecture

Deep-dive on SLM router: intent classifier, model registry, cost + latency budget, fallback ladder, quality gate, streaming adapter.

Read article
ARTICLE · 70

SLM serving architecture

Deep-dive on SLM serving on device/edge: quantized model, response cache, micro-batching, cloud fallback, guardrails, update, device budgets.

Read article
ARTICLE · 71

Speculative decoding

Deep-dive on speculative decoding: draft-verify mechanism, parallel verification exploiting the memory-bound insight, acceptance rate and speedup, exa…

Read article
ARTICLE · 72

SLM tensor parallelism architecture

Deep-dive on tensor parallelism for serving small language models: column- and row-parallel sharding of attention and MLP, two all-reduces per layer, …

Read article
ARTICLE · 73

Vocabulary trimming architecture

Deep-dive on tokenizer vocabulary trimming for small language models: why V x d dominates small-model budgets, corpus surveys, keep sets and byte-fall…

Read article
ARTICLE · 74

SLMs in IoT: Giving 'Dumb' Appliances a Voice with Local 1B Parameter Models

Read article
ARTICLE · 75

Small Models for Classification

Cheap inference for high-volume routing.

Read article
ARTICLE · 76

Structured Output with Small Models

JSON schemas at 3B parameters.

Read article
ARTICLE · 77

Synthetic Training Data Generation

Use frontier LLM to generate SFT/DPO data. Common + effective when done right.

Read article
ARTICLE · 78

The Economics of SLMs: Why Startups Are Saving Millions by Switching to Smaller Footprints

Read article
ARTICLE · 79

TinyLlama and the 1B Frontier: What Can You Actually Do with a 1-Billion Parameter Model?

Read article
ARTICLE · 80

Training Data Curation Pipeline

Dedup, quality filter, tokenize. Foundation of good models.

Read article
ARTICLE · 81

vLLM

PagedAttention + continuous batching. 10x+ throughput vs naive.

Read article
ARTICLE · 82

WebMCP

MCP servers as browser extensions. Anthropic's browser agent enabling protocol.

Read article