Estimate the Cost to Train a 7B Model
The interviewer asksEstimate the compute and cost to train a 7-billion-parameter model on 2 trillion tokens.
AI TPMAI Infrastructure PMModel PM (secondary)CoreTechnical roundRepresentative5–7 min
On this page
The 30-second version
- Training compute ≈ 6 × parameters × tokens = 6 × 7×10⁹ × 2×10¹² ≈ 8.4×10²² FLOPs.
- A GPU at ~10¹⁵ FLOP/s peak, ~40% utilisation → 4×10¹⁴ FLOP/s.
- 8.4×10²² ÷ 4×10¹⁴ ≈ 2.1×10⁸ GPU-seconds ≈ 58,000 GPU-hours.
- At ~$2.50 per GPU-hour ≈ $150,000 for the final run.
- Real budgets add experiments, restarts and evals: often several times the final run.
What it's really testing
- The 6ND rule
- Stating assumptions
- Turning compute into a budget
How to structure your answer
- Formula.
- Plug in.
- Convert to time and cost.
- Add reality.
The interview, played out
- InterviewerEstimate the compute and cost to train a 7-billion-parameter model on 2 trillion tokens.
- CandidateTraining takes about 6 × parameters × tokens FLOPsFloating-point operation. One arithmetic operation on decimal numbers; FLOPs measure how much compute training or inference takes. Read the full explanation. That's 6 × 7×10⁹ × 2×10¹², about 8.4×10²².
- Strong moveStates the formula before plugging in numbers.
- CandidateA modern data-centre GPUGraphics processing unit. The chips most AI models are trained and served on. Read the full explanation does roughly 10¹⁵ FLOPs per second at peak; real utilisation is more like 40%, so 4×10¹⁴. Dividing: about 2×10⁸ GPU-seconds, roughly 58,000 GPU-hours.
- CandidateAt about $2.50 an hour, around $150,000. On 512 GPUs that's about five days.
- InterviewerIs that the budget?
- Missed signalShould include experiments and failures from the start.
- CandidateThat's the final run. Smaller experiments, restarts after failures and evals often add several times that, so I'd budget $400k to $750k.
The strong answer, distilled
- Compute: 6ND ≈ 8.4×10²² FLOPs.
- Throughput: 10¹⁵ peak × 40% = 4×10¹⁴ FLOP/s per GPU.
- Time: ≈ 58,000 GPU-hours (≈ 5 days on 512 GPUs).
- Cost: ≈ $150k at $2.50/GPU-hour for the final run.
- Budget: several times that for experiments, restarts and evals.
This is one strong answer, not the only one.
How it's scored
| Dimension | Weak (2) | Passable (3) | Strong (5) |
|---|---|---|---|
| Formula | Guess | Some formula | 6ND stated |
| Assumptions | Hidden | Some | Peak, utilisation, price stated |
| Reality | Final run only | Mentions overhead | Budget range including experiments |
Round scorecard: AI Infrastructure PM: technical round, filled in for the mock candidate
| Dimension | Weak | Passable | Strong | The mock candidate |
|---|---|---|---|---|
| Structure | Jumps to a number. | Some steps. | Formula first, steps said out loud. | Strong. Formula first: 6 × N × D. |
| Assumptions | Hidden or wrong. | Stated. | Stated, reasonable, and the sensitive ones identified. | Strong. Stated GPU speed, utilisation and price. |
| Technical depth | Weights only. | Weights and throughput. | Weights, KV cache, batching and latency targets. | Passable. Forgot experiments and failed runs until asked. |
| Product judgment | Stops at the number. | Mentions cost. | Turns the estimate into a capacity and cost decision. | Strong. Turned it into a budget range. |
How the answer changes by role
| Role | What to emphasise |
|---|---|
| AI TPMTechnical Program Manager. Owns plans, dependencies, risks and delivery for large cross-team programmes. Read the full explanation | Budget, schedule and cluster allocation |
| AI Infrastructure PMProduct Manager. Decides what a product should do, for whom, and why. Read the full explanation | Utilisation and pricing assumptions |
| Model PM | Trade-offs between model size and data |
Common mistakes
- Forgetting utilisation
- Using 2ND (inference) for training
- Budgeting only the final run
More follow-ups to practise
- "Train a 70B model on 15T tokens." Hint: about 100x more compute.
- "Utilisation is 25%, not 40%." Hint: cost rises by 60%.
Go deeper
- Module: AI numbers: memory and compute
- Framework: Back-of-Envelope Method for AI Numbers
- Framework: Explain a Concept Framework
- Framework: Opening Any Interview Answer
- Lesson: Compute for inference and training
- Lesson: A back-of-envelope method
- Also tests: Training and the model lifecycle
Sources
Representative question: written to match technical rounds for AI product roles, not a specific reported interview.