Production Systems

GPU cost model: dollars per token

The math of renting intelligence. When dedicated GPUs beat per-token APIs, and when they don't.

Every inference decision is secretly a cost decision. This is the model I use to make them, and it's surprisingly simple: dollars per token.

Here's the math. One H100 costs about $3/hour on demand (or half that reserved). What can it do in an hour?

tokens/hour = throughput(tokens/sec) × 3600
cost per token = $3 / tokens_per_hour

If a 7B model does 200 tokens/sec per replica, that's 720,000 tokens/hour, so:

cost per token = 3 / 720000 ≈ $0.0000042 ≈ $4.2 per million tokens

Compare to API pricing, which for a comparable model is $0.15-$0.60 per million input tokens and $0.60-$2.50 per million output. The GPU is 10-100x cheaper if you keep it busy. That "if" is the whole game.

When self-hosting wins

When it loses

Mental model

Renting a GPU is like buying a bus. If you have 40 passengers, it's the cheapest ride in town. If you have 3, it's the most expensive taxi you've ever taken.

The hidden costs

Per-token API pricing hides the real costs. Self-hosting exposes them:

This is why the roofline matters in a meeting, not just in a notebook: every point of arithmetic intensity is a point on the cost curve.

The takeaway

Self-hosting isn't cheaper. Self-hosting at high utilization is cheaper. Everything else is a very expensive way to learn that lesson.

Next: blue-green deployment, because once you've decided to run your own GPUs, you need to ship changes without downtime.