Small Language Model Design
Language AI HandbookAll chapters 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!