Open vs. Closed LLMs: Measuring the Capability Gap and the Distillation Debate
This article explains how to measure the capability gap between open-weight and closed-source large language models. It covers why a single benchmark score is not enough and how to track task pass rates and cost per passed task. It also reviews the technical meaning and legal boundaries of knowledge distillation, the side effects of anti-distillation measures on research and small teams, practices for evaluating terminal-based coding agents, and a framework for enterprise model selection.
1. Why the Gap Has Become a Focus
Frontier capabilities in large language models change quickly. A small number of organizations release new versions roughly every few weeks, and discussion quickly shifts to who is ahead and who is behind. The gap between open-weight models and closed-source services is one of the most closely watched topics.
The interest has practical reasons. Open-weight models can be deployed locally, audited, and fine-tuned as needed. They appeal to teams that handle sensitive data or need long-term control over costs. Closed-source services usually lead in the latest capabilities, stability, and engineering support. The time lag between the two directly affects whether enterprises can access near-frontier capabilities at a lower cost.
“Gap” has no single definition. It may refer to composite benchmark scores, pass rates on a specific type of task, or the time between release and general availability. Before discussing the gap, teams should define what they are measuring so that different metrics are not conflated.
2. Measuring Capability Across Multiple Dimensions
A single composite score gives only a rough reference. Composite evaluations typically mix knowledge question answering, reasoning, coding, multilingual tasks, and other categories. The evaluator sets the weight of each category. A model that leads in one category is not necessarily as reliable in a specific business scenario.
A more sound approach is to build three layers of metrics:
- Benchmark layer: Use public evaluation sets for horizontal comparison, and record the model version, prompt template, and decoding parameters.
- Task layer: Draw samples from real business workloads, covering typical inputs, edge cases, and historical failure cases.
- Economic layer: Track token consumption per task, end-to-end latency, and the cost of failed calls and retries.
The economic layer is often overlooked. A model with a slightly lower score but half the unit price and stable latency can be more cost-effective in many scenarios. The example below shows how to aggregate task-level results:
from dataclasses import dataclass@dataclassclass TaskResult:task_id: strpassed: boollatency_s: floatcost_usd: floatdef summarize(results: list[TaskResult]) -> dict:total = len(results)passed = sum(r.passed for r in results)return {"pass_rate": passed / total if total else 0.0,"avg_latency_s": sum(r.latency_s for r in results) / total if total else 0.0,"cost_per_pass_usd": (sum(r.cost_usd for r in results) / passed if passed else float("inf")),}
This example uses “average cost per passed task” as the core metric, rather than comparing only the price of a single call. Failed calls also incur charges, so this metric is closer to the true cost of use.
3. Technical Meaning and Boundaries of the Distillation Dispute
Knowledge distillation is a common method for model compression and capability transfer. A smaller student model learns the output distribution of a larger teacher model, retaining part of the teacher’s capability at a smaller parameter count. The method is widely used in academia and industry, and the technique itself is not a problem.
The dispute centers on two points. First, whether the source of the training data is compliant. For example, were the outputs of other services collected at scale without authorization? Second, whether the usage violates terms of service or licensing agreements. Both are legal and contractual questions, so they cannot be judged on technical grounds alone.
For developers, the practical rules are:
- Training data should have clear provenance records.
- Synthetic data should document how it was generated.
- Before using outputs from an external model, review its license terms.
These practices reduce compliance risk and help teams give clear explanations during audits.
4. Effects of Anti-Distillation Mechanisms on the Ecosystem
To prevent unauthorized copying of capabilities, service providers typically use rate limiting, account review, output detection, and behavioral analysis. These mechanisms have a reasonable basis in protecting intellectual property, but they also have side effects.
The first side effect is reduced research reproducibility. Researchers cannot reliably obtain outputs from the same model version, so other teams find it hard to verify experimental results. The second is higher evaluation costs for small teams. They must spend more effort dealing with access restrictions instead of focusing on the models themselves.
Therefore, when discussing whether open models can catch up with closed ones, changes in the external access environment should also be considered. A narrowing or widening gap may come from model development itself. It may also relate to data access conditions and evaluation conditions. Separating these factors leads to more reliable conclusions.
5. Evaluation Practices for Terminal-Based Coding Agents
Agentic coding has become a hot topic in recent evaluations. Models must read code, execute commands, modify files, and pass tests in a terminal environment. Compared with ordinary question answering, these tasks are closer to real engineering work. They also more readily expose weaknesses in long-horizon reasoning, error recovery, and tool use.
Building a reliable evaluation environment requires attention to the following points:
- Run model-generated commands in isolated containers, with restricted network access and file system scope.
- Set timeouts and resource limits for each task to prevent infinite loops or resource exhaustion.
- Use the exit status of verification commands as the pass criterion, rather than subjective scoring.
- Sample each task multiple times and report the distribution of pass rates, not a single result.
The following simplified example shows how to run a task-defined verification command under a timeout constraint. It determines pass or fail from the exit code:
import subprocessdef run_check(workdir: str, command: list[str], timeout_s: int = 300) -> bool:try:proc = subprocess.run(command,cwd=workdir,capture_output=True,text=True,timeout=timeout_s,)return proc.returncode == 0except subprocess.TimeoutExpired:return False
This example only illustrates the idea. In production, execution should run inside a sandbox, and the working directory should be strictly validated. This ensures that model output cannot affect the host machine.
6. A Decision Framework for Enterprise Model Selection
When choosing a model, enterprises can evaluate it on four dimensions:
- Data compliance: Whether data may be sent to an external service, and whether local deployment is required.
- Capability fit: Whether the model’s pass rate and failure patterns on the company’s own task set are acceptable.
- Total cost of ownership: Including call fees, engineering integration, operations, and retry costs.
- Iteration pace: The provider’s version update frequency, interface stability, and migration cost.
