AI Infra Interviews logo
Napkin Math, Cost & Capacity / 05
medium★ EssentialNewOpenAIAnthropicxAI

How many H100s do you need to train a 70B model on 15 trillion tokens in 30 days?

The fleet equation solved for GPU count: about 6,200 H100s at 40% MFU, why it rounds up to a power of two, and the reasons a good answer adds 15% before naming a number.

Updated Sep 2026 · Grounded in real AI infrastructure interview loops and written to a senior-engineer editorial bar, with every number worked and every diagram hand-built.

TL;DR: GPUs = FLOPs ÷ (seconds × peak × MFU) = 6.35e24 ÷ (2.59e6 × 989e12 × 0.4) ≈ 6,200 H100s at 40% MFU. At 30% MFU it is 8,300, at 50% it is 5,000. Add headroom for failures, restarts and evaluation, and the practical order is 8,192.

How to approach it

Ask what MFU the interviewer wants assumed, or state one and defend it (40% for a dense bf16 run with good overlap). Compute the FLOPs budget in one line, convert 30 days to seconds, and then compute what one GPU delivers over the whole window; the GPU count is the budget divided by that per-GPU delivery, which keeps the arithmetic to two divisions. Give the number with its MFU attached, the range across MFUs, and then the fleet you would actually ask for, which is larger and a power of two.

A strong answer

A typical situation: a deadline arrives first and the GPU count has to follow it, which is the same equation solved for a different unknown. The judgment is in one term, so the answer should be a range with that term named.

The fleet equation rearranged for the count: GPUs = C ÷ (T × peak × MFU). The only judgment call is MFU, so the answer is a function of it and should be presented that way.

inputs:  C    = 6 × 70.6e9 × 15e12 = 6.35e24 FLOPs
         T    = 30 days = 30 × 86,400 = 2.59e6 s
         peak = 989e12 FLOP/s (H100, dense bf16)
         MFU  = 0.40

per-GPU delivery over the window = T × peak × MFU
                                 = 2.59e6 × 989e12 × 0.40
                                 = 1.025e21 FLOPs per GPU

GPUs = C ÷ per-GPU delivery
     = 6.35e24 ÷ 1.025e21
     ≈ 6,197 → about 6,200 H100s

sanity: 6,200 GPUs × 30 days × 24 h = 4.5M GPU-hours, the same total as 16,384 GPUs for 11.3 days,
        which it must be, since the compute budget did not change.

The GPU-hours are conserved; the deadline just sets how many cards run in parallel. That equivalence is the useful check in the room: any (GPUs, days) pair for this run multiplies to about 4.5 million GPU-hours at 40% MFU.

MFUGPUswhy it would be this
30%8,262communication not overlapped, small micro-batches, stragglers
40%6,197a well-tuned dense bf16 run
50%4,957rare on H100 for a 70B; requires fp8 or excellent overlap

Now the part that separates a calculation from a plan. The 6,200 figure is compute-only over 30 calendar days with no interruptions. A real schedule loses time to:

  • Failures and restarts. A large fleet sees hardware faults daily; each costs the time since the last checkpoint plus the restart. Budget 5 to 10% of the calendar.
  • Evaluation and checkpointing. Periodic eval passes and synchronous checkpoint writes are not model FLOPs.
  • Ramp. The first days are rarely at full MFU while parallelism and batch size are tuned.

Adding 15% to the count covers those, giving about 7,100, which nobody provisions; fleets are built in powers of two because data and tensor parallel groups divide evenly, so the request is 8,192 H100s (1,024 nodes). That fleet finishes the compute in about 22.6 days at 40% MFU and leaves a week of slack, which is the right shape for a deadline that matters. If 8,192 is not available, the alternative is to renegotiate the deadline (6,144 cards, three quarters of a power of two, is also a common size, and finishes the compute in about 29 days at 42% MFU, with no slack) or to move to fp8, which raises the per-GPU delivery.

H100s NEEDED TO FINISH A 70B RUN IN 30 DAYS 25% 40% 55% 9,900 6,200 4,500 assumed MFU 40%: about 6,200 Same equation as the time question, solved for the other unknown, with the same one soft input. Round up to a power of two so the parallelism divides: 6,200 becomes 8,192.

