Hub documentation

评估结果

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

评估结果

这是一个正在开发中的功能。

Hub 提供了一个去中心化的系统,用于跟踪模型评估结果。基准数据集托管排行榜,而模型仓库则存储评估分数,这些分数会自动显示在模型页面和该基准的排行榜上。

基准数据集

数据集仓库可以定义为基准测试(例如 MMLU-Pro、HLE、GPQA)。这些仓库会显示“Benchmark”标签,并自动汇总 Hub 上各模型仓库的评估结果,展示顶级模型的排行榜。

Benchmark Dataset

模型评估结果

评估分数以 YAML 文件的形式存储在模型仓库的 .eval_results/ 文件夹中。这些结果:

  • 在模型页面上显示,并附带指向基准排行榜的链接
  • 汇总到基准数据集的排行榜中
  • 可以通过 PR 提交,并标记为“社区提供”

Model Evaluation Results

添加评估结果

要将评估结果添加到模型中,您可以向模型仓库提交一个 PR,其中包含位于 .eval_results/ 文件夹中的 YAML 文件。

在您的模型仓库中的 .eval_results/*.yaml 创建一个 YAML 文件:

- dataset:
    id: cais/hle                  # Required. Hub dataset ID (must be a Benchmark)
    task_id: default              # Required. ID of the Task, as defined in the dataset's eval.yaml
    revision: <hash>              # Optional. Dataset revision hash
  value: 20.90                    # Required. Metric value
  verifyToken: <token>            # Optional. Cryptographic proof of auditable evaluation
  date: "2025-01-15"              # Optional. ISO-8601 date or datetime of when the eval was run (defaults to git commit time)
  source:                         # Optional. Attribution for this result, for instance a repo containing output traces or a Paper
    url: https://huggingface.co/spaces/SaylorTwift/smollm3-mmlu-pro  # Required if source provided
    name: Eval traces             # Optional. Display name
    user: SaylorTwift             # Optional. HF username/org
  notes: "no-tools"               # Optional. Details about the evaluation setup (e.g., "tools", "no-tools", etc.)

或者,仅使用必需属性:

- dataset:
    id: Idavidrein/gpqa
    task_id: gpqa_diamond
  value: 0.412

结果会根据 YAML 文件中的元数据显示徽章:

徽章条件
已验证verifyToken 有效(评估在 HF Jobs 中通过 inspect-ai 运行)
社区结果已通过开放 PR 提交(未合并到 main)
leaderboard基准数据集的链接
source指向评估日志或外部来源的链接

有关如何格式化此数据的更多详细信息,请参阅 Eval Results 规范。

社区贡献

任何人都可以通过 Pull Request 向任何模型提交评估结果:

  1. 前往模型页面,点击“Community”选项卡,然后发起一个 Pull Request。
  2. 添加一个包含您结果的 .eval_results/*.yaml 文件。
  3. 在 PR 处于打开状态时,模型页面上会显示为“社区提供”。

如需帮助评估模型,请参阅使用 Inspect 评估模型指南。来自 Inspect 的评估日志可以直接写入HF Storage Buckets。

社区评分在 PR 处于打开状态时可见。如果某项评分存在争议,模型作者可以关闭该 PR 以将其移除。我们的目标是在迈向通过已验证评分实现完全可复现标准的过程中,透明地展示现有的评估数据。

从排行榜中隐藏模型

基准测试维护者可以将模型从其排行榜中隐藏,例如当他们对其报告的结果提出异议时:

  • 在基准数据集页面上,维护者可以使用每个排行榜行上的切换按钮来隐藏或取消隐藏某个模型。被隐藏的模型会列在一个菜单中,以便稍后恢复。
  • 隐藏功能适用于基准测试中该模型的所有任务。
  • 隐藏模型将从公共排行榜中移除,其余模型将重新排名。
  • 在模型页面上,该基准测试的结果不再公开显示。

注册基准

要将您的数据集注册为基准测试:

  1. 创建一个包含评估数据的 dataset 仓库
  2. 在仓库根目录中添加一个 eval.yaml 文件,其中包含您的基准测试配置,并符合下文定义的规范。
  3. 该文件在推送时经过验证
  4. (Beta) 请联系我们,以便将其添加到允许列表中。

这些基准测试中提供了示例:GPQA、MMLU-Pro、HLE、GSM8K。

Eval.yaml 规范

eval.yaml 应包含以下字段:

  • name — 基准测试的人类可读显示名称(例如 "Humanity's Last Exam")。
  • description — 简短描述该基准测试所衡量的内容。
  • evaluation_framework — 此基准测试的规范评估框架标识符。这是一个由 Hugging Face 团队维护的枚举值。您可以在此处here添加您自己的框架。每个基准测试仅支持一个框架。
  • tasks[] — 此基准定义的任务(子排行榜)列表(详见下文)。

每个 tasks[] 项中的必填字段:

  • id — 任务的唯一标识符。(例如 "gpqa_diamond")。单个基准可以定义多个任务,每个任务都会生成自己的排行榜。请为每个任务选择一个排行榜标识符。

每个 tasks[] 项中的可选字段:

  • config — 要评估的 Hugging Face 数据集的配置(例如 "default")。默认为数据集的默认配置。
  • split — 要评估的 Hugging Face 数据集的拆分(例如 "test")。默认为 "test"。

设置 evaluation_framework: inspect-ai 时,还需要设置以下字段:

  • field_spec — 输入和输出字段的规范。由 input、target、choices 以及可选的 input_image 子字段组成。有关更多详细信息,请参阅 文档。
  • solvers — 用于借助 AI 模型从输入生成输出的求解器。其形式可简单到一条系统提示词,也可复杂到自我批判循环。更多详情请参阅文档。
  • scores — 所使用的评分器。评分器用于判断求解器是否成功找到了数据集中定义的目标的正确输出,以及成功程度如何。有关更多详细信息,请参阅文档。

最小示例(仅包含必需字段):

name: MathArena AIME 2026
description: The American Invitational Mathematics Exam (AIME).
evaluation_framework: math-arena

tasks:
  - id: MathArena/aime_2026

扩展示例:

name: MathArena AIME 2026
description: The American Invitational Mathematics Exam (AIME).
evaluation_framework: "math-arena"

tasks:
  - id: MathArena/aime_2026
    config: default
    split: test

扩展示例("inspect-ai" 专属):

name: Humanity's Last Exam
description: >
  Humanity's Last Exam (HLE) is a multi-modal benchmark at the frontier of human
  knowledge, designed to be the final closed-ended academic benchmark of its
  kind with broad subject coverage. Humanity's Last Exam consists of 2,500
  questions across dozens of subjects, including mathematics, humanities, and
  the natural sciences. HLE is developed globally by subject-matter experts and
  consists of multiple-choice and short-answer questions suitable for automated
  grading.
evaluation_framework: "inspect-ai"

tasks:
  - id: hle
    config: default
    split: test

    field_spec:
      input: question
      input_image: image
      target: answer

    solvers:
      - name: system_message
        args:
          template: |
            Your response should be in the following format:
            Explanation: {your explanation for your answer choice}
            Answer: {your chosen answer}
            Confidence: {your confidence score between 0% and 100% for your answer}
      - name: generate

    scorers:
      - name: model_graded_fact
        args:
          model: openai/o3-mini
Update on GitHub