Sketch a Llama 3.1 70B self-host versus hosted-API break-even on the back of an envelope
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Run a back-of-envelope calculation for Llama 3.1 70B self-hosted on an H100 spot instance vs a hosted Llama API at $0.50/M output tokens. Assume a spot H100 at $2.5/hr, sustained ~600 output tokens/sec batched in FP8, and 30% realistic utilization across a 24-hour day. Derive the self-host per-million-tokens cost and the tokens-per-day break-even.
At 30% utilization, self-host runs about 3.90 dollars per million tokens against a 0.50 dollar API price. Hosted wins until sustained throughput approaches 120M tokens/day per GPU.
Imagine renting a pizza oven that costs 60 dollars a day. The oven can bake 52 pizzas in a 24-hour stretch if it never stops. In reality you only get orders for one-third of the day, so you bake 15 pizzas. Your cost per pizza is 60 divided by 15, or about 4 dollars. A nearby delivery service sells the same pizza for 50 cents. Until you can keep that oven much busier or share it across many shops, the delivery service is cheaper. The same math runs LLM serving. The GPU rent is fixed by the hour. Your cost per million tokens depends entirely on how busy you keep it, and most teams keep it less busy than they think.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: walk through the four steps (daily bill, peak capacity, utilization haircut, per-million derivation), compute the break-even at the stated assumptions, name the utilization tiers, and close with the operational realities that push the break-even higher for small teams.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Using peak token rate as if the GPU ran flat-out 24/7. Real utilization is 20-30% by default, and that single assumption changes the break-even by an order of magnitude.
The night-before-the-interview bullets. Scan these on the way to the call.