agentleFS
NikoxkxNikoxkx/Agent-Skills/skills/ai-ml/model-benchmarker/SKILL.md

model-benchmarker

Skill1 starsChanged 5 months agoApache-2.0View on GitHub

Benchmarks LLM performance on speed, cost, accuracy, and token efficiency. Use when selecting a model for a use case or comparing model versions.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run multiple times and average (warm up, then measure).

    line 42
  2. Distinctive:

    Use the provider's usage metadata for exact token counts when available.

    line 47
  3. Distinctive:

    Rate limits during benchmark: Add sleeps or run sequentially with backoff.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Overview

Builds a comprehensive LLM benchmark harness focused on practical production metrics: latency (TTFT, time-per-output-token, end-to-end), cost (input + output tokens × price), accuracy/quality on task-specific tests, token efficiency, streaming vs non-streaming, and batch performance. Produces comparable numbers across models and a decision framework.

When to Use This Skill

  • Choosing which model(s) to use for a new feature or product.
  • Comparing a new model release against your current one.
  • Optimizing the cost/quality/latency tradeoff for a specific workload.
  • The user says "which model should we use?" or "benchmark these models".

Prerequisites

  • Access to the models you want to compare (API keys or local inference server).
  • A representative test set for the target task (quality eval) + a set of typical prompts for latency/cost.
  • (Optional) A quality evaluation harness (see evaluation-harness skill).

Steps

  1. Define the benchmark dimensions:
    • Quality / accuracy on your task.
    • Latency: TTFT (time to first token), TPS (tokens per second), total time.
    • Cost: $ per 1M input + output tokens (use current published prices).
    • Token usage: input + output tokens per request.
    • Reliability: error rate, timeout rate.
  2. Prepare test sets:
    • Quality set: 50-200 examples with ground truth or strong judge.
    • Latency set: 20-50 representative prompts of varying lengths (short, medium, long context).
    • Run multiple times and average (warm up, then measure).
  3. Measurement:
    • For streaming APIs: capture TTFT and per-token timestamps.
    • For non-streaming: just wall time.
    • Use the provider's usage metadata for exact token counts when available.
    • Calculate cost from token counts + published prices.
  4. Run the benchmark:
    • Same prompts, same temperature (usually 0 or 0.2 for consistency), same max_tokens.
    • Same system prompt / few-shot across models when fair.
    • Record raw results + aggregates.
  5. Analysis & visualization:
    • Table: Model | Quality Score | Avg TTFT | Avg TPS | Avg Cost per request | Tokens in/out.
    • Pareto frontier (quality vs cost, quality vs latency).
    • Failure cases per model.
  6. Output:
    • Benchmark script (Python) that is easy to extend with new models.
    • Results JSON + summary table (Markdown or pandas).
    • Visualization code (matplotlib or Plotly).
    • Decision framework: "If quality delta < X% and cost savings > Y%, switch to cheaper model."
    • Recommendations for your specific use case.

Examples

A full benchmark script comparing Claude 3 Haiku / Sonnet, GPT-4o-mini / 4o, Gemini Flash / Pro on a customer support classification + draft task, with streaming latency measurement, cost calculation, quality via LLM judge, and a summary report with charts is included.

Edge Cases & Error Handling

  • Rate limits during benchmark: Add sleeps or run sequentially with backoff.
  • Context length differences: Note max context and test at realistic lengths.
  • Pricing changes: The script should take prices as input or fetch from a config.

Verification

  1. The script runs cleanly against at least two models.
  2. Latency numbers are stable across repeated runs (low variance).
  3. Cost calculation matches what you see in the provider dashboard for the test calls.
  4. Quality scores align with your intuition (cheaper models are usually a bit worse).
  5. The report clearly shows tradeoffs.
  6. Success: You have objective data to make a model selection decision and can re-run the benchmark easily when new models are released.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.