How to Benchmark 10 Lightweight LLMs Across 7 Task Types: A Practical Evaluation Methodology

    This article breaks down a reproducible methodology for comparing lightweight large language models across seven very different task types, including retrieval, sentiment classification, data organization, localization, animation scripting, 3D turret modeling, and corridor scene generation. It explains why a single "overall winner" is usually a statistical artifact, how to design a layered task matrix with trap samples, which four metrics to use (Pass@1, schema compliance, consistency, and cost/latency), and how to split personal-assistant capabilities from coding capabilities. It also covers execution-based evaluation in sandboxes, confidence intervals, blind review sampling, and common pitfalls, so teams can select models based on business needs rather than rankings.

    1. Evaluation Background: Why Lightweight Model Comparisons Rarely Produce a Single Winner

    In engineering practice, lightweight large language models (typically the tiers that are friendlier in terms of inference cost, response latency, and deployment resources) are widely used in high-concurrency, low-latency scenarios. However, when ten such models are placed side by side and asked to perform seven very different tasks—character information retrieval, review sentiment classification, video platform data organization, site localization, science animation script generation, 3D turret modeling, and corridor scene generation—any “overall champion” conclusion is very likely a statistical artifact.

    There are three reasons. First, the difficulty distribution varies by task: retrieval tasks lean toward long context and factuality, classification tasks lean toward instruction following and label stability, and modeling or animation tasks lean toward spatial reasoning and structured output. Second, the scoring criteria differ; if generative tasks are all measured by accuracy, their usability will be systematically underestimated. Third, sampling randomness differs, and variation from a single run is often larger than the real gap between models.

    For these reasons, this article does not restate the scores of a specific run. Instead, it abstracts this kind of comparison into a practical methodology: how to design a task matrix, how to define metrics, how to separate “personal assistant capability” from “coding capability,” and how to keep experiments reproducible under cost constraints.

    2. Task Matrix Design: Layering and Ratio Across Seven Task Types

    A sound evaluation set should cover capability dimensions rather than a count of scenarios. The seven task types can be mapped to four capability layers:

    • Perception and retrieval layer: character information search, video platform data organization. Examines long-context localization, deduplication, and field extraction.
    • Discrimination and structuring layer: review classification. Examines label consistency, boundary-sample handling, and refusal or uncertainty expression.
    • Generation and localization layer: site localization, science animation scripts. Examines terminology consistency, style preservation, and storyboard structuring.
    • Spatial and code layer: 3D turret modeling, corridor scene generation. Examines parametric modeling logic, coordinate and scale constraints, and the correctness rate of executable code.

    For the ratio, a reasonable split is 30% discrimination, 30% generation, 20% retrieval, and 20% spatial and code tasks. Each task type should have at least 30 samples, including 20% “trap samples” (ambiguous instructions, missing fields, conflicting constraints), used to observe robustness rather than average performance.

    3. Metric System: Turning “Good or Not” Into Computable Items

    A single accuracy figure is not enough to support model selection. A four-dimensional metric set is recommended:

    1. Task success rate (Pass@1): strict judgment; output passes only if it can be consumed directly by a downstream program.
    2. Schema compliance rate: the proportion of outputs with complete JSON fields, correct types, and valid enum values.
    3. Consistency score: the agreement rate of labels or key fields across three repeated runs of the same input, used to measure stability.
    4. Cost and latency: average input and output token consumption per task, plus end-to-end latency percentiles (P50/P95).

    A schematic main evaluation loop is shown below (pseudocode that expresses only the flow and does not point to any specific product interface):

    1. def run_eval(model, tasks, repeats=3):
    2. report = {}
    3. for name, task in tasks.items():
    4. passes, valid, labels = 0, 0, []
    5. for sample in task.samples:
    6. outs = [model.generate(sample.prompt) for _ in range(repeats)]
    7. passes += int(any(task.judge(o, sample.gold) for o in outs))
    8. valid += int(all(task.schema_check(o) for o in outs))
    9. labels.append(task.extract_label(outs[0]))
    10. report[name] = {
    11. "pass@1": passes / len(task.samples),
    12. "schema_ok": valid / len(task.samples),
    13. "consistency": agreement(labels),
    14. "cost": task.cost_of(outs),
    15. }
    16. return report

    4. Breaking Down Personal Assistant Capability: Retrieval, Organization, and Localization

    The core of a personal assistant scenario is “turning unstructured information into usable fields.” In the character information search task, three points matter: whether the correct source snippet is cited, whether entities with the same name are distinguished, and whether missing information is stated explicitly rather than fabricated. Scoring can use field-level F1 plus a “hallucination rate” (the proportion of output containing facts not present in the material).

    In the video platform data organization task, the focus shifts to aggregation and deduplication: whether the same content from multiple sources can be merged, whether time fields can be normalized, and whether anomalies can be flagged. The main metric should be the “ingestion rate,” meaning the proportion of output that can be written to a database without manual repair.

    The site localization task tests terminology consistency and style preservation. In practice, a glossary should be prepared and enforced through the prompt, and scoring should combine sampled human readability with terminology hit rate. Science animation script generation can be seen as an extension of localization, with additional requirements for storyboard numbering, duration, narration, and scene description; schema compliance should carry more weight than literary flair.

    5. Breaking Down Coding Capability: From Correct Code to Engineering Usability

    Coding capability should not be judged only by “whether it can generate a runnable piece of code.” It should be divided into four layers: syntactic correctness, unit test passing, boundary handling, and maintainability. 3D turret modeling and corridor scene generation are typical “code as the product” tasks. Scoring should focus on whether the parametric script executes successfully on the first attempt, whether size and orientation constraints are met, and whether repeated runs produce stable results.

    In engineering practice, “execution-based evaluation” is recommended: run the generated code in an isolated sandbox and use assertions to check key invariants, such as the turret rotation axis aligning with the base, or the corridor length matching the room dimensions. Schematic validation logic:

    1. def check_scene(code, constraints):
    2. try:
    3. ns = {}
    4. exec(code, ns) # Run only in an isolated sandbox
    5. scene = ns["build"]()
    6. return all(c(scene) for c in constraints)
    7. except Exception:
    8. return False

    If models differ little in “first-attempt pass rate,” then compare their “pass rate after two corrections,” which is closer to the real development experience and better reflects differences in error localization and self-correction.

    6. Cost and Reproducibility: Making Conclusions Hold Up

    The value proposition of lightweight models is cost-effectiveness, so evaluation must record the cost dimension. It is recommended to measure input and output tokens uniformly, compute P95 latency, and convert this into “total cost per thousand tasks.” At the same time, fix the sampling parameters, fix the prompt templates, and fix the version of the scoring script; save all raw outputs to disk for review.

    Statistically, always report confidence intervals rather than a single-point score. When the gap between two models is smaller than the interval width, it should be judged as “no significant difference” rather than declaring a winner. For generative tasks, introduce double-blind review sampling at a ratio of no less than 10% to calibrate the automatic metrics.

    7. Common Pitfalls and Conclusion

    The first pitfall is the “total score ranking,” which forcibly weights different capability layers, so the conclusion drifts with the weights. The second is “drawing conclusions from a single sample,” which ignores generative randomness. The third is “looking only at success rate and not compliance rate,” which leaves downstream systems needing extensive fallback logic.

    Overall, the truly valuable output of comparing ten lightweight models across seven task types is not a ranking, but a capability radar chart and a reusable evaluation pipeline. For teams, selection should return to the business: for high-concurrency classification, prioritize consistency and latency; for content production, prioritize schema compliance and terminology hit rate; for code and modeling, prioritize first-attempt execution pass rate and correction efficiency. Running the evaluation data and pipeline on the general capabilities of cloud platforms such as Baidu AI Cloud (for example, object storage, log services, and monitoring and alerting) can keep this methodology running and continuously calibrated, preserving the timeliness and credibility of conclusions in an environment of rapid model iteration.