The reversal condition: if the model is a MoE with 70B total and 15B active, N in 6ND drops to 15e9, the budget drops to 1.35e24, and the same deadline needs about 1,300 GPUs at 40% MFU. Whether the fleet holds the weights is then the constraint, not compute. Training FLOPs: 6ND supplies the budget, and DCGM_FI_PROF_PIPE_TENSOR_ACTIVE on day one tells you whether the MFU you assumed is the MFU you have. GPU-Hours and Time to Train is the same equation solved for the other unknown.

What interviewers probe next

  • "Why a power of two?" Parallelism groups (TP × PP × DP) must divide the world size; 8,192 = 8 × 4 × 256 and its variants all work, while 7,100 does not factor cleanly.
  • "What does the fleet cost?" 8,192 × $2.50 × 24 × 30 ≈ $14.7M for the month at on-demand rates; the compute-only 4.5M GPU-hours is $11.3M.
  • "Would fp8 change the answer?" Peak doubles to 1,979 TFLOPS; at a realistic 30 to 35% fp8 MFU the delivery per GPU is about 1.5x, so roughly 4,100 cards for the same deadline.
  • "How would you know you were on schedule?" Measured tokens per second × 6N ÷ (GPUs × peak) is the live MFU; compare it to the assumed 40% on day two, not day twenty.

Common mistakes

  • Reporting the exact quotient, 6,197, as the fleet, with no allowance for failures, evaluation or divisibility.
  • Not stating MFU, which turns a range of 5,000 to 8,300 into a single unverifiable number.
  • Mixing 30 days with hours in the divisor and getting a count off by 24.
  • Using total parameters for a MoE, overstating the compute by the total-to-active ratio.

Key takeaways

  • GPUs = C ÷ (T × peak × MFU); 6.35e24 in 30 days on H100s at 40% MFU is about 6,200.
  • GPU-hours are conserved: about 4.5M for this run at 40% MFU, however you split them.
  • Add 15% for failures and evaluation, then round to a power of two: ask for 8,192.
  • The MFU band 30 to 50% moves the answer from 8,300 to 5,000; always say which you used.
That one was free — and so are 10 answers per topic without an account. Signing in doubles that to 20, opens the Plus lessons in the courses, and remembers which topics you keep getting wrong.no card · Google sign-in · nothing to cancel
HOW DID IT GO?
0
READING SIGNED OUT

Signing in doubles your free answers, from 10 to 20 per topic, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free

The concepts behind this question

Ranked by how closely each one overlaps this question's topic, so the first card is the thing to read if the answer above moved too fast.

Core
🧮 Napkin Math & CapacitySign in
GPU-Hours and Time to TrainThe fleet equation turns a training run's FLOPs into a schedule: time = 6ND divided by (GPUs times peak FLOPS times MFU). Every term is a stated assumption, and the interviewer grades the assumptions rather than the digits: which peak, which MFU, and what happens to the answer when MFU falls from 40% to 30%. This page works three runs end to end (an 8B, a 70B and a 405B), inverts the equation for the GPU count a deadline needs, and shows the sensitivity that separates a considered estimate from a lucky one.
Core
🕸️ Distributed TrainingSign in
MFU and HFUModel FLOPs utilization is the fraction of a GPU's peak that goes into the model's own forward and backward math, computed from 6ND and the step time; hardware FLOPs utilization also counts recomputation. Production LLM training lands at 35 to 45% MFU, and knowing where the other 55% goes is the job.
Advanced
🧮 Napkin Math & Capacity🔒 Premium
Bandwidth-Bound Decode ThroughputBecause decode reads every weight once per step, its speed is a division: memory bandwidth over bytes per step. That one formula gives single-stream tokens per second for any model on any card, the batch curve that flattens at the ridge point, the effect of quantization, and the point where the KV cache rather than the weights becomes the thing being read. This page derives it, works it for a 70B model on four accelerators, and shows how to read a vendor throughput claim against it.
Foundational
🧮 Napkin Math & Capacity
KV Cache SizingThe KV cache is the memory that decides how many users a serving replica can hold and how long their context can be. Its size per token comes from four numbers in the model's config file (layers, KV heads, head dimension, bytes per element) and one formula; multiplied by context and concurrency it is the number every capacity plan is built on. This page derives it, works it for four models including an MLA one, and shows the two places candidates get it wrong by a factor of eight.
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

A candidate who says '6,197' has done the arithmetic; a candidate who says 'about 6,200 at 40% MFU, so plan on 8,192 with failures and evaluation' has done the job.

DISCUSSION · 0

No comments yet — be the first to share your approach.