Small Language Model Design

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

Section 1 of 11 · 2 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Suppose you need a product-manual assistant to run on a laptop with 4 GB available. Two model files might take up the same space on disk, yet use different amounts of memory once they start generating. One might use a larger vocabulary that shortens the manual passages. The other might allocate fewer key and value heads so those passages take up less cache. You need to account for both before testing task quality.

We'll count the parameters in a decoder in Python, then change its architecture and see where the savings come from. At the end we'll use a separate set of deployment candidates to estimate memory and compare what the hardware budget tells us with what still needs a task or device test. The later chapters in this part take up device optimization, personalization, routing, and evaluation. The transformer block chapter reviews the components we'll count.

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