Renaissance Labs · Skills

Skills / metabench

Evaluation & Trust

metabench

Lean, deterministic evaluation runner and native result-file reader for lm-eval (general) and EuroEval (Swedish/European). Takes one Hugging Face model ID and a plain JSON list of benchmarks, runs both harnesses, and builds one table directly from their own result files with harness versions beside it.

npx skills add RenaissanceLabs-EU/skills --skill metabench

Own less. lm-eval (general) and EuroEval (Swedish & European) are maintained by others, and thin wrappers break when they try to reinvent parsers, weights, or regexes.

scripts/metabench.py does exactly three things (Python 3.9+ stdlib only):

1. A plain JSON list of benchmarks (suites/*.json) — no home-made YAML parser. 2. A runner that invokes lm_eval and euroeval on the same Hugging Face model ID (or local HF checkpoint), failing loudly (non-zero exit code) if any benchmark fails. 3. A native result-file reader that builds one table directly from lm-eval's own results_*.json and EuroEval's own euroeval_benchmark_results.jsonl, with the exact installed harness versions written beside every row — no log regexes, no weights, no thresholds, no fake aggregate score.

Usage

# Preview the exact native commands without executing
python3 scripts/metabench.py Qwen/Qwen2.5-7B-Instruct suites/swedish-and-math-and-code.json --dry-run

# Run the suite (exits non-zero if any benchmark fails)
python3 scripts/metabench.py Qwen/Qwen2.5-7B-Instruct suites/swedish-and-math-and-code.json --out-dir runs/qwen25-7b

# Rebuild the unified table from an existing run directory (or hand-run harness folders)
python3 scripts/metabench.py table runs/qwen25-7b

# Compare two run directories per-task and per-metric
python3 scripts/metabench.py compare runs/baseline runs/candidate

# List bundled suites
python3 scripts/metabench.py list-suites

Suite format (plain JSON)

Every benchmark in a suite names its harness (lm_eval or euroeval) and its real upstream task/language — verified against lm-eval and EuroEval:

{
  "name": "Swedish, Math & Code (lm-eval + EuroEval)",
  "seed": 42,
  "benchmarks": [
    { "harness": "euroeval", "language": "sv" },
    { "harness": "lm_eval", "task": "gsm8k" },
    { "harness": "lm_eval", "task": "humaneval", "confirm_run_unsafe_code": true }
  ]
}

Bundled suites

  • suites/swedish-and-math-and-code.json — euroeval (sv), lm_eval (gsm8k, humaneval).
  • suites/european-core.json — euroeval (sv), lm_eval (global_mmlu_full_sv, global_mmlu_de, global_mmlu_fr, ifeval).

Design rules

  • One model identifier: Both lm_eval --model hf --model_args pretrained=<model> and euroeval --model <model> take a standard Hugging Face model ID.
  • Native result files only: Reads results_*.json (lm-eval) and euroeval_benchmark_results.jsonl (EuroEval) directly so multi-language or multi-metric runs report every task and metric with its standard error (± SE) and exact harness version.
  • Never hide failures: Any non-zero harness exit or missing result file appears as FAILED in the table and causes metabench run and metabench table to exit with code 1.
  • Adding another harness later: SVEA (svea run --backend ... --output ...) or Inspect (inspect eval ...) is one small command builder + native JSON reader function when needed.