AI Compute Supply and LLM Pricing: From Hardware Constraints to Cost Structures

    This article breaks down how large language model (LLM) service pricing is shaped by compute costs, model architecture, and hardware migration expenses. It provides a unified measurement framework for comparing AI accelerators, explains how MoE models and long-context inference affect per-token costs, highlights hidden costs of switching hardware stacks, and offers a practical evaluation framework with a simple cost calculation example.

    Background

    The price of large language model services is typically driven by a combination of compute costs, engineering effort, and market strategy. When certain hardware becomes supply-constrained, or when training and inference environments must be migrated to a different hardware architecture, the underlying cost structure shifts. Attributing price changes to a single vendor or policy often obscures the real cost chain. A more reliable approach is to decompose the analysis: first establish a unified measurement standard, then examine the model architecture, and finally account for migration and operational costs.

    Establish a Comparable Baseline: Peak Compute and Precision

    A common mistake when comparing different accelerator cards is mixing precision levels and metrics. Peak compute is generally categorized into dense and sparse types, and the same hardware can show several-fold differences across precision formats. If one vendor quotes sparse compute and another quotes dense compute, any direct comparison becomes meaningless.

    For LLM training, half-precision floating point (FP16) is a common baseline precision. Therefore, FP16 dense peak compute can serve as a unified comparison metric. Note that peak compute is only a theoretical upper bound. Actual throughput is influenced by memory bandwidth, interconnect bandwidth, operator efficiency, and parallelization strategy. Peak numbers are useful for coarse filtering but cannot directly predict final pricing.

    How Model Architecture Shapes Per-Token Inference Costs

    Cost Characteristics of Mixture-of-Experts (MoE) Structures

    Mixture-of-Experts (MoE) models contain many expert sub-networks, and only a subset is activated for each input token. This design separates total parameter count from the number of activated parameters per computation. Total parameters determine memory footprint and model capacity, while activated parameters determine the floating-point operations per forward pass. Consequently, MoE models can maintain a relatively controlled inference compute load even at a large total scale.

    This structure has trade-offs. When experts are distributed across multiple GPUs, routing and cross-card communication introduce latency, and load imbalance can lower hardware utilization. The real cost of MoE depends on the combination of activation ratio, expert parallel strategy, and interconnect bandwidth.

    Memory Pressure from Long Contexts

    A context window of one million tokens creates two types of pressure. First, attention computation grows with sequence length. Second, the key-value (KV) cache occupies memory linearly with context length, and the pressure increases as more concurrent requests are processed. Common mitigation techniques include paged cache management, low-precision quantization, sliding window attention, and summarizing or retrieving historical content.

    Hidden Costs of Hardware Migration

    When switching or mixing accelerator cards, the purchase price is only part of the total cost. The following items are often underestimated:

    • Software stack adaptation: Operator implementations, compilation optimizations, inference engines, and communication libraries all need to be revalidated for the new hardware.
    • Parallel strategy re-tuning: The optimal splitting of tensor parallelism, pipeline parallelism, and expert parallelism changes with the hardware topology.
    • Performance regression testing: Accuracy, latency, and stability must be compared across multiple versions.
    • Mixed hardware assets: Running old and new devices simultaneously increases scheduling and operational complexity, often reducing overall utilization.
    • Opportunity cost of engineering time: Time spent on adaptation cannot be used for model quality improvement or product feature development.

    These costs are not visible in hardware specification sheets but directly affect the per-token cost.

    Main Variables in Price Formation

    Unit inference cost can be approximated as hardware cost per hour divided by effective throughput. Effective throughput depends on utilization, batching strategy, request length distribution, and cache hit rate. The same hardware may achieve significantly lower costs under high-concurrency, steady-load conditions than under low-load scenarios. Therefore, list prices from two services cannot be compared directly without examining their load profiles and service-level objectives (SLOs).

    Pricing is also influenced by supply-demand dynamics, market competition, and long-term capacity planning. Reducing price entirely to a single technical cost item is usually inaccurate.

    Evaluation Framework and Calculation Example

    We recommend evaluating the unit cost of a model service using the following steps:

    1. Define the load profile: average input length, output length, concurrency, and peak-to-valley ratio.
    2. Normalize compute metrics: compare candidate hardware using the same precision and same metric type.
    3. Measure effective throughput: test under the target load instead of relying on theoretical values.
    4. Calculate per-token cost: include hardware depreciation, electricity, facility, and operational expenses.
    5. Include migration costs: amortize adaptation labor and validation time as one-time or spread costs.
    6. Perform sensitivity analysis: check how changes in utilization, hardware price, and throughput affect the result.

    Below is a simplified calculation example. All parameters are illustrative only.

    1. def cost_per_million_tokens(hourly_cost: float,
    2. throughput_tps: float,
    3. utilization: float) -> float:
    4. """Estimate cost per million output tokens.
    5. hourly_cost: total cost per node per hour (in CNY or any currency)
    6. throughput_tps: measured peak throughput (tokens per second)
    7. utilization: average utilization, between 0 and 1
    8. """
    9. effective_tokens_per_hour = throughput_tps * utilization * 3600
    10. return hourly_cost / effective_tokens_per_hour * 1_000_000
    11. # Example: raising utilization from 0.6 to 0.8 reduces unit cost by about one quarter
    12. for u in (0.6, 0.8):
    13. print(u, round(cost_per_million_tokens(100, 2000, u), 2))

    Practical Recommendations

    • Build a unified cost dashboard that shows hardware, energy, labor, and utilization in a single view.
    • Run small-scale stress tests before finalizing hardware selection, using real request distributions to validate throughput and latency.
    • Design separate caching and truncation strategies for long-context scenarios instead of applying a one-size-fits-all approach.
    • Keep a rollback deployment path to reduce supply risk from dependence on a single hardware architecture.