Evaluating Open-Source LLM Updates: Inference Efficiency and Agent Capabilities
This article explores how to evaluate new versions of open-source large language models (LLMs) beyond benchmark scores. It covers three key areas: solution space exploration, thinking budget measurement, and output limit calculation between inference and non-inference modes. It provides practical methods for testing token consumption, calculating recall rates for multiple-solution problems, and handling output truncation with Python code examples.
1. Why Benchmark Scores Aren’t Enough
Open-source large language models (LLMs) update rapidly. A single release typically brings simultaneous changes in inference capabilities, output length, pricing, and Agent performance. Evaluators cannot rely solely on leaderboard scores to determine whether a model suits their business. Application developers usually care about details like token consumption, output truncation, and failure retries.
Based on public information from a recent open-source LLM release, this article outlines three types of changes: long-chain reasoning, output behavior in non-inference modes, and Agent coding. The performance conclusions mentioned here require self-testing. Since the original materials did not disclose complete test sets, sample sizes, or scoring criteria, no single number should be taken as a universal conclusion. Specific teams are not named; readers can verify version numbers on the official release pages.
2. Solution Space Exploration: Potentially More Complete, But Requires Verification
In multi-step reasoning and constraint satisfaction problems, some questions have multiple feasible solutions. Previous model versions might miss some of these. The new version shows more proactive path expansion in some examples, potentially covering more feasible solutions.
This is valuable for scenarios requiring exhaustive enumeration and comparison, such as scheduling, configuration validation, and code path analysis. However, the word “potentially” is crucial. The verification method is as follows:
- Construct a set of problems where all feasible solutions for each problem are known beforehand.
- Call the model multiple times for each problem and record the number of feasible solutions found each time.
- Calculate the recall rate: the number of feasible solutions found divided by the total known feasible solutions.
- Report the number of problems, repetition counts, and the types of failed samples.
Reporting only an average value does not reveal where the model fails. Categorizing failed samples is more useful than a total score.
3. Thinking Budget: Unified Measurement of Token Consumption
Models with strong reasoning capabilities typically spend more tokens thinking. This directly impacts cost and response time. Token consumption across different models for similar tasks can vary significantly, but the magnitude depends on the task type, output limits, and scoring criteria. Therefore, an observed multiplier should not be directly applied to other scenarios.
Every comparison should use the same set of problems and parameters, recording the following fields:
- Input token count;
- Output token count (including Chain of Thought if the provider counts it as output);
- Chain of Thought token count (if the API can return it separately);
- Accuracy rate;
- Number of truncations.
Examine accuracy and token consumption in the same table. If two models have similar accuracy but one consumes significantly fewer tokens, its thinking efficiency is higher. If the accuracy gap is large, lower consumption may not necessarily be an advantage.
4. Non-Inference and Inference Modes: Calculate Output Limits Clearly
Non-inference mode is usually faster and more stable on simple problems. When encountering complex tasks, the output length may increase significantly. If the output limit set during the API call is too small, some complex requests will be truncated midway, resulting in incomplete outputs and potentially invalidating scores.
The risk in inference mode is similar but more pronounced. A small number of problems may generate very long chains of thought. If the evaluation sets an output limit, samples exceeding the limit will be truncated. Using median statistics in this case will mask the problem; the truncation ratio should be reported separately.
There are two ways to detect truncation. First, check the finish reason returned by the API. Many services compatible with the OpenAI interface return a finish_reason of length when output ends due to length limits; refer to the relevant API documentation for your specific service. Second, check whether the output is semantically complete, such as whether the JSON is closed or if the code can be parsed.
Below is an illustrative approach. The code assumes the client’s chat method accepts a max_tokens parameter and returns a result with a finish_reason field. The code is written for Python 3.9 and above; replace it with your own client in actual use.
import logginglogger = logging.getLogger(__name__)SIMPLE_MAX_TOKENS = 8_192COMPLEX_MAX_TOKENS = 32_768 # The specific value should be determined based on your own measured output distributiondef choose_max_tokens(task_complexity: str) -> int:"""Returns the output limit based on task complexity. Unknown complexity is treated as complex to reduce accidental truncation."""if task_complexity == "simple":return SIMPLE_MAX_TOKENSreturn COMPLEX_MAX_TOKENSdef call_with_retry(client, prompt: str, task_complexity: str, max_retries: int = 1):"""Increases the limit and retries a limited number of times when the output is truncated."""max_tokens = choose_max_tokens(task_complexity)resp = client.chat(prompt, max_tokens=max_tokens)for attempt in range(max_retries):if resp.finish_reason != "length":breaklogger.warning("Output truncated attempt=%d max_tokens=%d complexity=%s",attempt + 1, max_tokens, task_complexity,)max_tokens *= 2resp = client.chat(prompt, max_tokens=max_tokens)return resp
Retries incur duplicate charges, so the number of attempts must be capped. For samples that remain truncated after retrying, the caller should check the finish_reason and proceed with a fallback process.
