Chapter 3
The Folded Map
Imagine you are packing for a weekend trip. You have a large suitcase that is too big for the overhead bin on the plane. You have two choices. You can leave it as is, and it will not fit. Or you can fold the clothes tightly. You press them down. You squeeze out the air. The suitcase becomes smaller. It fits in the bin. The clothes are still there. They are just a little creased. This is exactly what happens when we make a big computer brain fit into a small computer.
The computer brain is called a model. It is like a giant library of numbers. These numbers help the computer think. To think well, the computer needs very precise numbers. Think of these numbers as high-resolution photographs. A high-resolution photo shows every tiny detail. You can see the grain of wood on a table. You can see the individual threads in a shirt. This precision is wonderful. But it takes up a lot of space. It fills up your suitcase. This memory is called RAM. Think of RAM as the room in your house where you work. If the room is small, you cannot spread out all your papers. You have to stack them. This is where the trick begins. We call this trick quantization. Quantization is just a fancy word for rounding off numbers. Imagine you are measuring a piece of fabric. The exact measurement is 10.4321 inches. That is very precise. It is like a high-resolution photo. But do you really need that much detail? Maybe not. Maybe you just need to know it is about 10.4 inches. Or maybe just 10 inches. This rounding saves space. It makes the numbers smaller. This is compression. Compression means packing things tighter. Think of a suitcase again. You have a big coat. It is fluffy. It takes up too much room in the bin. You fold it tight. You press it flat. It fits. The coat is still warm. It is still useful. It is a little creased. This is what happens to the model when we compress it. The numbers inside the model are like the fabric. They hold the knowledge. They hold the answers. When we round them off, we lose a tiny bit of detail. This is called precision loss. Precision loss means the answer might be slightly less exact than it was before. It is like reading a map from a distance. You can see the road. But you cannot see the small house on the corner. The big picture is still there. The small details are gone. This is okay for most tasks. You do not need to know the exact height of every tree. You just need to know where the road goes.
Now, let us look at the labels on the suitcase. These labels tell you how tightly the clothes are packed. In the world of computers, these labels are called quantization levels. Quantization is the act of shrinking the numbers inside the model to make them smaller. Think of it like writing a recipe. If you write "add a pinch of salt," you save space. If you write "add exactly 0.5 grams of salt," you use more space. The first way is faster and simpler. The second way is precise. It takes more room. In a computer, the numbers that make up the model are like those measurements. They are very long. They have many digits after the decimal point. This is called high precision. High precision means the computer remembers every tiny detail. It is like keeping every single crease in your shirt. It looks perfect. When we use quantization, we round these numbers. We make them simpler. We say, "close enough is good enough." This saves space. It makes the file smaller. A smaller file fits in the overhead bin. It also runs faster. The computer does not have to think as hard. It does not have to remember as many digits. This is the trade-off. You gain space. You lose a little detail. Think of a photograph. If you zoom in, you see every hair on a person’s head. If you shrink the photo, the hair disappears. The face is still there. It is still recognisable. It is just less sharp. This is what happens when we compress a model. We call this precision loss. Precision loss means the model forgets some tiny details. It does not forget the big picture. It only forgets the fine print. Imagine you are packing a sweater. You fold it into a neat square. You squeeze the air out. The sweater is smaller. It is not as fluffy. But it is still warm. This is what we call compression. Compression means making something smaller without throwing it away. We do not delete the knowledge.
If you remember only one thing
Quantization shrinks the model to save space. Smaller files run faster but may lose some detail. Q4 means very compressed. Q8 means less compressed.


