Three Key Findings from Load Testing an LLM with Tens of Millions of Tokens
This article shares three key findings and one unexpected result from a large-scale LLM load test that processed tens of millions of tokens across four task types: long-horizon autonomous coding, complex logical and mathematical reasoning, lightweight question answering, and billing structure analysis. It explains why long-horizon tasks now move from code completion toward engineering delivery, how tool calling and self-correction form a closed loop, and how prefix caching reshapes the cost curve of long-running tasks. It also covers overthinking on simple tasks, reasoning stability, and a reusable evaluation and rollout checklist for production use.
1. Why a Tens-of-Millions-of-Token Load Test Matters
Small-sample trials only show a model’s “floor impression.” Engineering decisions need distribution characteristics: across dozens to thousands of calls, the mean success rate, variance, and tail failure patterns determine whether a model can enter a production pipeline. The value of accumulating tens of millions of tokens is not the cost itself, but that it covers the combined distribution of real-world scenarios such as long context, multi-turn tool calls, failed retries, and cache hits.
This test covered four task types: long-horizon autonomous coding, complex logical and mathematical reasoning, lightweight question answering, and billing structure analysis. The results boil down to three pleasant surprises and one unexpected finding: a significant leap in long-horizon task capability, a closed loop between tool calling and self-correction, and a caching mechanism that changes the cost curve. The surprise appeared in the simplest tasks, where problems were least expected.
2. Surprise One: Long-Horizon Autonomous Tasks Move from “Completing Code” to “Delivering Engineering”
The tested model worked autonomously for more than an hour without human intervention, completing cross-file engineering tasks such as database schema design, API layering, and setting up a mobile simulation environment. The key change is not the quality of a single piece of code, but task decomposition: it first builds a directory and dependency skeleton, then implements module by module. When a run fails, it reads logs, locates the stack trace, reverts changes, and retries with a different approach.
For engineering, this shifts the model from “humans orchestrate, the model writes fragments” to “humans define goals and acceptance criteria, the model executes.” When adopting it, keep three human checkpoints:
Goals and acceptance criteria → autonomous model execution → automated checks (compile/unit tests/static analysis) → human spot-check of critical paths
Also use a container platform to provide an isolated environment, and use logging services and monitoring alerts to collect failure traces, preventing autonomous execution from polluting the main branch.
3. Surprise Two: Tool Calling and Self-Correction Form a Closed Loop
Long-horizon capability rests on stable structured output and tool protocol adherence. In practice, write tool descriptions as strict interface contracts, and have the model retry with full error context on failure:
{"tool": "run_tests","args": {"path": "tests/", "fail_fast": false},"on_error": "read_log_and_patch","max_retries": 3}
Three points matter: error messages must be structured and parseable; retry counts and fallback strategies must be set explicitly; and every tool result must be fed back into the context, otherwise the model cannot iterate through “hypothesize—verify—correct.”
4. Surprise Three: Caching Reshapes the Cost Structure of Long Tasks
A higher unit price does not necessarily cause the bill to rise proportionally. In long tasks, prefixes such as system prompts, repository context, and tool definitions are highly repetitive. Once the prefix cache is hit, repeated billing and time to first token can be significantly reduced. Design for cache friendliness in engineering:
- Layer the prompt: put the stable layer (role, conventions, tool contracts) first and the volatile layer (current task, user input) last;
- Manage context: inject only relevant snippets from a long repository, and use retrieval and summarization to compress history, avoiding frequent prefix changes that invalidate the cache;
- Add budget guardrails: set token and duration limits per task, and degrade to “provide a plan without implementation” when the limit is exceeded.
Illustrative logic:
def budget_guard(used, limit, phase):if used >= limit * 0.8:return "summarize_and_report" # Wrap up: output conclusions and a change listreturn phase
5. The Unexpected: “Overthinking” on Lightweight Tasks
On one-step problems such as sorting items at a car wash or simple conditional checks, the strong reasoning model occasionally introduces unnecessary assumptions, repeatedly questions itself, or even falls into a loop, while the lightweight model directly gives the correct answer. The reason can be understood as a mismatch between the reasoning budget and task complexity: the longer the chain of thought, the higher the probability of deviating from the simplest solution.
Therefore, model selection should not be one-size-fits-all; instead, route by task tier:
Intent classification → lightweight tasks go to a low-latency small model; heavy reasoning/long-horizon tasks go to a strong reasoning model; when uncertain, sample both paths and perform consistency checks
6. Reasoning Stability: Both Strengths and Weaknesses
Performance on complex logic problems was excellent, but high-difficulty math problems and some lightweight tests still produced infinite loops or wrong conclusions. Possible mitigations include: setting a maximum number of reasoning steps and a timeout; requiring verifiable intermediate conclusions first; using code execution to double-check numerical answers; and voting across multiple samples.
7. A Reusable Evaluation and Launch Checklist
- Build a tiered evaluation set: allocate proportions for long-horizon engineering, heavy reasoning, and lightweight question answering, and record success rate, average steps, token consumption, and P95 latency;
- Classify and archive failures: loops, hallucinated APIs, tool misuse, and context overflow each call for different fixes;
- Canary and rollback: run a new model on a small-traffic shadow pipeline first, compare it against the baseline, then ramp up;
- Make cost observable: tag tasks to track cache hit rate and per-task cost, use a message queue to smooth peaks, and use object storage to archive traces.
8. Conclusion
The core lesson from the tens-of-millions-of-token test is to treat model capability as a variable that can be constrained by engineering. Use tiered routing to solve capability mismatch, cache-friendly design to optimize cost, and automated checks and budget guardrails to cover the tail risk of long-horizon tasks. Only then can you reliably gain the efficiency benefits of long-horizon autonomous execution in real business.
