跳到主要内容Skip to main content
评测与可观测Evaluation & Observability生产可用Production

LM Evaluation Harness

EleutherAI / lm-evaluation-harness

标准 LLM 评测框架,覆盖数百任务、few-shot、loglikelihood 与生成式指标,支持 HF、vLLM 和 API 后端。A standard LLM evaluation harness covering hundreds of tasks, few-shot settings, log-likelihood and generative metrics, with HF, vLLM and API backends.

14.5k stars 3822 forks Python 语言Language MIT 许可License 最近推送Last push 2026-11-04

为什么选Why choose it

  • 论文里的 MMLU、HellaSwag、GSM8K 数字大多能用它复现,统一 prompt 与 metric 减少口径漂移。A shared harness makes scores comparable across models.
  • 支持本地模型和 OpenAI 兼容端点,适合做同一套题跨模型对比。Task definitions and prompts are explicit and versioned.
  • 任务配置可复现,适合把评测纳入模型发布流程。Supports local and API backends.

不适合Not for

需要 agent 多轮交互、工具调用或私有业务打分;harness 更偏静态基准。You need a business-specific evaluation that the public tasks do not cover.
只想知道“哪个模型更强”的消费者,单看总分容易误读。You cannot control prompt templates and scoring settings.

最小上手Minimum setup

  1. pip install lm-eval,确认模型后端依赖。Run one small task on a local model with a fixed few-shot count.
  2. 用一个小模型跑 mmlu 的 100 条子集,检查 few-shot 设置。Record the task version, prompt template and scoring script.
  3. 固定版本与 prompt,横向跑 2–3 个模型并保存原始样本结果。Re-run with a different backend and compare the delta.

依赖与成本Dependencies and cost

Python;模型后端(HF/vLLM/API);部分任务需要数据集下载。Check runtime, model weights and external service dependencies in the README.

许可与使用边界License and usage boundaries

代码 MIT;数据集与模型各自条款。Code is MIT; model weights, training data and generated content may have separate terms — check each before commercial use.

开源不等于可商用:GPL / AGPL 有传染性;代码许可、模型许可、生成内容许可要分开看。上线前读仓库 LICENSE 与模型卡,必要时让法务确认。Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.

替代与相邻Alternatives and neighbors

  • Inspect AI — 特定场景Niche,英国 AI 安全研究院的评测框架,适合做严谨、可复现的任务评测。An evaluation framework from the UK AI Safety Institute for rigorous, reproducible task evaluation.
  • Ragas — 先试这个Start here,RAG 评测库:检索相关性、答案忠实度、上下文召回等指标。A RAG evaluation library covering retrieval relevance, answer faithfulness and context recall.
  • Arize Phoenix — 生产可用Production,开源 LLM 追踪与评测平台,基于 OpenTelemetry,带可视化与数据集管理。Open-source LLM tracing and evaluation on OpenTelemetry, with visual exploration and dataset management.

下一步Next steps

  • 打开 GitHub,先读 README、LICENSE、最近 release 与 issue。Open GitHub and read the README, LICENSE, latest release and issues first.
  • 按“部署依赖 / 显存 / 数据 / 网络 / 权限”列一张上手清单。Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
  • 用一个小样本跑通,再决定是否进生产;不要直接上生产数据。Run a small sample first, then decide on production; never start with production data.

GitHub 仓库 ↗GitHub repository ↗ 文档 ↗Docs ↗ 加入对比Add to compare

快照口径:stars / forks / language / license / pushed_at 来自 GitHub API 2026-11-20 快照;之后的变化没有回写。标签与“适合 / 不适合”是编辑判断,不是 GitHub 元数据。Snapshot: stars / forks / language / license / pushed_at come from the GitHub API snapshot on 2026-11-20; later changes are not written back. Tags and “fit / not fit” are editorial judgments, not GitHub metadata.
不背书:本站只做索引与风险提示,不审计代码、不保证安全、不替你做许可判断。仓库脚本与模型权重请自行审查。No endorsement: this site only indexes and flags risks; it does not audit code, guarantee security or make license decisions for you. Review repository scripts and model weights yourself.