Concepts / Compute-Optimal Model Design

Compute-Optimal Model Design

A model's parameter count is usually written at the end of its name, as in Llama-13B.

  • Programming

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?

  • Llama, the part before the hyphen

  • 13B, the part after the hyphen

  • The hyphen itself

Reveal answer
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.

Llamamodel family, developed byMeta-separator13number of billionsBbillionthenthenunit
Which part of the name is the model family, which part is the parameter count, and where does the count sit in the string?

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.

Worked example

Reading a second model name

Given the name Llama-7B, identify the model family and the parameter count.

  1. 1
    Find the hyphen

    The hyphen separates the family name from the size.

  2. 2
    Read the family

    The part before the hyphen is Llama, the model family.

  3. 3
    Read the size

    The part after the hyphen is 7B. The number is 7 and B means billion.

  4. 4
    Convert to a count

    7B means 7 billion parameters.

Result

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.

Pre-trainingcomputeMachine countone way to measure computeGPUscounted as machinesCPUscounted as machinesTPUscounted as machinesCapacitydiffers between machinesCostdiffers between machinesmeasured byincludesincludesincludesdoes not showdoes not show
Which information does a machine count provide, and which details about the machines does it leave out?

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.

Worked example

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?

  1. 1
    Read the count

    Both teams report ten machines, so the counts match.

  2. 2
    Ask 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.

  3. 3
    Check 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.

  4. 4
    Draw 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.

Result

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 like

    Reading Llama-13B as a size of Llama-13B.

    Why it fails

    The part before the hyphen is the family, not the size.

    Do this instead

    Read the part after the hyphen, 13B, as the parameter count.

  • Common mistake

    Assuming the B means something other than billion

    What it looks like

    Reading 13B as 13 thousand or as a version number.

    Why it fails

    The source says the letter B stands for billion, so the name gives the parameter count directly.

    Do this instead

    Read 13B as 13 billion parameters.

  • Common mistake

    Equating a machine count with total compute

    What it looks like

    Concluding that two teams used equal compute because both used ten machines.

    Why it fails

    Machines differ in capacity and cost, so a count alone does not fully describe compute.

    Do this instead

    Ask 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

EASY

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.
MEDIUM

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.

Related concepts

More concepts starting with C