Small Language Model Design › What Counts as Small

Michael BrenndoerferDecember 1, 20263 min read
Language AI HandbookAll chapters
Part 43 of 67Small and On-Device Language Models
Chapter 327Small Language Model Design › What Counts as Small
Reading section 2 of 11 · What Counts as Small · 3 minSection 2 of 11 · 3 min

Section 2 of 11 · 3 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

In the deployment example we'll call 0.5B to 7B parameters small. The application sets the actual boundary. In decimal units, 7B weights at two bytes each require 14 GB before caches and working memory. At an ideal four bits per weight the same count needs 3.5 GB. A 13B model at that ideal packing would need 6.5 GB for weights. These are storage calculations. Quantization groups, metadata, and tensors retained at higher precision can raise the realized memory requirement. See INT4 Quantization for examples of those formats.

Write down the constraints before ranking candidates:

  • Memory. Budget for weights, cache at peak context and concurrency, activations, and process overhead. A model file that fits may still exceed the available working set.
  • Latency. Set a first-token and full-response target on the intended hardware. Loading weights, processing the prompt, and generating the answer make different contributions.
  • Task coverage. List what must work locally and what can be retrieved, sent to another model, or declined. Include the application's language and document slices.
  • Training. If you intend to train or adapt the model, budget for hardware, training tokens, and each training stage separately from inference.

The weight estimate can help rule out a candidate before testing. If the process limit is 4 GB and you model 0.6 GB of non-weight overhead, there is at most 3.4 GB for weights and the KV cache together. A 3.5 GB weight payload plus the fixed reserve totals 4.10 GB, exceeding the budget with zero KV cache. Conversely, a 2 GB file could be a candidate if its actual resident weights, cache, and largest temporary allocations fit at the same time. Compare the peak during prompt ingest and generation separately, since the largest activation allocation and the largest cache need not occur at the same point.

The constraint also determines what counts as the same experiment. A performance measurement at 512 cached tokens can describe a useful short-request slice. A requirement to summarize a long manual section calls for a measurement at the corresponding prompt length. Similarly, a batch serving one user and a batch serving eight requests can share some weight reads while accumulating different cache footprints. Record these settings alongside the parameter count whenever you compare devices or runtimes.

Evaluate the deployment constraint

Compare the smallest candidates that can serve the application under its memory and latency budgets. Decide how much model quality you can give up using the task's evaluation set.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy