agentleFS
abipalliabipalli/agent-skills/skills/model-bench/SKILL.md

model-bench

Skill1 starsChanged 18 days agoApache-2.0View on GitHub

Benchmark a model through LiteLLM the same way every time: systems, tool calling, voice rules, strict JSON and rubric spot checks, with the exact build recorded. Use for \"benchmark this model\", \"compare models\", \"should X replace Y\".

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never unload a resident production model without the owner's go-ahead, and reload it and confirm it is back when done.

    line 46
  2. Distinctive:

    Rubrics, not impressions: Every quality point is a deterministic check (regex, word limits, executed unit tests).

    line 54
  3. Very specific:

    Write its build.json (see rule 1).

    line 65
  4. Very specific:

    Run cold, then warm, then report with the baselines' latest results for the same suite hashes.

    line 66

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “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

model-bench

One harness for every model. scripts/model-bench.py calls a model by its LiteLLM name, runs the versioned suites in suites/, and writes one JSON result per suite run, plus a markdown report across runs. Run it with uv run --script (it declares pyyaml inline).

MB=<this skill's directory>/scripts/model-bench.py
$MB selftest                                          # scorers, no network
$MB snapshot                                          # host state: ollama ps, GPU, RAM, swap
$MB run MODEL --build build.json --phase cold --suite systems
$MB run MODEL --build build.json                      # warm: all five suites
$MB report $RESULTS/*.json --out report.md

Environment: MODEL_BENCH_URL, MODEL_BENCH_KEY (or ~/.config/model-bench/key), MODEL_BENCH_RESULTS (default ~/.local/share/model-bench), and optionally MODEL_BENCH_SSH and MODEL_BENCH_OLLAMA for host snapshots.

Rules of the method

  1. Record the build or don't run. build.json must name model_id (LiteLLM's model_info.id), runtime, runtime_version, weights, weights_hash (Ollama digest or file SHA-256), quantization and context. Add the route's own parameters (thinking, reasoning effort) under params, and a short label for the report. Every response's x-litellm-model-id is checked against model_id. A fallback to another model is flagged, never averaged in.
  2. Measure models as deployed. The harness sends only the prompt, sampling and max_tokens. Thinking, reasoning effort and num_ctx belong to the route. To compare settings, make two routes and two build files.
  3. Same exam for everyone. Suites are frozen: changing a case means a new <suite>.v<N+1>.yaml. Results carry the suite's version and SHA-256. Compare only results with the same suite hash. Prompts and tool schemas come verbatim from production (suites/fixtures/), copied by extraction, not retyped.
  4. Smoke before score. A warm run first checks a trivial prompt. If it fails, the run aborts with "runtime broken" instead of scoring the model zero.
  5. Cold and warm are separate runs. For cold, the model must not be loaded: unload it, check with snapshot, then --phase cold. Cold load ≈ cold ping TTFT minus warm ping TTFT. Never unload a resident production model without the owner's go-ahead, and reload it and confirm it is back when done.
  6. Repetitions, median and spread. At least 3 repetitions, interleaved (every case's rep 1, then rep 2...). The report shows the median with [min–max]. Fixed temperature and seed come from the suite. Seeds don't make GPU decoding deterministic, so spread is still expected.
  7. Defeat caches where they would lie. Systems prompts start with a per-request nonce, so a prefix cache never serves a repetition. Prefill rates use each model's own token count, and the result also keeps prompt_chars, because tokenizers differ.
  8. Rubrics, not impressions. Every quality point is a deterministic check (regex, word limits, executed unit tests). No judge model, which would be one more model to benchmark.
  9. The machine is part of the result. A host snapshot is saved before and after each run. Swap above 90% or a co-resident model is flagged in the report.
  10. Score structured output the way its caller parses it. The JSON suite records strict and lenient parses, and caller_ok uses the caller's own rule.

Adding a model

  1. Make it reachable as a LiteLLM route whose name starts with local- if it runs locally: the PII guard treats every other name as egress and would mask or rewrite the benchmark prompts.
  2. Write its build.json (see rule 1).
  3. Run cold, then warm, then report with the baselines' latest results for the same suite hashes.

Suites

SuiteMeasuresScored by
systemsTTFT, decode tok/s, prefill tok/s at about 2k and 16k tokens, long-context recallstreamed timings, regex recall
toolsright tool, schema-valid arguments, no invented tools, no tool when none is neededfirst-turn tool_calls vs expect
voiceat most 40 words, plain text, no tool on chat questionsword count, markdown regex
jsonreframer (lenient, 800 tokens) and card (strict, json_object, 300 tokens)parse, shape, expected values
qualityarithmetic, ordering, extraction, summary fidelity, format, honesty, coderubric checks, executed tests

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.