A Methodology for Benchmarking 10 Lightweight LLMs Across 7 Task Categories

    This article presents a practical evaluation methodology for comparing lightweight large language models in real engineering scenarios. Instead of ranking models by a single aggregate score, it defines 10 candidate models, 7 task categories, and 2 target scenarios—personal assistant and coding assistance—with concrete scoring criteria and execution details. It explains why naive comparisons are distorted by unequal prompting, single-metric scoring, and mixed task weighting, then outlines a unified execution protocol covering prompt versioning, parsing tolerance, latency and cost measurement, and failure classification. The key takeaway is that no model is universally best; optimal choice depends on scenario weights, per-task metrics, and total cost. Reusable recommendations for building a small in-house evaluation set and integrating it into CI are also included.

    1. Why Lightweight Model Comparisons Are Often Misleading

    When selecting models for production, teams frequently need to choose among a group of lightweight large language models that emphasize low latency and low cost. A common approach is to run all candidates through the same batch of tasks and rank them by total score. The problem is that this kind of comparison usually suffers from three systematic biases:

    1. Unequal prompting: Models differ greatly in their sensitivity to prompts. Using one rough prompt for all of them may measure “prompt fit” rather than “capability ceiling.”
    2. Single-metric scoring: Counting only the accuracy of the final answer ignores format compliance, latency, token consumption, and recoverability from failures.
    3. Mixed tasks: Putting retrieval, classification, data extraction, front-end reconstruction, and 3D modeling into one total score means the weights are implicitly determined by the number of tasks.

    Rather than restating a specific leaderboard, this article abstracts the original scenario into an evaluation engineering setup: 10 candidate lightweight models, 7 task categories, and 2 target scenarios (personal assistant and coding assistance), with actionable execution details.

    2. Candidate Set and Scenario Abstraction

    The 10 candidate models are uniformly labeled M1 through M10. All are general-purpose conversational models with relatively small parameter counts that emphasize throughput and cost. Their shared capability boundaries are roughly: support for context input, support for structured output, and support for function calling or tool orchestration (the exact degree of support must be verified empirically and cannot be assumed).

    The two target scenarios have completely different demands:

    • The personal assistant scenario focuses on intent understanding, multi-turn consistency, information organization, naturalness of Chinese expression, and response speed.
    • The coding assistance scenario focuses on mapping requirements to code, cross-file consistency, runnability, the debugging loop, and constraint retention in long contexts.

    The ranking of the same model often reverses between the two scenarios, which is exactly where the value of a horizontal evaluation lies.

    3. Design and Scoring Criteria for the 7 Task Categories

    3.1 Role Retrieval and Aggregation

    Given a fictional character profile, the model must locate key attributes across several semi-structured documents and aggregate them. Scoring looks at three things: attribute recall, whether conflict resolution is correct, and whether citations can be traced back to source fragments.

    3.2 Review Sentiment Classification

    Construct about 500 annotated short Chinese reviews covering difficult cases such as irony, preposed negation, and dialect expressions. The metrics are macro-averaged precision and recall rather than overall accuracy, to avoid the majority class masking long-tail performance.

    3.3 Site Data Extraction

    The input is a simulated page structure description, and the output is normalized records. Scoring includes field completeness, type correctness, and format compliance (whether the output can be directly deserialized by downstream systems).

    3.4 Multilingual Page Localization

    Given Chinese interface copy and a glossary, the model must output the target-language version while keeping placeholders intact. The key metrics are placeholder retention rate and terminology consistency; manual spot checks of language fluency come second.

    3.5 Science Animation Script Generation

    The model must produce a storyboard script containing a timeline, narration, visual descriptions, and subtitles. Scoring dimensions are structural completeness, error in duration estimation, and accuracy of scientific statements.

    3.6 Parametric Modeling Script

    The input is a description of a geometric shape, and the output is an executable 3D modeling script. Scoring looks at only two things: whether the script runs successfully on the first attempt, and the error between the bounding box dimensions of the generated shape and the expected values.

    3.7 Complex Path Level Design

    Given constraints (path length, number of branches, difficulty curve), the model outputs level configuration data. Scoring looks at the constraint satisfaction rate and a manual playability rating.

    Unified constraints: all tasks use the same prompt template skeleton, with only the task description section replaced; decoding parameters are fixed (consistent temperature, maximum output length, and timeout); each task is repeated three times and the median is taken to reduce the impact of randomness.

    A schematic evaluation driver structure is shown below (pseudocode that only expresses the flow and does not point to any specific tool):

    1. def run_eval(model, task, prompt, repeats=3):
    2. results = []
    3. for _ in range(repeats):
    4. raw = call_model(model, prompt, temperature=0.2, timeout=30)
    5. parsed = safe_parse(raw) # parse failures are still counted
    6. results.append(score(task, parsed))
    7. return median(results), token_usage(model, task)

    4. A Unified Execution Protocol for Comparable Results

    Comparability comes from controlling variables. It is recommended to fix the following five items:

    • Prompt version freeze: Put prompt templates under version control; hot modifications are not allowed during evaluation.
    • Parsing tolerance: Treat “output cannot be parsed” as a failure result rather than discarding the sample.
    • Latency definition: Distinguish time to first byte from full output latency, since the two affect interactive experience differently.
    • Cost definition: Record both input and output tokens, convert them into a unified cost unit, and then compare.
    • Failure classification: Split failures into four categories—format failure, factual error, constraint violation, and timeout—to make it easier to locate weaknesses.

    5. Interpreting Results: Why Personal Assistant and Coding Assistance Have Different Winners

    From engineering experience, lightweight models show a stable divergence between the two scenarios:

    • Personal assistant tasks rely more on semantic robustness and naturalness of expression. Model size is not the only determining factor; training data mix and alignment strategy matter more, so rankings tend to be dense and the gaps among the top few are within the noise range.
    • Coding assistance tasks place higher demands on long-constraint retention and executability. Once the context grows longer, the probability of lightweight models forgetting constraints rises, so rankings are more likely to spread out.

    The correct conclusion is therefore: there is no “universally strongest” model, only “the best within a scenario.” When selecting a model, first determine the scenario weights, then look at per-task metrics, and finally make the decision based on total cost (calling cost plus manual rework cost).

    6. Reusable Implementation Recommendations

    1. Build a small evaluation set of 30 to 50 in-house business samples, which is closer to real returns than public leaderboards.
    2. Integrate evaluation into continuous integration so that model or prompt changes trigger automatic regression.
    3. Set rule-based fallbacks and manual review for high-risk tasks, and do not let model output go directly into the production pipeline.
    4. Use a routing strategy to combine multiple lightweight models: route classification and extraction to a low-cost channel, and generation and modeling to a high-quality channel.
    5. Monitor online metrics (first-pass rate, manual rewrite rate, timeout rate) and use them to adjust offline evaluation weights in reverse.

    In summary, comparing 10 lightweight models across 7 task categories is essentially an exercise in evaluation system design. Making prompts, metrics, cost, and failure classification solid makes the conclusions reproducible and truly valuable for guiding model selection and architecture decisions.