Skip to content
Agent Orchestration
Skill

/lm-evaluation-harness

Evaluates LLMs across 60+ academic benchmarks (MMLU, HumanEval, GSM8K,

From plugin
kheish
20878 skills

Claude Code

$ npx -y skills add graniet/kheish --skill lm-evaluation-harness --agent claude-code

SKILL.md

lm-evaluation-harness.SKILL.md
description: Evaluates LLMs across 60+ academic benchmarks (MMLU, HumanEval, GSM8K,
  TruthfulQA, HellaSwag). Use when benchmarking model quality, comparing models, reporting
  academic results, or tracking training progress. Industry standard used by EleutherAI,
  HuggingFace, and major labs. Supports HuggingFace, vLLM, APIs.
version: 1.0.0
author: Orchestra Research
license: MIT
dependencies:
- lm-eval
- transformers
- vllm
metadata:
  catalog:
    tags:
    - Evaluation
    - LM Evaluation Harness
    - Benchmarking
    - MMLU
    - HumanEval
    - GSM8K
    - EleutherAI
    - Model Quality
    - Academic Benchmarks
    - Industry Standard

Kheish Compatibility

This skill is repo-local and stays inactive until explicitly activated.

When the original instructions refer to legacy tool names, use these Kheish mappings:

  • `terminal` => `bash`
  • `web_extract` => `web_fetch`, plus `web_search` when discovery is needed
  • `search_files` => `grep_search` and `glob_search`
  • `browser_*` tools require a browser-capable surfaced tool or MCP; if none is available, use the closest available surface and say so explicitly

When the instructions mention local helper files, resolve them from `${KHEISH_SKILL_DIR}`.

lm-evaluation-harness - LLM Benchmarking

Quick start

lm-evaluation-harness evaluates LLMs across 60+ academic benchmarks using standardized prompts and metrics.

**Installation**:

pip install lm-eval

**Evaluate any HuggingFace model**:

lm_eval --model hf \
  --model_args pretrained=meta-llama/Llama-2-7b-hf \
  --tasks mmlu,gsm8k,hellaswag \
  --device cuda:0 \
  --batch_size 8

**View available tasks**:

lm_eval --tasks list

Common workflows

Workflow 1: Standard benchmark evaluation

Evaluate model on core benchmarks (MMLU, GSM8K, HumanEval).

Copy this checklist:

Benchmark Evaluation:
- [ ] Step 1: Choose benchmark suite
- [ ] Step 2: Configure model
- [ ] Step 3: Run evaluation
- [ ] Step 4: Analyze results

**Step 1: Choose benchmark suite**

**Core reasoning benchmarks**:

  • **MMLU** (Massive Multitask Language Understanding) - 57 subjects, multiple choice
  • **GSM8K** - Grade school math word problems
  • **HellaSwag** - Common sense reasoning
  • **TruthfulQA** - Truthfulness and factuality
  • **ARC** (AI2 Reasoning Challenge) - Science questions

**Code benchmarks**:

  • **HumanEval** - Python code generation (164 problems)
  • **MBPP** (Mostly Basic Python Problems) - Python coding

**Standard suite** (recommended for model releases):

--tasks mmlu,gsm8k,hellaswag,truthfulqa,arc_challenge

**Step 2: Configure model**

**HuggingFace model**:

lm_eval --model hf \
  --model_args pretrained=meta-llama/Llama-2-7b-hf,dtype=bfloat16 \
  --tasks mmlu \
  --device cuda:0 \
  --batch_size auto  # Auto-detect optimal batch size

**Quantized model (4-bit/8-bit)**:

lm_eval --model hf \
  --model_args pretrained=meta-llama/Llama-2-7b-hf,load_in_4bit=True \
  --tasks mmlu \
  --device cuda:0

**Custom checkpoint**:

lm_eval --model hf \
  --model_args pretrained=/path/to/my-model,tokenizer=/path/to/tokenizer \
  --tasks mmlu \
  --device cuda:0

**Step 3: Run evaluation**

# Full MMLU evaluation (57 subjects)
lm_eval --model hf \
  --model_args pretrained=meta-llama/Llama-2-7b-hf \
  --tasks mmlu \
  --num_fewshot 5 \  # 5-shot evaluation (standard)
  --batch_size 8 \
  --output_path results/ \
  --log_samples  # Save individual predictions

# Multiple benchmarks at once
lm_eval --model hf \
  --model_args pretrained=meta-llama/Llama-2-7b-hf \
  --tasks mmlu,gsm8k,hellaswag,truthfulqa,arc_challenge \
  --num_fewshot 5 \
  --batch_size 8 \
  --output_path results/llama2-7b-eval.json

**Step 4: Analyze results**

Results saved to `results/llama2-7b-eval.json`:

{
  "results": {
    "mmlu": {
      "acc": 0.459,
      "acc_stderr": 0.004
    },
    "gsm8k": {
      "exact_match": 0.142,
      "exact_match_stderr": 0.006
    },
    "hellaswag": {
      "acc_norm": 0.765,
      "acc_norm_stderr": 0.004
    }
  },
  "config": {
    "model": "hf",
    "model_args": "pretrained=meta-llama/Llama-2-7b-hf",
    "num_fewshot": 5
  }
}

Workflow 2: Track training progress

Evaluate checkpoints during training.

Training Progress Tracking:
- [ ] Step 1: Set up periodic evaluation
- [ ] Step 2: Choose quick benchmarks
- [ ] Step 3: Automate evaluation
- [ ] Step 4: Plot learning curves

**Step 1: Set up periodic evaluation**

Evaluate every N training steps:

#!/bin/bash
# eval_checkpoint.sh

CHECKPOINT_DIR=$1
STEP=$2

lm_eval --model hf \
  --model_args pretrained=$CHECKPOINT_DIR/checkpoint-$STEP \
  --tasks gsm8k,hellaswag \
  --num_fewshot 0 \  # 0-shot for speed
  --batch_size 16 \
  --output_path results/step-$STEP.json

**Step 2: Choose quick benchmarks**

Fast benchmarks for frequent evaluation:

  • **HellaSwag**: ~10 minutes on 1 GPU
  • **GSM8K**: ~5 minutes
  • **PIQA**: ~2 minutes

Avoid for frequent eval (too slow):

  • **MMLU**: ~2 hours (57 subjects)
  • **HumanEval**: Requires code execution

**Step 3: Automate evaluation**

Integrate with training script:

# In training loop
if step % eval_interval == 0:
    model.save_pretrained(f"checkpoints/step-{step}")

    # Run evaluation
    os.system(f"./eval_checkpoint.sh checkpoints step-{step}")

Or use PyTorch Lightning callbacks:

from pytorch_lightning import Callback

class EvalHarnessCallback(Callback):
    def on_validation_epoch_end(self, trainer, pl_module):
        step = trainer.global_step
        checkpoint_path = f"checkpoints/step-{step}"

        # Save checkpoint
        trainer.save_checkpoint(checkpoint_path)

        # Run lm-eval
        os.system(f"lm_eval --model hf --model_args pretrained={checkpoint_path} ...")

**Step 4: Plot learning curves**

import json
import matplotlib.pyplot as plt

# Load all results
steps = []
mmlu_scores = []

for file
Read more
@graniet
Ships withkheish

Orchestration engine for long-running, tool-using AI agents

Stars on GitHub

Momentum

stars in total
208
Star history of graniet/kheish on GitHub, a chart by star-history.com

Other skills on kheish.

findmy

findmy

Track Apple devices and AirTags via FindMy.app on macOS using AppleScript

@graniet@granietInstall Skill
codex

codex

--- description: Delegate coding tasks to OpenAI Codex CLI agent. Use for building features, refactoring, PR reviews, and batch…

@graniet@granietInstall Skill

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw9d395k
@steipete@steipeteInstall Skill
jira-tickets

jira-tickets

Read and update Jira tickets through Orca's saved Jira connections. Use when a task comes from Jira or the user asks for Jira…

orca7d128k
@stablyai@stablyaiInstall Skill
agentmail

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…

paperclip8d114k
@paperclipai@paperclipaiInstall Skill
adr-create

adr-create

Create a new Architecture Decision Record with sequential numbering and AgentDB registration

@ruvnet@ruvnetInstall Skill

Questions about lm-evaluation-harness.

Which coding agents can use lm-evaluation-harness?
lm-evaluation-harness installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.