Faster Generation Doesn't Mean Faster Delivery: The Cost of AI-Driven General Programming

    This article explains why faster token generation does not guarantee faster delivery for AI coding agents. It splits end-to-end task time into generation, tool calls, context compression, waiting, and human review, using a worked example. It also covers the trade-off between parameter storage and compute when layers are reused, and why code-driven AI systems need domain validation and clearly assigned delivery responsibility.

    1. Token Speed and Task Duration Are Different Things

    Inference speed for large language models is usually measured in output tokens per second. This metric reflects how quickly a model generates text. It depends on hardware, batching strategy, service load, and model architecture. The same model can run several times faster during off-peak hours than during peak hours.

    Business stakeholders care about other things: when a task finishes, how much it costs, and whether the output can be used directly. A coding agent typically goes through several rounds of planning, reading files, calling tools, running tests, and fixing errors. Each step adds waiting time.

    Consider a hypothetical example. Suppose a task requires the model to generate 400,000 output tokens at 50 tokens per second. Pure generation time is then about 8,000 seconds, or roughly 2.2 hours. If the task also makes 300 tool calls averaging 8 seconds each, tool calls add up to about 40 minutes. If context compression happens 5 times at 3 minutes each, it adds another 15 minutes. These totals do not include human review time.

    End-to-end time can be broken down as follows:

    1. T_total = Σ T_generate + Σ T_tool + Σ T_context + T_wait + T_review

    Here, T_generate is model generation time. T_tool is the response time of tool calls and external systems. T_context is the time spent organizing and compressing context. T_wait is queuing and waiting time. T_review is human acceptance and rework time. Whichever term takes the largest share is the priority for optimization. Speeding up generation only shrinks the first term.

    2. Layer Reuse: Same Parameters, Longer Compute Path

    A recent technical approach repeatedly executes a group of layers in a model using shared weights. Suppose a model has several layers, and one segment of those layers shares its parameters. During the forward pass, that segment runs twice. The total parameter count does not increase, but each input passes through more computation steps.

    This design involves trade-offs along three dimensions:

    1. Storage cost: Parameter sharing reduces the number of weights to store and load. This helps GPU memory usage and model package size.
    2. Compute cost: The same input passes through more operations, so the compute and latency of a single inference rise.
    3. Capability: Repeated execution may allow finer processing for some reasoning tasks. The benefit depends on the task type and should be verified under actual workloads.

    The sample code below illustrates the structure. It is not tied to any specific implementation:

    1. def forward(x, layers_before, shared_block, layers_after, repeat=2):
    2. for layer in layers_before:
    3. x = layer(x)
    4. for _ in range(repeat):
    5. x = shared_block(x)
    6. for layer in layers_after:
    7. x = layer(x)
    8. return x

    The key to this code is the repeat parameter. It separates how large a model is from how deep it computes. In engineering terms, capacity planning cannot rely only on parameter count. It must also account for the actual compute per request.

    For technology decision makers, the conclusion is straightforward. Changes in parameter count mainly affect memory pressure. Changes in computation depth mainly affect latency and cost. The two should be evaluated separately.

    3. General Programming: Code Is a Universal Operation Interface, but Not Domain Knowledge

    More and more tasks are framed as coding problems. A script can generate video storyboards, a set of parameters can drive a 3D scene, and a description file can output the geometric model of a mechanical part. From this perspective, code serves as a universal interface for operating on the digital world.

    A tool can execute operations, but that does not mean the system understands their consequences. Take mechanical design as an example. Whether a generated model can be exported only shows that the file format is valid. Forces on the part, tolerances, material limits, and industry standards must be governed by domain rules. Likewise, a video script that can be generated does not mean its content is compliant. A 3D scene that can be rendered does not mean its physical behavior is credible.

    General programming therefore requires three things to be assessed separately:

    • Tool-calling ability: whether the model can choose the right interfaces, organize parameters, and handle return values correctly.
    • Domain constraints: whether the output meets the domain’s calculation rules, safety standards, and industry norms.
    • Delivery responsibility: who confirms that the artifact is usable, and who is accountable when problems arise.

    Of these three, only the first is a model capability. The other two depend on process design and staffing.

    One practical approach is to add an independent validation step to the generation pipeline:

    1. artifact = agent.generate(task)
    2. report = domain_validator.check(artifact, rules=project_rules)
    3. if not report.passed:
    4. artifact = agent.revise(artifact, report.issues)
    5. report = domain_validator.check(artifact, rules=project_rules)
    6. if report.passed:
    7. route_to_human_review(artifact)
    8. else:
    9. escalate(task, report)

    Domain experts maintain the validation rules, and each rule is traceable. The model handles generation and revision, but it does not judge its own output.

    4. Wider Delivery Scope, Greater Professional Burden

    From the perspective of service providers, the form of the deliverable