Skip to content
ANSWER · INFERENCE COST

What does Llama-3 70B inference cost per million tokens?

Eight H100s in bf16 at the median $2.388/GPU/h run $19.11/hour for the node. At 1,800 aggregate tok/s that is about $2.95 per million tokens. Double the throughput and the unit cost halves — which is why the real answer here is the throughput assumption, not the price.

Quote this: Self-hosted Llama-3 70B on eight H100s costs about $2.95 per million tokens at 1,800 tok/s aggregate, which only undercuts a $0.90/M API above roughly 15,498 million tokens a month. — CVIN, 2026-11-05, https://cvin.org/en/answers/llama-70b-inference-cost

Price: median of device-level H100 SXM listings · as of 2026-11-05 · throughput is a published-baseline assumption, not measured here

01

Throughput drives everything

聚合吞吐假设每小时 token$/百万 token说明
1,200 tok/s 4,320,000$4.42
1,800 tok/s 6,480,000$2.95 baseline (vLLM continuous batching, bf16)
3,000 tok/s 10,800,000$1.77
5,000 tok/s 18,000,000$1.06

吞吐均为「输出 token / 秒」的整机聚合值,不含首 token 延迟与 prefill 开销;长 prompt、大 batch、投机解码都会改变这个数,方向不定。

02

Break-even against an API

口径数值
8 卡 H100 月成本(730h)$13,948
自建单 token 成本(1,800 tok/s)$2.95 / 百万
对照的商业 API 单价(示例)$0.90 / 百万
月盈亏平衡用量15,498 百万 token ≈ 15.5 十亿

这张表的用处是把「自建便宜还是 API 便宜」这个纯争论变成一个可算的数:把你的月 token 量代进去,低于平衡点就买 API。注意自建的拥塞、扩缩容、模型版本滚动都要人力,这些成本没进表。

03

How it is computed

$/百万 token = 单卡时价 × 卡数 × 3600 ÷ (聚合 tok/s × 3600) × 1e6

化简后就是 卡数 × 单卡时价 ÷ 每秒 token 数 × 1e6 ÷ 3600。价格取 H100 SXM 的中位挂牌价 $2.388/时;卡数取 8,因为 70B 的 bf16 权重约 140GB,8×80GB 才留得下 KV cache 与并发。

为什么不用「单次请求成本」这个说法:单次请求的成本取决于 prompt 长度与 batch 拼法,同一台机器可以从 $0.0001 到 $0.01,说「每百万 token」才是跨供应商可比的口径。

04

Four assumptions that must travel with this number

① 吞吐是外部基准,不是本站实测。本站实测的是价格与在架机器数;吞吐取的是公开部署的常见区间,你的实现(框架、量化、batch 策略)会让它上下浮动一倍。
② 不含冗余。生产环境要至少 2 倍冗余,账单要乘 2 以上。
③ 不含存储与出网。权重、日志、结果回传另计。
④ 不算人。自建要有人盯 OOM、扩缩容、模型升级——按人民币算,这部分通常比卡时贵。
05

Related

H100 SXM file 8-GPU H100 monthly Fine-tune 7B cost Train 70B cost Quickstart