Self-Host an LLM on a Rented GPU or Pay per Token? A Break-Even Calculator (2026)
说明与用途
文章说明了如何计算在租用 RTX 5090 32G GPU 上运行 Qwen3 32B AWQ 模型的盈亏平衡点,并将其成本与按令牌计费的 API 进行比较。持续流量超过约 600 tokens/s 时,自托管更划算,否则更适合使用 API。
问题
Determine when self-hosting an LLM on a rented GPU is cheaper than using a per-token API.
结果
The calculation shows that for the Qwen3 32B AWQ model on an RTX 5090 32G, self-hosting becomes cheaper than per-token APIs when sustained throughput exceeds roughly 600–700 tokens/s (depending on utilisation). Below that, the API wins.
工作流
- 1. Gather GPU hourly price and per-token API prices.
- 2. Compute blended price per token using input:output ratio.
- 3. Calculate break-even tokens per hour: hourly_gpu_price / blended_price_per_token.
- 4. Adjust for GPU utilisation: divide by utilisation factor.
- 5. Compare required throughput to actual traffic to choose strategy.
- 6. Optionally run provided Python script to automate calculations.
证据
Self-hosting on a rented GPU is cheaper than a per-token API only when you keep the GPU busy: the break-even is the hourly GPU price divided by the API’s price per token, expressed as tokens you must actually generate and process every hour.
break_even_tokens_per_hour = hourly_gpu_price / blended_price_per_token
If your GPU is busy only 40% of the hours you rent it, the throughput you need while busy is break-even ÷ 0.4.
Qwen3 32B is an open-weight model (Apache-2.0) that is not offered on the CloudGPU API, so self-hosting is the way to run it here.
At a fixed $0.59 per hour, the cost per million tokens depends only on the throughput you sustain.
These are different models from Qwen3 32B, so the table compares cost only: decide on quality first, then use the arithmetic.
- 记录日期: 2026-10-25T14:11:20.726Z