Compute-Optimal Model Design
A model's parameter count is usually written at the end of its name, as in Llama-13B.
Why Model Size Matters
When people discuss recent progress in AI, one factor comes up again and again: how large the models have become. A large share of the improvement seen in recent years is attributed to increased model size. Because of this, it is hard to talk about foundation models without also talking about how many parameters they have.
This article works through the practical side of that idea. You will learn how to read a model's size from its name, how size relates to a model's ability to learn, and how the compute needed to build such models is measured. Each of these steps builds on the one before it, so keep the chain in mind as you read: name, then size, then capacity, then the compute needed to build the model.
Reading Size from a Model Name
A model's parameter count is usually written at the end of its name. Follow the name from left to right and the size is the last piece. Take the name Llama-13B. Before you read the explanation below, try to answer the question yourself: which part of this name tells you the size of the model?
What do you think happens?
In the name Llama-13B, which piece tells you the parameter count?
Reveal answer
13B, the part after the hyphen
The part before the hyphen identifies the model family, here Llama. The part after the hyphen gives the size. The number 13 says how many billion parameters the model has, and the letter B stands for billion.
Read the name as a sentence with three parts. The part before the hyphen names the family. The part after the hyphen gives the size, and it sits at the end of the name. The letter B is a unit, so the name tells you the parameter count directly: 13B means the version of Llama with 13 billion parameters.
Reading a second model name
Given the name Llama-7B, identify the model family and the parameter count.
- 1Find the hyphen
The hyphen separates the family name from the size.
- 2Read the family
The part before the hyphen is Llama, the model family.
- 3Read the size
The part after the hyphen is 7B. The number is 7 and B means billion.
- 4Convert to a count
7B means 7 billion parameters.
The family is Llama and the model has 7 billion parameters.
Parameters, Capacity, and Performance
A parameter count tells you about a model's capacity to learn. Increasing a model's parameters increases that capacity, and the source states that this is likely to produce a better model within the same family. The comparison is only meaningful inside one family, because the name tells you the family and the size together.
Read the relationship as a chain. The name carries the size, the size sets the capacity, and the capacity is what makes the better outcome possible. The chain is a direction of reasoning, not a formula: more parameters give more capacity to learn, and that capacity is what the source links to better results within a family.
Measuring Pre-Training Compute by Machines
Building a large model is not free. Pre-training large models requires compute, and one way to measure how much is needed is to count the machines involved. The source lists GPUs, CPUs, and TPUs as the kinds of machines counted this way. A machine count is a useful starting measure, because it tells you roughly how much hardware a team committed to the work.
Why a Machine Count Is Incomplete
Counting is a useful starting measure, but it hides an important detail: machines are not interchangeable. An NVIDIA A10 GPU, an NVIDIA H100 GPU, and an Intel Core Ultra Processor are all machines, yet each has a different capacity and a different cost. Two counts that look the same can therefore describe very different amounts of hardware.
Two reports with the same machine count
Team A and Team B both report that they used ten machines for pre-training. Can you conclude that they spent the same compute?
- 1Read the count
Both teams report ten machines, so the counts match.
- 2Ask what kind
The source says machines differ in capacity and cost. Team A's ten machines might be one kind, and Team B's ten might be another kind.
- 3Check the missing detail
A count does not reveal each machine's capacity, so ten machines of one kind may have far more capacity than ten machines of another kind.
- 4Draw the conclusion
Matching counts alone do not show matching compute. A fair comparison must account for what each machine is, not only how many there are.
The equal counts do not prove equal compute. The machine kind, with its capacity and cost, is needed to compare the two teams fairly.
Mistakes When Reading Model Size
Common mistake Treating the whole name as the size
What it looks likeReading Llama-13B as a size of Llama-13B.
Why it failsThe part before the hyphen is the family, not the size.
Do this insteadRead the part after the hyphen, 13B, as the parameter count.
Common mistake Assuming the B means something other than billion
What it looks likeReading 13B as 13 thousand or as a version number.
Why it failsThe source says the letter B stands for billion, so the name gives the parameter count directly.
Do this insteadRead 13B as 13 billion parameters.
Common mistake Equating a machine count with total compute
What it looks likeConcluding that two teams used equal compute because both used ten machines.
Why it failsMachines differ in capacity and cost, so a count alone does not fully describe compute.
Do this insteadAsk what kind of machines were used and consider their capacity and cost.
Common mistake Forgetting that the capacity claim applies within one family
Practice Reading Model Names
Read the model name Llama-70B. Identify the model family and the parameter count. Then explain in one sentence why the number after the hyphen matters for the model's capacity to learn, using the source's claim about parameters and capacity.
Hints
- Find the hyphen first. The part before it is the family.
- The letter B stands for billion.
- The source says increasing parameters increases capacity, which is likely to produce a better model within the same family.
Two teams both report using ten machines for pre-training. Name two details the machine count leaves out, and state what each detail would help you find out.
Hints
- The source says machines differ in capacity and cost.
- Think about what you would need to know about each machine to compare the two teams fairly.
Key Takeaways
- A model's parameter count is usually written at the end of its name; in Llama-13B, Llama is the family and 13B means 13 billion parameters.
- Increasing a model's parameters increases its capacity to learn, which is likely to produce a better model within the same family.
- Pre-training compute can be measured by counting machines such as GPUs, CPUs, and TPUs.
- A machine count alone is incomplete, because machines differ in capacity and cost.