How to Evaluate Open-Source LLMs and Calculate VRAM for Local Deployment
This article explains how to design and interpret a rigorous comparison of open-source LLMs, including four complementary task dimensions, reproducibility and fairness checks, and common pitfalls in reading benchmark results. It also provides a practical method for estimating VRAM for local deployment, covering weight and KV cache overhead, quantization format choices, OOM troubleshooting, and a three-step model selection process.
1. Why Leaderboard Rankings Are Not Enough
Open-source models update quickly, and leaderboard rankings change almost every week. Scores are heavily affected by evaluation settings: the same model can differ by several points when prompts or agent frameworks change. Therefore, more useful than memorizing a model’s score is knowing how a rigorous comparison should be designed and how results should be read.
This article uses an agentic task capability comparison as a thread to explain two things: how to design and interpret evaluations, and how much VRAM local deployment requires.
2. How to Design Evaluation Tasks
A single metric cannot reflect how a model performs in engineering work. Tasks can be divided into four complementary dimensions:
- Modifying an existing codebase: Give the model a real repository with historical baggage and ask it to complete a feature iteration or bug fix. This dimension tests the model’s understanding of existing context, consistency with code style, and whether it follows the original build and test process.
- Generating a project from scratch: Build a runnable complete repository from a requirements document, including directory structure, dependency management, tests, and documentation. This tests long-term planning and overall architecture ability more than code modification, and it is a different capability.
- Tool-calling chains: Call tools such as search, file system, and command line in multi-step tasks. This dimension tests whether tool selection is reasonable, whether parameters are accurate, and whether the model can self-correct after failures.
- GUI operations: Simulate operations in office software and browsers to test long-term planning, delivery reliability, and end-to-end completion.
Dividing dimensions is only the first step. Each dimension also needs the following written clearly; otherwise, others cannot reproduce the results:
- Number of tasks and difficulty distribution;
- Scoring rubric, meaning the criteria for each score;
- Pass criteria, for example, success only when all test cases pass;
- Tool and environment versions, including agent framework, browser, and dependency library versions;
- Anti-cheating rules, for example, prohibiting models from accessing answer sources.
To identify benchmark-targeted training, you can build a set of anonymized private tasks and run a blind test: evaluators do not know which model produced an output and score only the result. In addition, use two different task sets for cross-validation. If a model is strong on a public set but clearly drops on a private set, be alert to data contamination.
3. How to Read Results
First, leading on total score does not mean leading across the board. In this test, one model’s average score was clearly higher than the other two, and its advantages in tool calling and complex engineering tasks were also notable. The other two models traded wins in two dimensions each, ending with close total scores. This shows that model capabilities have a clearly uneven structure. If your business is concentrated on one type of task, you should look directly at the score for the corresponding dimension; the average score can only serve as a reference.
Second, evaluation settings must be transparent. If models use different agent frameworks, context lengths, reasoning effort, number of runs, or anti-cheating rules, any one difference can cause several-point fluctuations. When comparing, use the same framework and prompt template, run the same task multiple times and take the mean, and observe variance. Comparisons without controlled variables can only be treated as references.
Below is a fairness checklist that can be checked item by item before each comparison:
| Check | Requirement |
|---|---|
| Agent framework | All models use the same version |
| Prompt template | Completely identical |
| Number of runs | Same number of runs per task; report mean and variance |
| Tool permissions | Same callable tools and access scope |
| Context length | Same upper limit |
Third, do not be led by a single data point. When you see a model far ahead on a leaderboard, ask three questions first: Is the evaluation set public? Could the tasks have entered the training data? Can the result be reproduced on your own tasks? The safest approach is to run a small-scale test on your own real tasks before deciding whether to migrate.
4. How to Calculate VRAM for Local Deployment
Cloud pay-as-you-go costs are easy to estimate. For local deployment, you first need to understand VRAM requirements. VRAM used by model weights is mainly determined by parameter count and quantization bit width. A simple estimation formula is:
Weight VRAM (GB) ≈ parameters (B) × quantization bit width / 8 × 1.2 (safety factor)
Take a 27B model as an example:
- With 4-bit quantization, weights only are about 13.5GB (27 × 4 / 8). After multiplying by the 1.2 safety factor, it is about 16GB.
- This result includes only weights. Actual operation also adds KV cache and runtime overhead, with common usage between 18 and 24GB; it will continue to grow as context length increases.
- Therefore, a consumer GPU with 24GB of VRAM can run it, but long context will be tight. A professional card with 32GB or more is safer.
KV cache size depends on context length, batch size, number of layers, and number of KV heads. The 1.2 factor in the formula is only rough headroom and cannot replace real testing.
Now consider a model with a larger parameter count. Take a 200B-level model as an example: after 4-bit quantization, weights only are about 100GB (200 × 4 / 8). Adding KV cache, parallel communication, and runtime overhead, common requirements are between 120 and 160GB. Whether it exceeds 200GB depends on context length, concurrency, inference framework, and parallelism strategy. Such models usually require multiple GPUs or server-grade hardware.
How to Choose a Quantization Format
- GGUF: Most friendly to consumer hardware. It supports offloading some layers to the CPU and is suitable for single-machine personal use. The cost is that CPU-offloaded layers significantly slow inference.
- GPTQ or AWQ: Suitable for production environments deployed in inference frameworks, with higher throughput. It requires the GPU to have enough VRAM, and the deployment pipeline is more complex.
All quantization introduces some accuracy loss. 4-bit is acceptable for most tasks, but on complex reasoning or long-chain tasks, the loss may be amplified, so revalidate with your own tasks after quantization.
How to Troubleshoot When VRAM Is Insufficient
When encountering out-of-memory (OOM) errors, handle them in the following order: first shorten context length, then reduce concurrency or batch size, then switch to a lower quantization bit width or enable CPU offloading, and finally consider a smaller model. After each change, retest speed and success rate.
5. Three-Step Selection Method
- Define the scenario first: Determine whether the core task is code modification, tool calling, or general agents, and filter candidate models by scores in the corresponding dimension. Do not look only at total score.
- Then calculate cost: Work backward from existing hardware to the maximum deployable parameter count, and prioritize models that fit into existing VRAM after quantization. The table below gives a rough reference:
| Scenario | Candidate model scale | Quantization format | VRAM requirement (weights plus safety factor) | Metrics to measure |
|---|---|---|---|---|
| Single-GPU personal development | Around 27B | 4-bit GGUF | Starts at about 16GB; actual 18–24GB | Task success rate, time to first token, failure modes |
| Multi-GPU on-prem team service | 200B level | 4-bit GPTQ/AWQ | About 120–160GB | Throughput, concurrency latency, success rate |
- Finally, test in practice: Run small-scale validation with anonymized real tasks, and record success rate, latency, and failure modes.
The model market is accelerating. Cloud prices are changing, and the barrier to local deployment of open-source models is also falling. What developers can truly control is a reproducible evaluation method and a clear VRAM budget. With these two, they can make their own judgments whenever a model updates, instead of following leaderboards.
