LLM Evaluation: From Benchmark Scores to Cost per Task

    Benchmark scores show how well a large language model performs, but they do not tell you how much it costs to get a correct answer. This guide explains how post-training, active parameter counts, and token usage affect model performance and inference costs. It also shows how to convert API prices into cost per task and build an internal benchmark that measures quality, latency, and cost on real workloads.

    1. Benchmark Scores Are a Starting Point: Post-Training Matters

    Parameter count is often treated as a proxy for model capability. But two models built on the same base can perform quite differently depending on how they are post-trained.

    Post-training techniques such as supervised fine-tuning, reinforcement learning, preference alignment, and training on reasoning traces can help a model use capabilities that its base model does not reliably demonstrate. As a result:

    • Models that share a base can differ by several points or more on the same benchmark.
    • A new version can perform substantially better than its predecessor even when the base model and API pricing stay the same.
    • Parameter count alone tells you little about how effectively a model has been trained and aligned for the tasks you care about.

    This helps explain why smaller models sometimes match larger ones on benchmarks. Parameter count is one factor in a model’s potential capacity; post-training influences how much of that potential shows up in practice. When choosing a model, compare results from the same evaluation rather than relying on model size.

    2. Total Parameters Are Not the Same as Inference Cost

    When comparing model sizes, distinguish between two measures:

    1. Total parameters: All trainable weights in the model. This figure primarily affects the memory needed to store the weights and the hardware required for deployment.
    2. Active parameters: The weights used to process a token during inference. This figure is a useful indicator of per-token computation and helps explain differences in throughput and latency.

    Sparse architectures such as mixture-of-experts (MoE) can have very large total parameter counts while routing each token through only a subset of experts. A model can therefore match another model’s benchmark score with less than a third of its total parameters and less than half of its active parameters.

    For deployment planning, use total parameters to estimate weight memory and active parameters to approximate inference compute. At BF16 precision, each parameter takes about two bytes. That estimate covers weights only; the KV cache and activation buffers require additional memory.

    1. Weight memory ≈ total parameters × bytes per parameter
    2. Inference compute (FLOPs) ≈ 2 × active parameters × total input and output tokens

    For a 40,000-token task, a model with 40 billion active parameters requires roughly 40% of the compute of a model with 104 billion active parameters under this simplified estimate. On the same hardware, that can translate into higher throughput and lower latency, but the estimate is not a substitute for measurement.

    When evaluating a deployment, record total and active parameter counts, context length, per-token latency, and throughput per accelerator or node.

    3. Token Efficiency: The Hidden Cost of Getting an Answer

    A benchmark score tells you whether a model got the answer right, not how many tokens it used to get there. For reasoning models, output token usage—including reasoning tokens where applicable and the final answer—can substantially affect both cost and latency.

    On the same task, one model might generate tens of thousands of tokens as it works through a problem and checks its answer, while another completes it with little more than 10,000. The difference matters in three ways:

    • Cost: Output tokens are typically more expensive than input tokens. At a fixed rate, doubling the output doubles the output charge, though not necessarily the total bill.
    • Latency: Autoregressive generation proceeds token by token. At a comparable generation rate, longer outputs take longer to finish.
    • Context limits: A long output can exhaust the available context window, resulting in a truncated response or failed task.

    Report average token usage per task alongside accuracy. To compare efficiency across models with different success rates, also measure the total tokens consumed across all attempts divided by the number of correct answers.

    4. Convert API Pricing Into Cost per Task

    API prices are easy to compare, but a lower price per million tokens does not necessarily mean a lower cost to complete a task. Use measured input and output token counts to calculate what a task actually costs:

    1. Cost per task = (input tokens / 1,000,000) × input price
    2. + (output tokens / 1,000,000) × output price
    1. def task_cost(input_tokens: int, output_tokens: int,
    2. input_price: float, output_price: float) -> float:
    3. """Prices are in USD per million tokens."""
    4. return (input_tokens / 1e6) * input_price + \
    5. (output_tokens / 1e6) * output_price
    6. # Illustrative figures, not pricing for any specific product.
    7. cost_a = task_cost(8_000, 40_000, 2.0, 6.0) # Higher token usage, lower rates
    8. cost_b = task_cost(8_000, 20_000, 3.0, 15.0) # Lower token usage, higher rates
    9. print(f"A: {cost_a:.3f} USD, B: {cost_b:.3f} USD")
    10. # Output: A: 0.256 USD, B: 0.324 USD

    Model A’s output rate is only 40% of Model B’s, but it generates twice as many output tokens. With both models receiving 8,000 input tokens, Model A costs about 21% less per task.

    Metric Model A (illustrative) Model B (illustrative)
    Input price (USD per million tokens) $2.00 $3.00
    Output price (USD per million tokens) $6.00 $15.00
    Average output tokens per task 40,000 20,000
    Total cost per task $0.256 $0.324
    Cost difference About 21% lower Baseline

    A production comparison should also account for:

    • Long inputs: Input tokens are typically cheaper than output tokens, but long prompts can still contribute substantially to the bill.
    • Caching and batching: Where available, prefix caching and batch discounts can change effective costs.
    • Differences in accuracy: Divide average cost per task by the fraction of tasks answered correctly to get cost per correct answer. This includes spending on tasks the model gets wrong.
    • Retries and multi-turn interactions: Count tokens from failed attempts and follow-up turns. Use observed failure and retry rates rather than assuming each task succeeds on the first attempt.

    5. A Practical Checklist for Model Evaluation and Cost Reduction

    Build an internal benchmark

    Select 50–200 tasks that represent your actual workload, such as code generation, document question answering, or data analysis. Public leaderboards show general capability; an internal benchmark shows how well a model handles the work you need it to do.

    Track four metrics together

    • Task accuracy, measured by human or automated grading
    • Average input and output tokens per task
    • End-to-end latency per task
    • Cost per task and cost per correct answer

    Evaluate by task type

    Test simple and complex tasks separately. Route routine requests to a lightweight model or disable extended reasoning where appropriate, and reserve higher-capability models for harder tasks. This can lower overall costs without treating every request as equally demanding.

    Control token usage

    • Ask for concise answers and set explicit length limits.
    • Use structured output, such as JSON Schema, to avoid unnecessary explanation.
    • Reuse stable system prompt prefixes to take advantage of prefix caching.
    • Use batch interfaces for independent tasks that can be processed in parallel.
    • Use retrieval and caching for recurring questions to reduce repeated inference.

    Reevaluate each model release

    Post-training can improve benchmark scores while changing how many tokens a model uses. Rerun your internal benchmark after each version update to verify that cost per correct answer has not increased.

    6. Use Benchmark Scores to Shortlist Models, Then Compare Costs

    A smaller model can match a larger model on a benchmark, in part because post-training changes how effectively it uses its capabilities. But benchmark scores are only the first filter. In production, active parameter counts help explain the compute required per token, while token usage determines how much work the model does to finish a task. For API deployments, measured token counts and applicable rates turn that usage into a bill.

    First, check that a model meets your quality threshold. Then compare cost per correct answer on representative tasks and look for ways to reduce token usage without sacrificing quality. That gives you a stronger basis for choosing a model than either a leaderboard score or a price per million tokens alone.