Foundation Models: Tokens, Attention, And Generation · Lesson 15

How Model Size, Data And Computing Affect Learning

A training plan balances model parameters, processed data and compute under defined conditions. An approximate work calculation becomes a time estimate only after specifying achieved useful throughput; a complete project and service decision needs broader evidence.

Study And Save Progress

Watch The Lesson

6 min 59 sec

Read the video transcript

A training proposal doubles the model's parameter count but keeps the same token supply and hardware allocation. The team expects the larger number to guarantee a better model. What evidence would justify that choice? Follow the balance between model size and training data, an approximate work calculation,

the useful throughput actually achieved, and the later service workload. These connections turn a size headline into questions a training plan must answer. Let N stand for parameter count and D for the number of training tokens processed. D concerns the training run,

including any repeated tokens under that accounting. It is different from the context supplied to a single request. Data quality, mixture, permission and relevance also matter. Doubling a count does not establish that the added examples teach the behavior the task needs.

Under a fixed compute budget, choosing more parameters leaves less work available for other parts of training, such as processing more tokens. Hoffmann and colleagues' March 2022 compute-optimal study, associated with Chinchilla, varied model size and training tokens across more than 400 models. It fitted relationships under its training setups.

This dated case shows why the parameter and data choices must be considered together, rather than treating size as the whole plan. A scaling law in this context is an empirical relationship fitted to experiments. Its usefulness depends on the model family, objective, data and optimization conditions.

The historical study's suggested balance is not a timeless token-per-parameter rule for every architecture or service. New data quality, a different training method or a different serving objective can change the planning question. Check assumptions before transferring a fitted relationship. For numerical intuition, use a rough dense-transformer

training estimate: about 6 times N times D floating-point operations, abbreviated FLOPs. A floating-point operation is an arithmetic operation on a numerical value under the counting convention. The factor 6 approximates important forward and backward computation under simplifying assumptions. Architecture details and sequence-dependent work require more

precise accounting when planning an actual run. Take the supplied example N equal to 7 billion parameters and D equal to 1 trillion training tokens. Write those as 7 times 10 to the power of 9 and 10 to the power of 12. Multiplying by 6 gives 4.2 times

10 to the power of 22 FLOPs. The reading shows the exponent steps. This is estimated computational work; it is neither a byte-storage amount nor a duration until we specify a rate. Suppose a hypothetical fleet sustains 10 to the power of 17 useful FLOPs per second for this job.

Divide the work by that rate: 4.2 times 10 to the power of 22 divided by 10 to the power of 17 gives 420,000 seconds. Dividing by 86,400 seconds per day gives approximately 4.86 days. The units explain the result: operations divided by operations per second yields seconds.

The rate must describe useful work actually sustained for this job. Adding accelerator peak specifications does not establish that achieved throughput. Communication, memory movement, utilization and the training system can change what is sustained. Our arithmetic assumes the stated rate throughout. It does not measure a real fleet,

reserve hardware or quote a price. A complete schedule also includes work outside that single simplified run: experiments, evaluation, data preparation, checkpointing, interruptions and recovery. Resource cost adds actual prices and operating obligations; staff and data costs have their own accounting. A 4.86-day arithmetic result is

therefore 1 input to a plan. It does not promise a completion date or determine a project budget. Consider another supplied comparison. A 14-billion-parameter model trained on 0.5 trillion tokens has the same N times D product as the 7-billion model trained on 1 trillion.

Our rough formula assigns them the same work estimate. It does not predict equal useful quality. Their representations, data exposure, optimization and serving requirements differ. The comparison needs evaluation rather than a conclusion drawn solely from an equal product. Pause with 7 billion parameters,

1 trillion training tokens, and the hypothetical sustained rate of 10 to the power of 17 FLOPs per second. Record the approximate work, seconds and days. What makes this arithmetic insufficient as a project schedule or budget? The work is approximately 4.2 times 10 to the power of 22 FLOPs.

The time under the supplied constant useful rate is 420,000 seconds, about 4.86 days. A schedule still needs the excluded preparation, experiments, evaluations, interruptions and recovery. A budget needs actual resource prices and other obligations. The peak hardware rate cannot silently

replace the useful rate we assumed. Try a new hypothetical dense run with 3 billion parameters and 2 trillion training tokens. Keep the same 6 times N times D convention, but assume a sustained useful rate of 2 times 10 to the power of 17 FLOPs per second.

Calculate work and time, then name a reason that the cheaper training arithmetic might not identify the best model to operate over many future requests. The estimate is 3.6 times 10 to the power of 22 FLOPs. At the stated useful rate, that is 180,000 seconds, about 2.08 days.

Those numbers remain a simplified hypothetical run. Training and serving efficiency can favor different choices: a model trained longer might reduce later per-request resource use if it meets the required quality. Compare the expected workload, service quality, latency, lifetime resource costs and capital constraints before choosing.

You can now distinguish parameter count, processed training tokens, estimated work, achieved throughput and lifecycle decisions. A scaling relationship helps within its experimental scope; the complete resource decision still depends on the actual task and system. Next we will examine what an application can change through instructions, examples and supplied

context while the learned parameters remain fixed.

Main Point

A training plan balances model parameters, processed data and compute under defined conditions. An approximate work calculation becomes a time estimate only after specifying achieved useful throughput; a complete project and service decision needs broader evidence.

Key Points

1. Balance parameters and processed data

A larger model with the same token supply is not automatically the best use of a fixed training allocation. Data quality, mixture, permission and relevance matter alongside counts, optimization and architecture. D counts processed tokens, including repetitions if the run processes them again.

