evaluation-lm-evaluation-harness — Claude Code skill: setup and use
This skill guides Claude Code through language-model benchmarking with lm-evaluation-harness, from running standard tests to comparing model scores and monitoring training checkpoints.
npx claude-code-templates@latest --skill ai-research/evaluation-lm-evaluation-harnessWhat evaluation-lm-evaluation-harness does
The skill covers evaluation workflows built around lm-evaluation-harness. Its examples use benchmarks such as MMLU, GSM8K, HellaSwag, TruthfulQA, and HumanEval to measure different aspects of model performance. Scores and configuration details can be written to JSON files for later inspection.
The documented workflows include loading HuggingFace models, evaluating several tasks in one run, and testing custom checkpoints. A shell script named eval_checkpoint.sh illustrates recurring checks during training, while a PyTorch Lightning callback shows one way to connect evaluation to a training loop. Other examples collect scores from several models into a comparison table and chart progress across checkpoints.
The command examples require the lm-eval package, installed with pip install lm-eval. Hardware settings such as --device cuda:0 need to match the environment running the tests. HumanEval involves code execution, and the guide cautions against using MMLU for frequent checkpoint checks because its full evaluation takes considerably longer than the suggested quick tests.
What it helps with
- Run MMLU and GSM8K evaluations on a language model
- Compare several models using the same benchmark tasks
- Export benchmark metrics and model settings to JSON
- Monitor score changes across training checkpoints
- Plot evaluation scores over training steps
Example prompts for the agent
- Set up
lm-evalfor my HuggingFace model and runmmlu,gsm8k,hellaswag. - Compare the models listed in
models.txtonmmlu,gsm8k,hellaswag,truthfulqaand save separate JSON results. - Create a checkpoint evaluation workflow with
eval_checkpoint.shand chart the scores from the saved results.
How to install evaluation-lm-evaluation-harness
1claude-code-templates
npx claude-code-templates@latest --skill ai-research/evaluation-lm-evaluation-harness2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill evaluation-lm-evaluation-harness -a claude-code3Manually: put the files in place
~/.claude/skills/evaluation-lm-evaluation-harness/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/evaluation-lm-evaluation-harness/
Manually: put the files in place
.agents/skills/evaluation-lm-evaluation-harness/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/evaluation-lm-evaluation-harness/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates evaluation-lm-evaluation-harness2Manually: put the files in place
.github/skills/evaluation-lm-evaluation-harness/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/evaluation-lm-evaluation-harnessManually: put the files in place
.devin/skills/evaluation-lm-evaluation-harness/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about evaluation-lm-evaluation-harness
How do I install evaluation-lm-evaluation-harness in Claude Code?
Install the skill with npx claude-code-templates@latest --skill ai-research/evaluation-lm-evaluation-harness. Another supported command is npx skills add davila7/claude-code-templates --skill evaluation-lm-evaluation-harness -a claude-code.
What does evaluation-lm-evaluation-harness do?
It provides workflows for running language-model benchmarks with lm-evaluation-harness, recording scores, and comparing models. The examples also cover repeated checkpoint evaluation during training.
Which dependencies and hardware settings are needed?
The examples install lm-eval with pip install lm-eval and use HuggingFace models. The cuda:0 device setting requires a suitable CUDA environment, while HumanEval involves executing code.