Evaluating AI Agent Capabilities and the Cost of Local Deployment
This article breaks down how to evaluate large language model agents beyond simple benchmarks and how to estimate local deployment costs. It defines four measurable dimensions of agent capability—repository-level code understanding, project generation from natural language, multi-step tool calling, and long-horizon professional tasks—and explains why apparent wins on public leaderboards can be misleading without consistent evaluation setups. It also offers a bottom-up method for estimating GPU memory and throughput for roughly 30B-class models, plus practical guidance for mapping evaluation results to real use cases. Readers will learn how to build a reproducible internal evaluation set and a clear cost model for model selection.
1. The Starting Point: Why Benchmarks Are No Longer Enough
In the past, evaluating a model meant looking at single-turn Q&A accuracy and the fluency of generated text. But once a model is placed inside a real development workflow, the shape of the task changes fundamentally. It must read and understand a continuously evolving code repository, locate problems across multiple files and make consistent changes, call external tools repeatedly and self-correct after failures, and stay on target during long-running tasks.
These are known as agent tasks. Their difficulty does not come from single-step reasoning but from “chain length” and “error accumulation.” A model with 90% accuracy per step has only about a 12% chance of getting 20 consecutive steps right. As a result, the focus of evaluation shifts from “is the answer correct” to “can the process be completed and is the deliverable usable.”
A notable trend has recently emerged in the open-source community: multiple teams released lightweight model weights and technical documentation within the same time window, and the top of public leaderboards is dominated by a few open-source families. Among them, mid-sized models (around 30B parameters) and their derivatives are the most popular. The reason is easy to understand—this size strikes a good balance among capability, GPU memory usage, and inference cost. It fits on a single machine with multiple GPUs while retaining usable tool-calling and coding ability.
This article does not judge any specific model as better or worse. Instead, it abstracts a method for evaluation and cost accounting. The kind of business narrative in which “one vendor open-sources two hours earlier and another is forced to follow” essentially reflects the squeeze effect of open-source release cadence on closed-source pricing and release strategy. At the methodology level, this is more valuable than anything on a leaderboard.
2. Four Dimensions: Turning “Agent Capability” into Something Measurable
To compare two models in agent scenarios, you must first break vague capability into non-overlapping observation surfaces. Common industry practice falls into four categories, which happen to cover the main forms of software engineering and office automation.
2.1 Repository-Level Code Understanding and Modification
What is examined: Given a real open-source repository and a problem description, can the model locate the correct file and function, understand cross-file dependencies, make a minimal and correct change, and verify it through the project’s own tests or build process?
The difficulty lies in context organization. Repositories can easily reach hundreds of thousands of lines, so the model must learn to “search first, then locate, then modify” rather than blindly generating large blocks of code. Scoring usually relies on test-case pass rates rather than text similarity, which makes it closer to real-world value than traditional code-generation benchmarks.
2.2 Generating a Complete Project from Natural Language Requirements
What is examined: Given a requirements description, output a runnable multi-file project, including directory structure, dependency declarations, module division, and basic documentation.
This measures “structural planning ability.” Many models can write a nice single-file script, but once asked to split it into modules, handle circular dependencies, and generate configuration, they break down. Scoring typically focuses on runnability, structural completeness, and requirement coverage.
2.3 Continuous Tool Calling and Workflow Continuity
What is examined: Facing a task that requires multiple steps, can the model choose the right tools, call them in the correct order, parse return values, and adjust its strategy after a step fails instead of repeating ineffective actions?
This is the ability most easily hidden by “demo videos.” Real evaluation tracks success rate, average number of steps, ratio of invalid calls, and recovery success rate, which can significantly distinguish models.
2.4 Cross-Industry, Long-Horizon Professional Tasks
What is examined: Completing tasks that require long-term planning, graphical interface operation, and staged deliverables in an unfamiliar domain (such as finance, legal, or data analysis).
This simultaneously stress-tests context-length management, memory compression, and self-verification mechanisms. It is currently the most discriminating but also the least stable type of evaluation.
3. Methodology Pitfalls: Read “Sweeping All Four” Conclusions with Caution
Suppose you put the four items above into a table and one side leads on all four, with a simple average about 5 points higher. Can you draw a conclusion directly? The rigorous approach is to first check whether the measurement conditions are consistent. Multiple approaches often differ in the following six respects:
- Agent scaffold: different prompt templates, memory strategies, and retry mechanisms can significantly change the same model’s performance;
- Context window configuration: 32K versus 256K produces completely different results on repository-level tasks;
- Reasoning effort setting: whether extended thinking is enabled and how large the thinking budget is directly affect both score and cost;
- Number of repeated runs: single-run and best-of-multiple (pass@k-style) measurements cannot be compared directly;
- Anti-cheating and contamination control: whether training data includes the evaluation set, and whether outputs were specifically aligned;
- Tools and sandbox environment: different file systems, network permissions, and timeout settings make success rates incomparable.
So the more professional statement is not “who is stronger” but “under their respective disclosed conditions, one side performs better on repository-level engineering and tool calling, while the other is more stable on generation from scratch and cross-domain tasks.” When the four-item average differs by only a fraction of a point, that gap already falls within the noise range, and actual selection should return to small-scale validation on your own task distribution.
A practical approach is to build an “internal evaluation set”: sample 50 to 100 tasks from historical real tickets, fix the scaffold and timeout, and record success rate, average number of steps, and manual rework time. This is more valuable for decision-making than any public leaderboard.
# Minimal evaluation loop under consistent conditionsdef run_eval(model, tasks, scaffold, k=1, timeout=600):results = []for t in tasks:for _ in range(k):r = scaffold.execute(model, t, timeout=timeout)results.append({"task_id": t.id,"success": r.passed_tests, # judged by test pass, not text similarity"steps": r.steps,"invalid_calls": r.invalid_calls,"elapsed": r.elapsed,})return summarize(results) # success rate / avg steps / invalid call rate / latency
4. The Cost Side: Estimating GPU Memory and Throughput for Local Deployment
Beyond capability, cost determines whether something can scale. When cloud pricing is not yet public, you can estimate comparatively using local deployment resource usage, working bottom-up from GPU memory.
4.1 The Four Components of GPU Memory
Total usage is roughly the sum of weights, KV cache, runtime overhead, and activation buffers. A rough estimate:
Weight memory ≈ parameters × bytes per parameterKV cache ≈ 2 × layers × KV heads × head dim × sequence length × batch × precision bytesTotal memory ≈ weights + KV cache + runtime overhead (~10%–20%)
For a 30B-class model, FP16 weights are about 60GB; 8-bit is about 30GB; after 4-bit quantization, about 15 to 20GB. Adding context cache and runtime overhead, actual deployment is usually more comfortable on a whole machine in the “hundred-GB range.” If the parameter count doubles, resource requirements roughly double as well, which is consistent in direction with the empirical judgment of “about 100GB at 4-bit, about 200GB after doubling.”
4.2 Trade-offs of Quantization Formats
4-bit can significantly lower the GPU memory threshold, but three points need attention: first, under long context, the KV cache may overtake the weights as the main cost; second, low precision is more sensitive for tasks like tool calling that require strict format output; third, different quantization schemes vary greatly in operator support, and some custom operators may fall back to slower paths.
4.3 Throughput Rather Than Peak Compute
Real experience is determined by throughput and time-to-first-token. When estimating, you can use:
Theoretical upper limit tokens/s ≈ effective compute × utilization / (2 × parameters)
Actual utilization is limited by GPU memory bandwidth, batching strategy, and scheduling overhead, and is usually far below the theoretical value. So at the selection stage you should be clear: are you pursuing a low-latency single-request experience or high-concurrency batch throughput? The optimal configuration for the two is completely different.
5. Selection Advice: Mapping Evaluation Conclusions to Scenarios
- Mainly maintaining existing repositories, fixing defects, and automating scripts: prioritize repository-level code evaluation and tool-calling success rate, and require reproducible test pass rates;
- Mainly building prototypes from scratch and generating scaffolds: prioritize project completeness and runnability;
- Mainly automating cross-system workflows: prioritize delivery reliability and error recovery on long-horizon tasks;
- Cost-sensitive with data that must stay on the internal network: make single-machine deployability after quantization the first constraint, then use the internal evaluation set for the final decision.
Engineering-wise, you can also adopt tiered routing: use a lightweight model for high-frequency short-chain tasks, and escalate to a larger model or add a human confirmation step when facing long-chain complex tasks. This combination is often more economical than simply chasing a single model’s score.
6. Conclusion
During a period of dense releases, leaderboards change by the hour, but the stability of methodology is measured in years. Rather than chasing a one-time “sweep all four” conclusion, it is better to solidify three things: consistent evaluation conditions, a reproducible internal evaluation set, and a clear cost model. With these three in place, no matter what new version the next wave of open source brings, selection can produce a well-grounded answer within a day. For teams that need to deploy models in their own environments, using common cloud capabilities such as container platforms, object storage, and monitoring alerts to build evaluation and inference pipelines can make this method truly run and continuously accumulate data.
