Fast Token Generation Doesn't Mean Fast Delivery: The Cost Math of Weight-Reusing Large Models

    Why does doubling a model's token throughput barely move end-to-end delivery time? This article breaks down where the time actually goes in multi-step agent workflows—tool calls, context compaction, and human review—and explains how weight-reusing architectures trade compute depth for parameter count. It includes a latency decomposition model, scheduling metrics, and practical planning guidance for product and engineering leads.

    1. Why Speed Metrics Don’t Match Delivery Time

    Model serving speed is usually measured with two kinds of metrics. The first is throughput—the number of tokens generated per second—which describes an inference engine’s output capability on a single request. The second is end-to-end latency—the total time from when a user submits a task to when an acceptable deliverable is produced. Between these two lie many stages: the model may need multiple inference rounds, call external tools, read large amounts of files, perform compression or summarization when the context window approaches its limit, and finally go through human or automated review.

    The relationship can be described as:

    Total time = sum of per-round inference time + sum of tool call round-trip time + file reading and indexing time + context compaction time + review and rework time

    Per-round inference time is determined by output token count divided by throughput, so throughput is only one term in the formula. If a task requires hundreds of tool calls, each waiting on an external system to respond, then even doubling generation speed may only reduce total time by a small fraction.

    The following example demonstrates this decomposition with hypothetical parameters. The numbers are for illustration only and do not represent any measured results.

    1. from dataclasses import dataclass
    2. @dataclass
    3. class TaskProfile:
    4. output_tokens: int # Total number of generated tokens
    5. tokens_per_sec: float # Generation throughput (token/s)
    6. tool_calls: int # Number of tool calls
    7. tool_latency_s: float # Average round-trip time per tool call (seconds)
    8. compaction_runs: int # Number of context compaction runs
    9. compaction_s: float # Time per compaction run (seconds)
    10. review_s: float # Review and rework time (seconds)
    11. def total_latency(p: TaskProfile) -> float:
    12. generate = p.output_tokens / p.tokens_per_sec
    13. tools = p.tool_calls * p.tool_latency_s
    14. compact = p.compaction_runs * p.compaction_s
    15. return generate + tools + compact + p.review_s
    16. # Hypothetical example: throughput doubles, tool call count and review time unchanged
    17. before = TaskProfile(200_000, 40, 120, 8, 5, 60, 1800)
    18. after = TaskProfile(200_000, 80, 120, 8, 5, 60, 1800)
    19. print(f"Total time before speedup: {total_latency(before):.0f} s")
    20. print(f"Total time after speedup: {total_latency(after):.0f} s")

    Under these assumptions, generation time is cut in half, but total time drops by only about 30%, because tool round-trips and human review account for a large share. When planning, identify the stage with the largest share first, then decide where to optimize.

    2. Reusing Weights in a Loop: Trading Compute Depth for Parameter Size

    There are typically two paths to improving model capability. One is scaling up parameters—adding layers or widening hidden dimensions—which increases storage, memory, and training costs at the same time. The other keeps total parameters fixed while a block of shared weights is executed repeatedly across multiple passes in the forward computation. The effective compute depth each token passes through increases, but the parameter count in the model file stays the same.

    The benefits and costs of this recurrent-style structure can be examined separately.

    There are two main benefits. First, weight size does not grow with the number of loop iterations, so storage footprint at deployment stays stable. Second, on some tasks requiring multi-step reasoning, extra compute passes may improve results. Actual gains must be validated through benchmarks on target tasks—they cannot be inferred from the architecture alone.

    The costs are equally clear. First, per-token forward computation grows roughly linearly with the number of loop iterations, raising both single-token latency and unit inference cost. Second, memory usage for activations and intermediate states depends on the implementation. If each pass requires its own independent cache, memory pressure rises and batch size becomes constrained. Third, looping lengthens gradient paths, so numerical stability during training needs separate validation. Fourth, evaluation must distinguish parameter count from compute volume—the two are no longer proportional, and parameter size alone can no longer tell you a model’s inference cost.

    An analogy may help: the same group of musicians performs a complex piece twice. The score hasn’t grown, but the performance takes longer. This analogy only illustrates the relationship between compute paths and parameters—it does not describe how the model actually computes internally.

    The trade-offs across different technical approaches can be summarized as follows:

    Approach Parameter count Per-token compute Main cost
    Scaling up model size Increases Increases Storage, memory, and training costs
    Looping over shared layers Essentially unchanged Increases Per-token latency and batching efficiency
    Inference engineering optimizations (e.g., quantization, parallel decoding) Essentially unchanged Essentially unchanged Accuracy loss or engineering complexity

    3. Breaking Task Time into Schedulable Parts

    Scheduling requires measurement first. For each task type, build a time profile covering at least the following four items.

    1. Input scale: number of files involved, lines of code, pages of requirement documents, and the volume of external data the task depends on.
    2. Tool call behavior: call counts, average time per call, and failure and retry rates. Failed retries often stretch total duration far more than successful calls.
    3. Context management: how often compaction or summarization is triggered, and whether key information is lost after compaction. Information loss causes duplicated work in later rounds.
    4. Human involvement: number of review rounds, reasons for rework, and average time per rework round.

    From these records, two useful metrics can be derived. One is the median and tail end-to-end latency per task type—for example, the 95th percentile—because scheduling should cover the slower cases, not the average case. The other is tool call count and token consumption per task, which determine cost ceilings and resource usage.

    In practice, benchmark against a real task set rather than demo samples. Demos are typically hand-picked to showcase a model’s best performance and do not represent the distribution of everyday tasks.

    4. Tool Capability Is Not Domain Accountability

    An agent that can invoke editors, modeling software, renderers, or simulation scripts demonstrates that it can operate those interfaces. Interface availability does not mean the results satisfy domain constraints. Take 3D mechanical design: the design output must meet requirements for tolerances, material strength, and assembly relationships. Take physics simulation animation: the visuals must keep units consistent, use reasonable time steps, and satisfy basic conservation laws. These constraints are not automatically satisfied just because the operations ran smoothly.

    Therefore, acceptance criteria should be written down before the task begins, and checked by personnel with domain knowledge or by automated tests. Common checkpoints include:

    • Whether units and dimensions are consistent—for example, whether length, mass, and time use the same unit system.
    • Whether numerical computations are stable, whether iterations converge, and whether results are overly sensitive to small input changes.
    • Whether safety-related items have undergone human sign-off, with the signer accountable for the conclusions.
    • Whether deliverables are reproducible, with input data, code versions, dependency versions, and random seeds recorded.

    This step is easily overlooked. If “the model can perform the operations” is treated as “the task is complete,” rework costs will erupt late in the project and responsibility is often hard to trace.

    5. A Scheduling Method for Product and Engineering Leads

    Product leads see the demo; engineering leads deal with the full pipeline. Their estimation methods should differ, and work can proceed in the following steps.

    1. Define acceptance criteria before estimating time. Without clear acceptance criteria, time estimates are meaningless.
    2. Benchmark against a real task set, recording end-to-end time, tool call counts, and token consumption.
    3. Use end-to-end time as the basis for effort conversion—not single-token speed.
    4. Reserve buffer time for context compaction, tool failure retries, rework, and permission approvals. These stages are usually invisible in demos but consume real schedule time.
    5. Set cost ceilings, including per-task token budgets, tool call count limits, and timeout policies. When a ceiling is exceeded, stop automatically and request human confirmation.

    Common pitfalls are also worth avoiding in advance.