Evaluating Lightweight LLMs Across Seven Tasks: Methodology and Practice

    This article presents a reproducible evaluation method for lightweight large language models across seven task types, covering sample constraints, scoring criteria, assistant-versus-coding comparison, execution and review, and selection guidance. Readers gain a practical framework for comparing models on latency, cost, instruction-following stability, long-context consistency, executability, and correction gain rather than relying on generic leaderboard scores alone.

    1. Why Lightweight Models Need Their Own Evaluation Method

    The biggest difference between lightweight models—typically characterized by low latency, small parameter counts, and low cost—and flagship models is not whether they can perform a task at all, but whether they can perform it reliably within a given latency and cost budget. The evaluation criteria therefore need to change. Flagship models can be compared primarily on final answer quality, while lightweight models must also be compared across four dimensions: first-token latency, per-task cost, instruction-following stability, and long-context degradation.

    A common mistake is to select models directly from a general-purpose leaderboard score. The task distribution in general leaderboards differs substantially from real business workloads, and such leaderboards often do not distinguish between one-shot generation and multi-turn tool calling. The approach in this article is to fix ten sample models (labeled M1–M10 and not tied to any specific product), fix seven task categories, and fix the scoring scripts and random seeds. Only the model and task variables change, yielding reproducible and comparable conclusions.

    2. Samples and Constraint Settings

    • Sample size: Ten lightweight models covering general technical approaches from different vendors, avoiding bias from a single source.
    • Unified entry point: All models are called through a unified message interface, with unified temperature, unified maximum output length, and a unified system prompt template.
    • Unified budget: Each task is sampled three times, and the median is taken. Latency and consumption are recorded for cost–quality curves.
    • Capability isolation: The same model runs two separate prompt sets: a personal assistant chain and a coding chain, avoiding mixing the two capabilities into a single score.

    3. Design and Scoring Criteria for the Seven Task Types

    1. Role Retrieval (Information Localization)

    The input is a setting text, and the model must locate the attributes of a specified role and provide the source. Scoring points include whether recall is complete, whether attributes are misattributed, and whether citations are verifiable. A typical failure mode for lightweight models on this task is “completion-style hallucination,” where the model outputs attributes that do not exist in the setting.

    2. Comment Classification (Structured Discrimination)

    The input is a batch of short texts, and the output must use a fixed label set. Scoring uses accuracy, macro-averaged F1, and label out-of-bound rate. The key observation is label constraint adherence: whether the model invents labels or outputs extra explanations that break downstream parsing.

    3. Site Public Data Collection (Tool Orchestration)

    The model is asked to generate a collection workflow: request construction, pagination, deduplication, rate limiting, and exception retry. Scoring points include whether the workflow respects robots and rate-limit constraints, whether it handles pagination boundaries, and whether it provides idempotent deduplication. On safety, the requirements must be explicit: collect only public data and comply with site terms and access frequency limits.

    1. # Illustration: evaluation execution skeleton (pseudocode)
    2. TASKS = ["role_search", "comment_cls", "site_collect",
    3. "i18n_site", "edu_animation", "turret_3d", "corridor_scene"]
    4. def run(model, task, prompt, seed):
    5. rec = []
    6. for _ in range(3):
    7. r = model.call(prompt, temperature=0.2, seed=seed)
    8. rec.append(score(task, r)) # rule-based scoring + assertion checks
    9. return median(rec), latency(model), cost(model)
    10. report = {m: {t: run(m, t, PROMPTS[t], 42) for t in TASKS} for m in MODELS}

    4. Website Localization (Multilingual Rewriting)

    The input is page copy and a glossary, and the output is the target-language version. Scoring points include terminology consistency, whether placeholders and variables are mistranslated, and whether length expansion breaks the layout. The most common defects in lightweight models are omissions and placeholder corruption.

    5. Educational Animation (Script and Storyboard)

    The model must output a storyboard table with shot number, duration, narration, and visual description. Scoring points include whether the total duration matches, whether narration and visuals correspond, and whether scientific statements are accurate. Rules can be used to validate duration sums and field completeness.

    6. Turret 3D Modeling (Parametric Code Generation)

    The model must output executable parametric modeling code, such as a rotational body plus an array. Scoring points include whether the code runs, whether dimension parameters are adjustable, and whether the topology is closed. This task best distinguishes “can write code” from “can only describe.”

    7. Corridor Scene Construction (Long-Instruction Consistency)

    The model must build a first-person corridor scene according to a checklist: materials, lighting, collisions, and naming conventions. Scoring points include checklist coverage, naming-convention adherence, and cross-file consistency. This task examines constraint retention in long contexts.

    4. Comparison Framework for Assistant and Coding Capabilities

    The seven tasks map to two chains. The assistant chain (1, 2, 4, 5, and 7) leans toward natural language understanding and constraint following. The coding chain (3 and 6) leans toward executability and a debugging loop. When comparing models, look at three signals:

    1. Executable rate: For the coding chain, measure the one-pass code success rate. For the assistant chain, measure the structured-output parsing success rate.
    2. Correction gain: The improvement after one error-feedback round. This is often where lightweight models differ.
    3. Cost elasticity: The assistant chain mostly involves short requests, while the coding chain mostly involves long contexts. Cost–quality curves should be drawn separately.

    5. Execution and Review

    Automated scoring handles deterministically judgeable items such as fields, labels, durations, and runnability. Human spot checks handle items that cannot be determined automatically, such as statement accuracy, aesthetics, and usability. Use double-blind review, disagreement arbitration, and a sampling ratio of no less than 20%, and calculate inter-rater consistency to avoid scores that look good but are not reliable.

    6. Conclusions and Selection Recommendations

    • For high-frequency short requests in assistant scenarios, prioritize latency and label adherence. For coding tasks, prioritize executable rate and correction gain.
    • Do not extrapolate across tasks. A model leading in classification does not necessarily produce stronger modeling code.
    • Include evaluation scripts in the regression pipeline and automatically rerun them when models or prompts change, creating a sustainable basis for selection.
    • On the engineering side, use general cloud capabilities such as object storage, message queues, container platforms, logging services, and monitoring and alerting to support evaluation and online calls, ensuring reproducibility and observability.

    The value of the seven tasks is not the ranking itself, but a decision method with unified criteria, reproducibility, and regression capability: it turns model selection from subjective impression into a measurable, iterative engineering practice.