The AI assistant on your phone feels like the giant models that live in data centers, and in a sense it is the same model. It is a squeezed copy: every one of its billions of numbers rounded down to fewer digits, so the whole thing fits in your pocket. That squeeze is called quantization, and Chapter 49 of the Deployed Lab course explains how it works, what it costs, and how you prove it did no harm.

A giant list of numbers, rounded

An AI model is, at its core, a giant list of numbers, called weights, that hold what it has learned. Quantization means storing each number with fewer digits. The chapter compares it to rounding prices for a quick mental total: $4.37 becomes $4, $12.62 becomes $13, and $0.89 becomes $1. The exact total is $17.88 and the rounded total is $18, close enough for most purposes. Or picture saving a photo at lower quality: less detail, a smaller file, and most people cannot tell the difference at normal size.

The maths of the squeeze

Take the chapter's worked example, a model with 7 billion weights. At the usual 16-bit precision, each weight takes 2 bytes, so the weights alone fill 14 GB. Round each weight to 8 bits, at 1 byte each, and the model fills 7 GB. At 4 bits, half a byte each, it fills just 3.5 GB. That is the whole trick behind AI that runs on a phone: a smaller model fits on the device, answers with no internet connection, and keeps your chats on the phone instead of sending them away. The same maths settles bigger hardware questions. In the chapter, a hospital group that has to keep patient notes on its own servers can fit the 6 nurses it wants on one 24 GB graphics card at 8 bits, where the full-precision model left room for only 2 or 3 people at a time.

What the squeeze costs

Rounding loses detail, and with a model you cannot see the damage by looking at the numbers. A squeezed model can stay perfect on easy questions and quietly get worse on rare, hard ones: a rare drug name, the details buried in a very long document, a second language. The chapter tells of a team whose public benchmark scores looked the same after shrinking, until three weeks into a trial a customer working in a second language found the answers noticeably worse, because the public tests never covered that language.

How you prove it did no harm

Never judge a squeezed model by "it still sounds fine." The chapter's method is an eval: a fixed set of test questions with known good answers. Run the same set, with the same settings, on the original model and on each squeezed copy. Include the hard cases and the long inputs from real use, not just the easy average. Check the details that matter: correctly formatted answers, correct tool calls, and the languages your users actually speak. Record speed and cost beside quality, and agree how much quality you may lose before you run the test, not after. If the scores nearly match, the squeeze did no harm. If they do not, stay at the milder squeeze, usually 8 bits, or do not ship it.

Why it matters

Quantization is why capable AI keeps showing up in smaller, cheaper, more private places: on your phone, on a laptop, on one modest graphics card inside a hospital. The squeeze itself is simple arithmetic. The engineering is in the proof that the smaller copy still deserves your trust.

Sources: Deployed Lab course, Chapter 49: Quantization.

Go deeper

Chapter 49 of the Deployed Lab course works through the full picture: how many bits make how many choices, the hospital sizing problem, a hands-on lab where you pick a precision yourself, and the eval that proves a shrunk model did no harm. The full interactive course library, 193 chapters across five courses, is at deployedlab.dev, with 79 chapters free and no signup.