Zenaique

Sketch a Llama 3.1 70B self-host versus hosted API break even on the back of an envelope

Short answer·Medium·4.0 · 0·~3 min·Asked atCrewaiGleanServicenow·Relevant atAnthropicDatabricksModal Labs
Attempt it

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.

Free · 2 AI evals / day
TL;DR

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.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

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.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

Self-host versus hosted API is one of the most-asked questions in production LLM serving, and the answer is almost always a back-of-envelope calculation rather than a deep architectural argument. Three numbers carry the math: GPU cost per hour, achievable tokens per second, and realistic sustained utilization. Plug them into per-million-token cost and compare against the hosted price.

The twist is that one of those three numbers, utilization, swings by 5x across realistic deployments. Naive serverless services land at 15-25%. Well-tuned batch services reach 50-70%. Saturated offline-batch workloads approach 90%+. The same hardware can sit on either side of the break-even depending on which tier the workload actually achieves.

This deep dive walks through the calculation step by step using the numbers in the prompt, computes per-million cost across utilization tiers, derives the break-even point, and closes with the operational realities that push the break-even higher for most teams. By the end you should be able to land this calculation in a five-minute whiteboard session and give a defensible answer to whether a given workload should be self-hosted.

The fixed bill: GPU hourly cost times 24

An H100 spot instance at 2.50 dollars per hour costs 60 dollars per day if you keep it running for 24 hours. Reserved capacity removes the spot interruption risk but pushes the price closer to 3.50-4.00 dollars per hour, yielding 84-96 dollars per day. On-demand H100 SXM at neocloud providers (Lambda, CoreWeave, Together AI) lands in the same on-demand range.

The fixed bill is the most important property of self-hosting: you pay it whether or not requests arrive. A GPU sitting idle costs the same as a saturated GPU. This is the opposite of the hosted API model, which charges per token consumed.

For planning purposes, use 60 dollars per day per H100 spot as the baseline. Scale up for on-demand pricing (1.4-1.6x), multi-GPU setups (linear with GPU count), or H200/B200 hardware (1.3-2.0x per GPU at higher throughput).

Peak throughput: 600 tokens per second sustained
Utilization: the swing variable
Per-million cost derivation and the API comparison
The break-even point
When to self-host and when to use the API
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

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.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QHow does H200 or B200 hardware change the break-even calculation?
A

H200 has 40% more decode throughput than H100 at modest price premium. B200 roughly doubles H100 throughput. At similar utilization, per-million cost drops proportionally. B200 brings single-GPU per-million cost down toward 0.40-0.60 dollars at high utilization, which can match hosted API prices for teams that can sustain the load.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

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.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • Compute daily GPU cost from hourly rate

  • Compute peak tokens per day at 100% utilization

Sign in to unlock the revision sheet.
Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
In LLM serving, what is the primary driver of end to end latency for a generation request?
MCQ·Medium