Hoffmann and colleagues’ March 2022 Chinchilla study varied parameters and training tokens across more than 400 models and fitted relationships for allocating a compute budget. Its experimental scope supports considering these choices together. A historical fitted balance is not a timeless rule for every architecture, data source or serving objective.

2. Define approximate computational work

For this supplied dense-model illustration:

`work≈6ND FLOPs`

A FLOP is a counted floating-point arithmetic operation under the convention. The factor approximates major forward/backward work; exact architecture and sequence-dependent operations can change a real estimate. It is not a weight-storage formula, an MoE total-count shortcut or a price calculation.

3. Calculate the source example

`N=7×10^9 parameters`

`D=10^12 training tokens`

`6ND=6×7×10^(9+12)=42×10^21=4.2×10^22 FLOPs`

Suppose the hypothetical fleet sustains `10^17 useful FLOPs/second` for this job:

`time=(4.2×10^22)/(10^17)=4.2×10^5=420,000 seconds`

`420,000/86,400≈4.8611 days`

Operations divided by operations/second yields seconds. This is supplied hypothetical arithmetic, not an actual fleet measurement, reservation, training quote or completion promise.

4. Inspect the rate and omitted work

Use useful throughput actually sustained for the job. Peak accelerator figures do not establish achieved fleet throughput; communication, memory movement, utilization and the training system affect it.

The simplified time also omits data preparation, experimentation, evaluations, checkpointing, interruptions and recovery. A complete budget needs actual resource prices and operating obligations, plus staff and data costs. The arithmetic is a component of planning rather than the complete project plan.

5. Compare equal work and different models

The supplied alternative `14×10^9 parameters × 0.5×10^12 tokens` has the same ND product as `7×10^9 × 10^12`. Under the same approximation it receives the same work estimate. That equality does not establish equal task quality, data exposure, optimization behavior or service resource needs.

A smaller model trained longer may incur a different initial cost but reduce later per-request work if it meets quality requirements. Compare actual workload, expected use, quality, latency, lifecycle costs and capital constraints. Training-compute optimality under a fitted objective is not automatically the complete operating choice.

6. Closing

You can now identify what each count and unit establishes: parameters, processed tokens, approximate work, achieved rate and a conditional time. The next lesson explores application instructions and examples while parameters remain fixed.

7. Learning Checks

Attempt both calculations before opening the explanations. Keep assumptions and excluded work beside the numeric result.

M14-L15-Q01

Use a hypothetical dense run with N=7×10^9 parameters, D=10^12 processed training tokens, work≈6ND, and a constant sustained useful rate of 10^17 FLOPs/second. Calculate work, seconds and days. Why are these insufficient as a complete project schedule or budget?

Your calculation and interpretation: ____________________

Show explanation after your attempt

The work estimate is 6×7×10^9×10^12=4.2×10^22 FLOPs. Dividing by 10^17 FLOPs/second gives 420,000 seconds. At 86,400 seconds/day this is approximately 4.8611 days. The simplified run omits preparation, experiments, evaluation, interruptions, recovery and other scheduling work. A budget also needs resource prices, staff/data costs and operating obligations. The assumed useful sustained rate cannot be replaced by a peak hardware specification without evidence.

M14-L15-P01

A hypothetical dense run has N=3×10^9 parameters and D=2×10^12 training tokens. Use work≈6ND and a sustained useful rate of 2×10^17 FLOPs/second. Calculate work and time. Explain why this arithmetic alone cannot identify the best model for many future service requests.

Your calculation and interpretation: ____________________

Show explanation after your attempt

The work estimate is 6×3×10^9×2×10^12=3.6×10^22 FLOPs. At 2×10^17 FLOPs/second, time is 180,000 seconds, approximately 2.0833 days. This remains hypothetical simplified arithmetic. A model with a different training cost may have different task quality and per-request memory, latency or resource use. Compare expected service workload, quality requirements, lifecycle costs and capital constraints rather than selecting from the training-time figure alone.

Sources

Learner Materials

Download Lesson 15 Learner Materials

Use the supplied fictional cases and templates for practice.

Practice

Write your answer, compare it with the model answer and decide what to revisit. These written checkpoints are self-assessed.

Use a hypothetical dense run with N=7×10^9 parameters, D=10^12 processed training tokens, work≈6ND, and a constant sustained useful rate of 10^17 FLOPs/second. Calculate work, seconds and days. Why are these insufficient as a complete project schedule or budget? Your calculation and interpretation: ____________________

Show The Model Answer

The work estimate is 6×7×10^9×10^12=4.2×10^22 FLOPs. Dividing by 10^17 FLOPs/second gives 420,000 seconds. At 86,400 seconds/day this is approximately 4.8611 days. The simplified run omits preparation, experiments, evaluation, interruptions, recovery and other scheduling work. A budget also needs resource prices, staff/data costs and operating obligations. The assumed useful sustained rate cannot be replaced by a peak hardware specification without evidence.

Compare your reasoning with the model answer. These written checks are self-assessed.

A hypothetical dense run has N=3×10^9 parameters and D=2×10^12 training tokens. Use work≈6ND and a sustained useful rate of 2×10^17 FLOPs/second. Calculate work and time. Explain why this arithmetic alone cannot identify the best model for many future service requests. Your calculation and interpretation: ____________________

Show The Model Answer

The work estimate is 6×3×10^9×2×10^12=3.6×10^22 FLOPs. At 2×10^17 FLOPs/second, time is 180,000 seconds, approximately 2.0833 days. This remains hypothetical simplified arithmetic. A model with a different training cost may have different task quality and per-request memory, latency or resource use. Compare expected service workload, quality requirements, lifecycle costs and capital constraints rather than selecting from the training-time figure alone.

Compare your reasoning with the model answer. These written checks are self-assessed.

Open Practice And Save Your Work