Analyzing the Cost of Flagship LLMs: Capability, VRAM, and Cost Calculation
This article provides a practical framework for evaluating whether a large language model (LLM) pricing is justified, focusing on deployment and private hosting scenarios. It breaks down the real cost of model calls by accounting for failure retry rates, explains how to interpret public benchmarks, and derives the memory (VRAM) requirements for large models—including MoE architectures, weight storage, and KV cache—with worked examples for a single-server setup.
This article is intended for readers evaluating models or planning private deployments. The goal is to turn “is this price reasonable?” into a calculable question. All numbers used in the examples are hypothetical assumptions; you can substitute your own model parameters, hardware pricing, and workload to recalculate.
1. Calculate Failure Cost First, Then Unit Price
1.1 Capability Differences Manifest in Rework Frequency
The unit price of a model cannot be judged without considering the specific task. For a single call, if the result is directly usable, a cheaper model is more cost-effective. If results are frequently wrong, you need retries or human fallback, and the real cost becomes much higher than the API bill.
Assume a complex task type has a one-shot success rate of 60% for a weaker model and 85% for a stronger model. If each attempt is independent and failures can be retried at no extra cost, the average number of attempts can be estimated as the inverse of the success rate:
- Weaker model: 1 ÷ 0.60 ≈ 1.67 attempts
- Stronger model: 1 ÷ 0.85 ≈ 1.18 attempts
- Reduction in attempts: (1.67 − 1.18) ÷ 1.67 ≈ 29%
This result depends on two preconditions. First, each attempt is independent. If the same input always fails, retrying won’t help. Second, failures can be retried at low cost. If every retry requires human intervention, that human cost must be included.
1.2 Public Benchmarks Are for Positioning Capability, Not Procurement Commitments
Public benchmarks often cited by vendors fall into several categories, each measuring different aspects:
- Code capability: SWE-bench Verified evaluates engineering capability using real open-source project bug-fixing tasks, but it does not represent performance on your internal codebase.
- Agent capability: Benchmarks like τ-bench test a model’s ability to use tools and handle multi-turn tasks. Results are heavily influenced by tool definitions and prompts.
- Knowledge and reasoning: MMLU-Pro and GPQA Diamond cover professional knowledge; AIME series are used for mathematical reasoning. They do not directly translate to business Q&A quality.
- Multimodal understanding: MMMU evaluates joint image-text understanding, but does not cover your document formats or image quality.
Benchmark versions change, and scores vary with evaluation settings. When citing a score, specify the benchmark name, version, evaluation date, and source, prioritizing the official page or re-evaluation results from third-party platforms. Benchmark scores help narrow the candidate list but do not replace testing with your own task samples.
2. VRAM Threshold: Total Parameters ≠ Deplovable Size
2.1 MoE Models: Computation and VRAM Are Driven by Different Parameters
Many flagship models use a Mixture-of-Experts (MoE) architecture. The model contains many experts, and each token activates only a subset of them. Computation is mainly driven by activated parameters, while VRAM usage is driven by total parameters. All expert weights must reside in VRAM at all times so they can be routed to at any moment. Thus, MoE models have low computation but high VRAM requirements.
| Concept | Meaning | Primary Impact |
|---|---|---|
| Total parameters | Number of all weights | Weight VRAM usage |
| Activated parameters | Parameters actually involved in computation for a single token | Per-token computation and latency |
| Quantization bit width | Bytes per parameter | Conversion factor for weight VRAM |
2.2 Weight VRAM Formula
Weight VRAM (GB) ≈ Total parameter count (in billions, B) × bytes per parameter.
Using decimal (base-10) counting, a 1-trillion-parameter (1000B) model requires the following at different precisions:
- FP8 (1 byte per parameter): approximately 1000 GB
- BF16 (2 bytes per parameter): approximately 2000 GB
- INT4 (0.5 bytes per parameter): approximately 500 GB
Quantization reduces weight VRAM but affects precision. Whether to adopt quantization should be validated with your own evaluation set.
2.3 KV Cache Formula
KV Cache grows with context length and concurrency. For standard multi-head or grouped-query attention structures, the bytes per token are:
Bytes per token = 2 × number of layers × number of KV heads × head dimension × bytes per element
KV Cache for a single request = bytes per token × context length
Total KV Cache = KV Cache per request × number of concurrent requests
Example parameters: layers = 60, KV heads = 8, head dimension = 128, BF16 storage (2 bytes per element).
- Bytes per token = 2 × 60 × 8 × 128 × 2 = 245,760 bytes ≈ 0.25 MB
- For a 32K (32,768 token) context, a single request ≈ 8.05 GB
- With 16 concurrent requests, total ≈ 128.8 GB
If the model uses a compressed KV structure such as MLA (Multi-Head Latent Attention), the KV head count and head dimension in the formula must be replaced with the actual cached dimensions; otherwise, the result will be significantly off.
2.4 Single-Server Example: 8 × 141 GB GPU
Example configuration: 8 GPUs with 141 GB each, total VRAM = 1128 GB. Assume a 1-trillion-parameter model in FP8, requiring ~1000 GB of weight storage.
- No headroom: 1128 − 1000 = 128 GB, which must also accommodate KV cache, activations, and framework overhead – clearly insufficient.
- With 15% reserved headroom: 1128 × 15% ≈ 169 GB, leaving usable VRAM = 959 GB, which is less than the 1000 GB weight footprint – the model no longer fits.
Therefore, in this example, a 1-trillion-parameter FP8 model cannot be fully deployed on a single server. Possible alternatives include: using a lower-bit quantization, offloading part of the weights to host memory, or switching to a multi-server deployment. Offloading incurs overhead because every weight access must go through PCIe, which can significantly slow down inference.
