LLM Pricing Explained: Compute, GPU Memory, and Deployment Costs
Why do large language model APIs vary so much in price? This article breaks down model scale, GPU memory requirements, inference throughput, and hardware payback periods, using illustrative calculations to help teams compare API access, rented infrastructure, and self-hosted deployments.
Large language model APIs vary widely in price. For buyers, the central question is whether a higher price reflects a larger profit margin or genuinely higher costs.
Answering that question requires separating model capabilities, deployment requirements, inference efficiency, and hardware payback periods. All figures below are illustrative assumptions, not market quotes or performance guarantees. Actual calculations must use specific pricing and measured results.
1. Why Greater Model Capabilities Often Require More Scale
Many leading models in code generation, agent tasks, complex reasoning, and image-and-text understanding use mixture-of-experts (MoE) architectures. These architectures can scale total parameter counts into the trillions while activating only a subset for each inference step, limiting the computation required.
However, activating fewer parameters does not reduce the total size of the model weights. Keeping all expert weights resident in GPU memory makes them available whenever the router selects them. MoE can therefore reduce computation relative to activating the entire model, while still requiring substantial GPU memory.
Model capabilities also depend on investment in large training clusters and high-quality training data. Providers ultimately need to recover those investments through API pricing or private deployment fees.
2. GPU Memory Requirements for Private Deployment
For enterprises with strict data compliance requirements, private deployment may be mandatory. A simple estimate illustrates the hardware threshold.
Assume a model has one trillion parameters and uses FP8 precision, at one byte per parameter. The weights alone require approximately 1 TB of GPU memory.
With 80 GB per GPU, an eight-GPU server provides 640 GB in total—not enough to hold all the weights. The organization would need newer accelerators with greater memory capacity and high-bandwidth interconnects, or a multi-node deployment.
This creates an upfront hardware commitment before business demand materializes. Before deploying, teams must verify that the configuration can simultaneously meet requirements for model precision, GPU memory, context length, and concurrency.
3. The Trade-Off Between Inference Speed and Throughput
Per-request generation speed and total server throughput often compete with each other. Processing more requests in a batch can increase aggregate throughput while reducing the token generation rate experienced by each user.
Continuous batching is a common optimization. It dynamically inserts new requests as others finish, reducing GPU idle time.
Speculative decoding takes a different approach: a smaller model proposes subsequent tokens, and the larger model verifies them. It is well suited to scenarios with lower concurrency where individual request speed matters more.
The benefits of both techniques depend on the workload. No single performance figure applies to every deployment.
A simple approximation is:
Aggregate throughput ≈ concurrent requests × per-user generation speed
For example, 25 concurrent requests generating about 12 tokens per second each produce approximately 300 tokens per second in total.
To reproduce or compare a throughput result, record:
- GPU model
- Model size and quantization method
- Input and output lengths
- Context length
- Batching configuration
Without these conditions, performance figures are not meaningfully comparable.
4. How Hardware Costs Are Recovered
Cost calculations should distinguish between renting infrastructure and purchasing it.
The following examples retain prices in Chinese yuan (CNY) to keep the arithmetic consistent. They are illustrative figures, not quotes for any particular market.
Option 1: Renting a Cloud Node
Assume a single node costs CNY 265,000 per month and runs at full utilization, producing two billion output tokens that month.
The rental cost per million output tokens is:
CNY 265,000 ÷ 2,000 million tokens = CNY 132.5 per million tokens
Producing two billion tokens in roughly a month requires sustained output of about 770 tokens per second—a demanding assumption for a single node.
This estimate includes only hardware rental. It excludes network bandwidth, platform fees, and operations staff.
Under these assumptions, rental alone costs more than an API priced at CNY 100 per million output tokens. Making a dedicated node economical therefore requires sufficiently high utilization, lower rental rates, or both.
Option 2: Purchasing a Server
Assume a complete server costs between CNY 5 million and CNY 8 million. This is an illustrative range; actual hardware prices can fluctuate substantially.
At CNY 100 per million output tokens, producing two billion output tokens per month generates:
2 billion ÷ 1 million × CNY 100 = CNY 200,000 per month
Counting only output-token revenue, the simple hardware payback periods are:
- CNY 5 million ÷ CNY 200,000 per month ≈ 25 months
- CNY 8 million ÷ CNY 200,000 per month ≈ 40 months
These calculations do not deduct electricity, cooling, data center depreciation, or labor. Actual payback periods would be longer.
If utilization falls by half, monthly output drops to one billion tokens and monthly revenue falls to CNY 100,000. The simple payback period then extends to 50–80 months, before operating expenses.
Utilization is a central variable in infrastructure return on investment.
5. Choosing a Deployment Model
For startups and small-to-medium workloads, using a model API is usually simpler. Teams avoid large upfront hardware purchases and do not have to maintain the infrastructure themselves.
Established cloud providers offer container platforms, elastic compute, and distributed storage that allow resources to scale with demand. Logging, monitoring, and alerts help teams track actual token consumption and concurrency, then adjust resource allocation accordingly.
Before choosing a deployment model, ask:
- What are the typical and peak concurrency levels?
- Must data remain on premises?
- What is the budget limit, and what payback period is acceptable?
- Is demand stable or highly variable?
- Does the team have the expertise to operate GPU infrastructure?
The economies of scale from private deployment are most likely to become relevant when concurrency is both high and stable, especially where strict data privacy requirements also apply.
Cost and performance caveat: All figures in this article are illustrative assumptions. Recalculate using the actual accelerator model, electricity price, utilization, and model version.
Conclusion
LLM pricing reflects several cost components, including training investment, GPU memory requirements, hardware acquisition, and operating utilization. Evaluating whether a price is reasonable means examining those components separately.
Developers and enterprises can apply these formulas to their own workload and pricing data before deciding whether to use an API, rent dedicated nodes, or build a self-hosted cluster.
