Sketch a Llama 3.1 70B self-host versus hosted-API break-even on the back of an envelope
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.
Detailed answer & concept explanation~8 min readEverything 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. 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.
- Together AI and Fireworks price hosted Llama 3.1 70B at 0.50-0.90 dollars per million output tokens, undercutting most small-team self-host math.
- Modal and Replicate offer H100 serverless at premium prices but pass utilization risk to the platform.
- Anyscale and Baseten price dedicated H100 endpoints aimed at teams that have crossed the break-even and need predictable capacity.
- Internal teams at OpenAI and Anthropic self-host because their volume is in the trillions of tokens per day where DIY economics dominate.
- Snowflake Cortex prices Llama serving at near-cost for enterprise accounts as a platform attach motion.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does H200 or B200 hardware change the break-even calculation?
QWhy does input token cost matter when the question focuses on output tokens?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
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.
Same topic, related formats. Practice these next.