How to Evaluate Lightweight Models Across Seven Task Types and Choose the Right One

    Most side-by-side rankings of lightweight models fail because they average unlike tasks, treat sampling noise as skill, and ignore prompt effects. This article explains how to map tasks onto separate capability dimensions, lock the evaluation setup, score pass rate and cost with confidence intervals, and evaluate personal-assistant and coding agents differently.

    Why Side-by-Side Rankings Fail

    Most “many models on one leaderboard” conclusions cannot be reused. The problem is usually the experiment design, not the models.

    First, unlike tasks are forced into one average. Role search tests long-context retrieval and entity disambiguation. Comment classification tests short-text decisions and label consistency. Site data extraction tests structured-output stability. Multilingual localization tests terminology consistency. Science explainers and 3D modeling test multimodal and spatial reasoning. Long-corridor scene generation tests long-range consistency. Adding those scores together is like measuring blood pressure with a thermometer.

    Second, sampling noise is treated as a capability gap. Lightweight models are often unstable even at low temperature. A one-point difference from a single sample often falls inside the variance.

    Third, prompt gains are not isolated. Changing the prompt template for the same model can move the score by more than the gap between models.

    Map Capabilities First, Then Tasks

    Split what you measure into six mostly independent dimensions. Score each task on only one or two of them:

    • Retrieval and disambiguation: locating information in long context, resolving references, and separating entities that share a name.
    • Discrimination and classification: staying inside the label space, handling boundary cases, and refusing when appropriate.
    • Structured generation: valid JSON, complete fields, and consistency across turns.
    • Code and tool orchestration: runnable output, correct tool choice, and retry behavior after failure.
    • Multimodal understanding and production: image-text alignment, shot continuity, and plausible spatial structure.
    • Long-range consistency: keeping the goal across steps and not drifting after context is compressed.

    Once the seven task types are mapped this way, weights follow from the mapping. You no longer assign something like “30% to coding” by intuition.

    Lock the Variables on the Bench

    A reproducible run fixes four things: the input corpus, the output constraints, the budget ceiling, and the random seed and temperature.

    1. # Illustration: one evaluation entry point that hides model differences
    2. def run_case(case, client, budget):
    3. ctx = {"max_tokens": budget["max_tokens"],
    4. "temperature": 0.2, "seed": 42}
    5. for attempt in range(budget["retries"]):
    6. raw = client.chat(case.prompt, **ctx)
    7. parsed = case.validator(raw) # structure, facts, or executability
    8. if parsed.ok:
    9. return score(case, parsed, attempt)
    10. return score(case, None, budget["retries"]) # failures are scored too

    The important point: retries must count as cost. Otherwise a model that is right only after several tries is systematically overrated. Also persist input and output tokens and latency for every call so the raw record can be audited.

    Score by Layer, Not by a Single Rank

    For each dimension, report three numbers: pass rate, average number of attempts, and cost per task. Then classify failures: constraint violation, factual error, or format-parse failure. Attribution is more useful for decisions than a total score. A high format-failure rate means constrained decoding or post-processing needs work. A high factual-error rate means that task should not be left to a lightweight model alone.

    Aggregate with a weighted sum and a confidence interval:

    1. Score = Σ (w_i × pass_i) − λ × avgCost
    2. If the 95% confidence intervals overlap, call the result "no significant difference" and do not rank them.

    Personal Assistants and Coding Agents Are Different

    The split is not “which one is smarter.” It is how state is managed.

    A personal assistant is built around long-term memory and preference modeling: a user profile across sessions, privacy tiers, and clarification of vague intent. Its failure mode is “ask one more question first.” A coding agent is built around short, high-fidelity feedback: a verifiable loop of compile, test, and static checks. Its failure mode is “run it once first.”

    Evaluations must be designed separately. For assistants, measure clarification turns and preference hit rate. For coding agents, measure first-pass success and the rate of regressions introduced. The same question set will distort both.

    What to Do in Practice

    1. Build a private gold set of about 30 to 50 items that covers boundary cases for each dimension. Keep it small and controllable.
    2. Rerun the full set whenever the model or the prompt changes, keep the history, and watch for drift.
    3. Route by task: send classification and extraction to a lightweight model, and long-range planning or complex refactoring to a larger model. Use rules or a classifier as the front door.
    4. Put evaluation in continuous integration as a release gate. Block the release if cost or latency crosses the threshold.
    5. If you use general cloud services, store the corpus in object storage, smooth spikes with a message queue, run concurrent load on a container platform, and watch latency and failure rate with logging, monitoring, and alerts so the evaluation itself does not become the bottleneck.

    The useful outcome of a lightweight-model comparison is not a champion. It is a task-to-capability map and a regression-ready evaluation asset. The map drives the choice. The asset keeps that choice from going stale in three months.