How to Evaluate Agent Capabilities and Deployment Costs of Open-Source LLMs
This guide explains how to evaluate open-source large language models for AI agent use and estimate the cost of running them locally. It covers four core benchmark categories, why public leaderboard scores require matched test conditions, a rough formula for estimating GPU memory, and a method for building a custom evaluation set and comparing total cost of ownership.
1. Why Evaluate Open-Source Models Yourself
Open-source large language models are updated quickly, and models of similar size often appear one after another in a short period. For developers, the more important question is whether they can use a reliable method to decide if a given model fits their AI agent scenario.
Agents differ from ordinary chat. A model must read code, call tools, operate interfaces, and deliver files. An error at any step can affect the entire workflow. For this reason, evaluation should observe how a model performs across a complete workflow, not rely only on question-answering scores. This article addresses two questions: how to test agent capabilities, and how much it costs to deploy a model.
2. Four Core Benchmark Categories for Agent Capabilities
The industry typically assesses agent capabilities across four dimensions. The table below lists public benchmarks for each dimension and what they focus on.
| Dimension | Representative Public Benchmarks | Focus | Common Metrics |
|---|---|---|---|
| Real-world code repository engineering | SWE-bench (including the Verified subset) | Locating defects, making cross-file changes, running tests to verify fixes | Task resolution rate |
| Building complete projects from scratch | Few public benchmarks; custom task sets are usually needed | Directory design, module interfaces, completeness of dependencies and documentation | Functional test pass rate, structural soundness |
| Tool calling and workflow orchestration | τ-bench, BFCL (Berkeley Function Calling Leaderboard) | Choosing the right tool, calling tools in a sensible order, adjusting strategy after failures | Task success rate, number of invalid calls |
| Cross-industry professional tasks and computer operation | OSWorld (GUI operation), GDPval (multi-industry professional tasks) | Long-horizon planning, interface operation, deliverable quality | End-to-end completion rate, deliverable scores |
Code repository benchmarks are the closest match to enterprise AI coding assistant scenarios. The model must understand existing code, locate the problem, and make consistent changes across multiple files.
Tasks that build a project from scratch test architectural ability. A model that can only write single functions differs greatly in practical value from a model that can plan module boundaries, interfaces, and dependencies.
Tool calling tasks focus on fault tolerance. Tool errors are routine. Whether a model switches parameters or tools instead of retrying the same call repeatedly determines whether an agent system runs stably.
Cross-industry and computer operation tasks are the closest match to a “digital employee.” They measure end-to-end delivery, including long-horizon planning, interface operation, and whether the final files are usable.
3. Reading Public Leaderboards: Why Scores Cannot Be Compared Directly
The same benchmark can produce very different scores under different conditions. Before comparing two models, confirm that the following conditions match:
- Agent framework or scaffold: The same model may perform differently in different frameworks.
- Context length: Long tasks are sensitive to the size of the context window.
- Reasoning effort: Some models allow adjustable reasoning depth. Different settings change both latency and scores.
- Number of runs and statistical method: Single-run results vary considerably. The average across multiple runs is more reliable.
- Evaluation environment and anti-cheating rules: Whether internet access is allowed and whether test data leaked both affect results.
If these conditions are unclear, a gap of a few points should not be used as a basis for model selection. When the difference between two models is smaller than the evaluation error, the two can be considered similar in capability. Then combine that with cost and your own task requirements to decide.
4. How to Estimate Local Deployment Cost
You can estimate GPU memory with a rough formula:
- Weight size ≈ parameter count × bytes per parameter (2 for BF16, 1 for 8-bit, 0.5 for 4-bit)
- Estimated VRAM ≈ weight size × 1.2 (reserves some overhead for activations and runtime)
Using this formula, the estimates for common configurations are as follows.
| Model size | Precision | Weight size | Estimated VRAM |
|---|---|---|---|
| 27B dense model | BF16 | About 54 GB | About 65 GB |
| 27B dense model | 8-bit | About 27 GB | About 32 GB |
| 27B dense model | 4-bit | About 13.5 GB | About 16 GB |
| 70B dense model | 4-bit | About 35 GB | About 42 GB |
| 235B total-parameter MoE model | 4-bit | About 117.5 GB | About 141 GB; usually requires multiple high-memory GPUs running in parallel |
Keep the following points in mind when using this formula.
First, weight size is not the same as actual VRAM demand. Long contexts cause the KV cache to grow quickly, and more concurrent requests increase usage. Before deployment, re-estimate based on your actual context length and concurrency.
Second, MoE (Mixture of Experts) models must load all expert parameters into memory, so the VRAM requirement is set by total parameter count. Each inference activates only part of the parameters, so speed may be higher than a dense model with the same total parameter count. The two have different cost structures, so do not judge them by a single number.
Third, quantization reduces accuracy, and the loss varies by task. Validate quantized model quality on your own evaluation set rather than relying only on official descriptions.
Fourth, inference frameworks support quantization formats inconsistently. Before choosing a framework, confirm that it supports the target model’s quantization format, and test its throughput.
5. Building Your Own Evaluation Set
Public benchmarks help narrow the list of candidates, but the final decision should rest on your own tasks. Prepare 20 to 50 real business tasks, with at least five per dimension. The template below shows how to record evaluation results.
| Field | Description | Example |
|---|---|---|
| Task ID | Unique identifier | CODE-03 |
| Task type | One of the four dimensions | Code repository engineering |
| Input and environment | Requirements, repository version, available tools | Order module, Python 3.11, test scripts provided |
| Pass criteria | Conditions that can be checked automatically | All specified tests pass, and unrelated files are left unmodified |
| Error recovery | How the model handles errors, and the retry limit | Tool timeout, up to 2 retries, then switch to a fallback approach |
| Deliverable reliability | Whether the output is complete and runs | All files present, service starts normally |
| Time and cost | Elapsed time, token count, or GPU usage | Record actual values for comparison |
| Failure cause | Category of failure | Unrelated files modified, endless retry loops, deliverable files missing |
Run each task several times and average the results, and keep records of failures. The distribution of failure causes often reveals a model’s weaknesses better than its overall score.
6. Model Selection Steps
- Define the task profile. Decide which capability dimensions matter most for your business, such as mainly code engineering or mainly tool calling.
- Use public benchmarks to narrow the candidates. Do not draw conclusions from a single score.
- Run tests on your own evaluation set. Focus on error recovery and deliverable reliability.
- Calculate total cost of ownership. For cloud options, compare unit price and throughput. For local deployment, consider VRAM requirements, electricity, operations staffing, and quantization loss. Compare the two before deciding.
- Isolate specific models behind a unified model access layer. When a new model is released, you only need to update the configuration and run one more round of tests to complete an A/B comparison.
Open-source model versions keep changing, but the evaluation method can be used for a long time. Fix the evaluation set and cost table. Each time a new model appears, you only need to run one more round of tests.
