AI Infra Interviews logo

Napkin Math, Cost & Capacity

30 questions
0 of 30 done · 10 unlocked for you
DONEUNLOCKEDLOCKED

Napkin Math & Estimation Interview Questions

Memory footprints, 6ND, arithmetic intensity and the ridge point, bandwidth-bound decode, communication volume, GPU counts and time to train, cost per million tokens, TCO and buy versus rent. The estimation round almost every AI infra loop includes, with every assumption stated.

Learn how AI infrastructure works through explanations, worked examples and diagrams, then practise applying it to interview questions.

Work through the numbers

Change the assumptions in a free calculator, then explain what the result establishes and what still needs measurement.

A starting path through this topic

Start with a mechanism, then use a worked problem to explain a decision. Access labels below describe what is available without an account.

  1. Model Memory Footprint

    Budget weights, working state and runtime headroom per device.

    Public concept
  2. Training FLOPs: 6ND

    Derive training work and keep attention and recomputation boundaries explicit.

    Public concept
  3. How many FLOPs does it take to train a 70B model on 15 trillion tokens?

    Derive the 6ND estimate and state the work it leaves out.

    Public answer
  4. How long does that 70B run take on 16,384 H100s at 40% MFU?

    Convert a consistent FLOP estimate into time at an explicitly assumed MFU.

    Public answer
You have 10 free answers unlocked here.Sign in free for 10 more · 10 are premium.
01–12Foundationsbuild the vocabulary and basic mechanisms0/12 done
13–23Core loopsapply the ideas to worked interview questions0/11 done
24–30Field scenariosreason through constraints and operational failure scenarios0/7 done
PRACTICE TESTStudied this track? Prove it: a timed Napkin Math, Cost & Capacity test.rotating questions · every answer explained · free with an accountStart →

The concepts behind Napkin Math, Cost & Capacity

Review the ideas used in these questions. Each card shows whether the explanation is free, requires sign-in or is part of Premium.

Foundational
Model Memory FootprintSeparate weight payload, growing request state and training allocations. Work through exact units and per-rank budgets, then check the live peak.
Foundational
KV Cache SizingDerive cache payload from the stored attention state, then account for mixed sequence lengths, block allocation and per-device limits. Worked examples distinguish exact bytes from deployable capacity.
Foundational
Training FLOPs: 6NDDerive the six from one forward and two backward matrix products. Count training tokens, attention and recomputation consistently before turning model work into a schedule.
Core
Sign in
GPU-Hours and Time to TrainConvert a stated work budget into elapsed time and GPU-hours. Vary utilization, invert for a deadline, and separate productive time from calendar delays without counting them twice.
Core
Sign in
Arithmetic Intensity by OperationCount the FLOPs and memory transfers of a projection, attention and a residual add. Learn where the batch-size shortcut works, where it breaks, and which hardware roof applies.
Advanced
🔒 Premium
Bandwidth-Bound Decode ThroughputEstimate decode throughput from bytes per step, then separate aggregate output from per-user pace. A finite-memory example shows how batching, cache reads and quantization change the bound.
Advanced
🔒 Premium
Communication Volume EstimatesEstimate communication by naming the tensor, collective, group and synchronization schedule. Work through per-rank ring bytes, conditional sharding costs, activation exchanges and routing imbalance before converting traffic into exposed time.
Advanced
🔒 Premium
Cost per Million TokensCost per million tokens connects fleet spending to useful output. Keep the time window, token definition and utilization assumptions consistent when comparing deployments.
Unlock all 30 answers · ₹2,000 / $25