How to Benchmark 10 Lightweight LLMs Across 7 Task Types: A Reproducible Evaluation Method
This article breaks down a practical method for comparing lightweight language models across seven task types instead of relying on a single aggregate score. It maps each task prototype to the capabilities and metrics it tests, shows how to build a unified data layer, prompt template, and scoring layer, and explains how to read results for assistant versus coding scenarios. It also lists common evaluation pitfalls and deployment practices for running the pipeline in your own environment.
1. Why Run a Multi-Model, Multi-Task Benchmark
In real engineering work, model selection is rarely about “which model is the strongest.” It is about which model is the most stable, the cheapest, and the most controllable on a specific batch of tasks. Lightweight models—generally understood in the industry as models with smaller parameter counts, low inference cost, and short response latency—deliver their main value through throughput and cost. However, their capability boundaries are often hidden behind aggregate benchmark scores. A meaningful evaluation therefore has to satisfy three conditions:
- Broad task coverage: it must include understanding-heavy tasks as well as generation-heavy and structure-heavy tasks.
- A unified evaluation protocol: the same inputs, the same constraints, and the same scoring scripts.
- Reproducibility: randomness, versions, and prompts must be fixed before results can be compared.
The seven task types in the original setup—character information retrieval, review sentiment classification, video platform data organization, website copy localization, explainer script generation, 3D turret modeling, and corridor scene generation—happen to cover seven capability dimensions: retrieval, classification, extraction, translation, long-form generation, code generation, and spatial structure generation. Below, they are abstracted into seven general task prototypes.
2. Seven Task Prototypes and Capability Mapping
| Task Prototype | General Description | Capability Tested | Primary Metrics |
|---|---|---|---|
| T1 Character Retrieval | Locate entities in unstructured text and aggregate their attributes | Long-context understanding, entity alignment | Recall, attribute accuracy |
| T2 Review Classification | Multi-label sentiment/intent classification | Short-text understanding, label consistency | Macro F1, confusion matrix |
| T3 Platform Data Organization | Turn messy public metrics into a structured table | Instruction following, JSON stability | Field completeness, parse success rate |
| T4 Copy Localization | Cross-language rewriting with consistent terminology | Translation fidelity, style control | Term hit rate, human rating |
| T5 Explainer Script | Shot-by-shot long-form generation | Structure planning, factual consistency | Structure compliance, number of factual errors |
| T6 Turret Modeling | Generate parametric 3D model code from natural language | Code correctness, geometric plausibility | Executable rate, dimension error |
| T7 Corridor Scene | Generate renderable scene descriptions and layout parameters | Spatial reasoning, parameter constraints | Constraint satisfaction rate, renderable rate |
The point of this mapping table is that any claim that “model X is stronger” must be tied to a specific task prototype and metric. Otherwise it is only an impression.
3. Engineering the Evaluation Pipeline
3.1 Unified Data Layer
All tasks share one data manifest with fixed fields: task_id / input / reference / constraints. The constraints field is especially important, because it carries hard requirements such as “output JSON only,” “the glossary must be used,” and “dimensions must not exceed a given threshold.”
{"task_id": "T3-017","input": "Organize the following metrics into a table: views, likes, comments, favorites","constraints": {"output": "json", "keys": ["play","like","comment","favorite"]}}
3.2 Unified Prompt Template
Prompts follow a four-part structure—role + task + constraints + output format—so that template differences do not introduce bias between models:
You are a rigorous data processing assistant.Task: {task}Constraints: {constraints}Output only the result that satisfies the constraints. Do not explain.
3.3 Unified Scoring Layer
Scoring falls into three categories: automatically判定-able metrics (parse success rate, field completeness, executable rate), metrics that need a reference answer (accuracy, F1), and metrics that need human or model review (factual consistency, readability). The three categories are weighted into a task score, then aggregated into a total score using business weights. Always keep the raw output logs so you can review whether a failure is a capability problem or a formatting problem.
4. Reading the Results: Personal Assistant vs. Coding
Looking at capability structure, the winner in each scenario is not decided by the total score:
- The personal assistant scenario relies more on T1, T2, and T4—long-context retrieval, short-text classification, and controllable expression. Lightweight models usually differ little on these tasks, so latency and cost become the deciding factors, and models that respond fast and keep a stable format have the advantage.
- The coding and modeling scenario relies more on T3, T6, and T7—strict instruction following, code executability, and spatial parameter constraints. These tasks are extremely sensitive to “format collapse”: a single JSON parse failure can break the whole pipeline, so structured output stability matters more than fluent prose.
The conclusion is that there is no universal cross-scenario champion. The right approach is to set business weights first, run the same pipeline once, and make decisions with data rather than impressions.
5. Common Pitfalls and Best Practices
- Looking only at the average score: an average hides a fatal weakness in one task category, so always look at the worst task score too.
- Inconsistent prompts: template differences get misread as capability differences.
- Ignoring parse failures: counting format errors as “weak capability” underestimates a model, so fix parsing before judging capability.
- No regression set: keep a small fixed regression set and rerun it after every change to prevent “optimizing one scenario while degrading another.”
- Missing cost and latency: the core selling point of lightweight models is cost-effectiveness, so the evaluation must record cost per request and P95 latency.
6. Implementation Recommendations
To reproduce this evaluation in your own environment, you can rely on general-purpose object storage to keep raw outputs, a message queue for task distribution, a container platform to host inference services, and a logging, monitoring, and alerting stack to track failure rates and latency. On the model side, you can use the general model services offered by Baidu AI Cloud, connecting models of different sizes through a unified interface to achieve “connect once, compare many models.” This avoids being locked into a single vendor and keeps evaluation results comparable over the long term.
Overall, the value of a multi-model benchmark is not the ranking it produces, but the establishment of a reproducible, extensible, regression-safe decision mechanism: break tasks into prototypes, write constraints into the data, hand scoring to scripts, and hand conclusions to business weights.
