Benchmarking Low-Cost Lightweight Models for Office Infrastructure Selection

    This article describes how to choose lightweight, fast models for high-frequency office workflows such as summarization, extraction, classification, and rewriting. It explains why teams should anonymize candidates, use a common protocol, evaluate six dimensions—task quality, tail latency and throughput, cost per effective request, stability and operability, compliance and data security, and integration effort—and validate results through offline evaluation, small-traffic canary release, and cost review. It also presents a reproducible metric-aggregation example, layered routing strategies, and common pitfalls.

    1. Core Requirements for Office Infrastructure Models

    The term “office infrastructure model” does not refer to a flagship model that pursues the strongest general capability. It refers to a lightweight, fast model that can be embedded stably in daily office workflows and handle high-frequency, low-to-medium-complexity tasks. Such models typically appear in email summarization, meeting-note extraction, form-field extraction, ticket classification, knowledge-base question routing, draft generation, and content rewriting. These tasks have low value per call, but they involve high call volumes, obvious concurrency fluctuations, and sensitivity to latency. Once the output format becomes unstable, it directly affects downstream systems.

    Therefore, the goal of model selection for office infrastructure is not to achieve the highest score at a single point. It is to find a balance among capability, performance, cost, and operability under clear service-level objectives (SLOs) and budget constraints. In particular, when the per-call prices of candidate solutions differ significantly, teams should not compare unit prices alone. They should compare the “cost per effective request”: even if a request is cheap, a low valid structured-output rate, high retry rate, and heavy manual review can make the final cost higher.

    2. Anonymize and Standardize the Candidates

    To prevent brand information from interfering with benchmark conclusions, teams should anonymize multiple candidate lightweight, fast model solutions as A, B, C, D, and so on, and unify the input/output protocol, prompt template, timeout, and retry policy. Before benchmarking, the following variables should be fixed:

    • Task set: summarization, extraction, classification, rewriting, multi-turn instruction following, and so on;
    • Input distribution: short text, medium-to-long text, tabular text, and noisy text;
    • Output constraints: JSON structure, field enumerations, maximum output length, and refusal format;
    • Runtime parameters: temperature, maximum output length, timeout threshold, and retry count;
    • Statistical scope: P50/P95/P99 latency, success rate, structured-output validity rate, and cost per successful request.

    Anonymization is not a formality. It prevents the team from forming “brand expectations” before evaluation. Only when candidates run under the same protocol can the benchmark be reproducible.

    3. Six-Dimensional Metric System

    3.1 Task Capability: Use Business Gold Labels as the Standard

    Capability evaluation for office tasks should be split into subtasks rather than summarized by one composite score. For example, summarization should be evaluated by factual consistency and key-point coverage; extraction by field accuracy and structured-output validity; classification by confusion matrix; and rewriting by instruction following and style preservation. Teams should build 100–300 gold-label samples for each task type and retain long-tail hard cases. Metrics should include at least:

    • Task accuracy or manual pass rate;
    • Structured-output validity rate;
    • Factual-consistency error rate;
    • Proportion of refusals and out-of-scope answers;
    • Stability rate of multi-turn instruction following.

    3.2 Latency and Throughput: Focus on Tail Latency

    Average latency can hide long-tail problems. Office infrastructure models must be evaluated on P95 and P99 latency, as well as on degradation curves under rising concurrency. Teams should run load tests at fixed concurrency levels, such as 1, 5, 20, and 50 concurrent requests, and record throughput, error rate, timeout rate, and tail latency. For interactive scenarios, P95 latency determines user experience; for batch scenarios, throughput and cost per unit time are more important.

    3.3 Cost: Calculate “Cost per Effective Request”

    Cost should not be based only on the listed price per call. A more reasonable formula is:

    Cost per effective request = inference resource cost + retry cost + manual review cost + operations amortization cost

    Inference resource cost can be converted from input/output tokens or resource duration; retry cost comes from format errors, timeouts, and rate limiting; manual review cost comes from sampling low-confidence cases. Only when failed requests and manual fallback are included does cost comparison become meaningful.

    3.4 Stability and Operability

    Stability includes error rate, timeout rate, output-format drift, rate-limit recovery capability, and version rollback capability. Operability includes whether call logs are complete, whether metrics are observable, whether gray-scale routing is supported, and whether cost can be measured by task dimension. Once an office infrastructure model is launched, version changes and prompt changes can both cause output drift. Therefore, versioned prompts, evaluation-set regression, and monitoring alerts are necessary.

    3.5 Compliance and Data Security

    Office data often contains personal information, contract information, and internal knowledge. During evaluation, teams should use de-identified samples and clearly define log retention, audit, and access-control policies. For cross-region or sensitive business, teams should prioritize deployment methods that meet organizational compliance requirements.

    3.6 Engineering Integration Cost

    The integration complexity of candidate solutions, structured-output constraint capability, batch-processing capability, asynchronous task support, and error-code specifications all affect implementation cost. A solution with high integration cost may slow down launch even if its unit price is low.

    4. A Reproducible Benchmarking Process

    A three-step process is recommended: offline evaluation, small-traffic online canary release, and cost review.

    The first step is offline evaluation. Use a unified evaluation set to call candidates A/B/C/D in batches, and record the task type, elapsed time, success or failure, retry count, input/output length, and manual review minutes for each request. All requests use the same prompt template and output constraints.

    The second step is online canary release. Route a small proportion of traffic to candidate solutions by request hash, while keeping the main path rollback-ready. In the online phase, focus on P95/P99 latency, error rate, rate-limit triggers, and downstream parsing failure rate.

    The third step is cost review. Combine offline and online metrics, calculate cost per effective request, and break it down by task type. Final selection should not rely only on a total score. It should ask whether the solution meets key-task SLOs within budget.

    The following is a simplified metric-aggregation example that uses only the standard library, making it easy for teams to reproduce the statistical scope:

    1. from dataclasses import dataclass
    2. from statistics import mean
    3. from typing import List
    4. @dataclass
    5. class CallRecord:
    6. model_id: str
    7. task: str
    8. latency_ms: float
    9. success: bool
    10. input_tokens: int
    11. output_tokens: int
    12. retry_count: int
    13. review_minutes: float
    14. def percentile(values: List[float], p: float) -> float:
    15. if not values:
    16. return 0.0
    17. values = sorted(values)
    18. idx = int(round((len(values) - 1) * p))
    19. return values[idx]
    20. def summarize(records: List[CallRecord],
    21. resource_cost_per_1k_tokens: float,
    22. review_cost_per_minute: float):
    23. by_model = {}
    24. for r in records:
    25. by_model.setdefault(r.model_id, []).append(r)
    26. result = {}
    27. for model_id, rows in by_model.items():
    28. lat = [r.latency_ms for r in rows]
    29. success_count = sum(1 for r in rows if r.success)
    30. token_cost = sum(
    31. (r.input_tokens + r.output_tokens) / 1000 * resource_cost_per_1k_tokens
    32. for r in rows
    33. )
    34. review_cost = sum(r.review_minutes * review_cost_per_minute for r in rows)
    35. retry_penalty = sum(r.retry_count for r in rows) * 0.01
    36. total_cost = token_cost + review_cost + retry_penalty
    37. result[model_id] = {
    38. "count": len(rows),
    39. "success_rate": success_count / len(rows),
    40. "p50_ms": percentile(lat, 0.50),
    41. "p95_ms": percentile(lat, 0.95),
    42. "p99_ms": percentile(lat, 0.99),
    43. "unit_success_cost": total_cost / max(success_count, 1),
    44. "avg_retry": mean([r.retry_count for r in rows]),
    45. }
    46. return result

    The point of this code is not a specific price rate but the statistical scope: success rate, tail latency, retries, and manual review must appear in the same table. In actual implementation, the evaluation service can be deployed on a container platform, de-identified evaluation sets can be stored in object storage, call logs can be collected by a logging service, and latency, error rate, and cost anomalies can be observed through monitoring alerts. On Baidu AI Cloud, these general-purpose capabilities can help teams operationalize the evaluation workflow instead of relying on manual spreadsheets.

    5. Implementation Strategy for Office Infrastructure

    After benchmarking, a one-size-fits-all model choice is not recommended. A more reliable approach is layered routing:

    1. Rules and templates first: process fixed-format tasks with rules or templates first, and let the model handle only the parts that cannot be rule-based;
    2. Lightweight models handle high-frequency tasks: prioritize lightweight, fast models for high-frequency tasks such as summarization, classification, and extraction;
    3. Escalate complex requests: when confidence is low, output validation fails, or task complexity is high, escalate to a stronger model;
    4. Caching and batch processing: cache repeated questions and similar template requests, and process non-real-time tasks asynchronously in batches;
    5. Budget guardrails: set call budgets and retry budgets by business line and task type to prevent abnormal traffic from amplifying costs;
    6. Degradation and rollback: when rate limiting or latency rises, degrade to cached results, rule-based fallback, or queued processing.

    Cost optimization should also focus on “effective requests”: compress prompts, constrain output length, improve structured-output validity, reduce invalid retries, and choose the smallest usable model for each task. The goal should be to significantly reduce cost per effective request, not merely to lower the listed unit price.

    6. Common Pitfalls and Conclusion

    Common pitfalls include looking only at unit price without considering retries and manual cost; looking only at average latency without considering P99; repeatedly tuning prompts on the same evaluation set and causing overfitting; ignoring output drift after version upgrades; and treating a one-time benchmark as a final conclusion. The correct approach is to make benchmarking a continuous operational mechanism: fixed evaluation sets, versioned prompts, gray-scale routing, monitoring alerts, and quarterly reviews.

    In short, benchmarking low-cost lightweight models should return to business constraints. First define the task boundaries and SLOs of office infrastructure, then anonymize candidate solutions, evaluate capability, tail latency, success rate, cost per effective request, and operability under a unified protocol, and finally complete selection through small-traffic canary release and monitoring iteration. Only in this way can teams select an office infrastructure model that is truly sustainable under budget constraints.