HiHuo
首页
博客
手册
工具
关于
首页
博客
手册
工具
关于

常见 Benchmark:MMLU、HumanEval、GSM8K

做大模型评测,绑不开几个常见的 Benchmark。

这篇介绍最常用的评测集,包括它们测什么、怎么测、怎么解读。


综合能力

MMLU

全称:Massive Multitask Language Understanding

测什么:综合知识和理解能力,覆盖 57 个学科。

规模:约 14,000 道选择题

学科分类:

  • STEM:物理、化学、生物、数学、计算机...
  • 人文:历史、哲学、法律...
  • 社科:经济、心理、政治...
  • 其他:医学、会计、市场营销...

样例:

Question: The longest living cells in the human body are
(A) nerve cells
(B) muscle cells
(C) liver cells
(D) red blood cells

Answer: A

评测方式:选择题,4 选 1,计算准确率

基准分数(参考):

模型MMLU
GPT-486.4%
Claude 3 Opus86.8%
LLaMA-2-70B68.9%
LLaMA-2-7B45.3%

注意:57 个学科可以分开看,有些模型某些学科特别强/弱。

C-Eval

测什么:中文综合能力,类似中文版 MMLU

规模:13,948 道选择题,52 个学科

特点:

  • 涵盖初中到专业研究生难度
  • 中国特色知识(中国历史、中国法律等)

分数参考:

模型C-Eval
GPT-468.7%
Claude 365.3%
Qwen-72B83.3%

中文模型在 C-Eval 上通常比英文模型表现好。

CMMLU

测什么:中文综合能力,比 C-Eval 更全面

规模:11,528 道题,67 个学科

特点:学科划分更细,有中国特色内容


数学推理

GSM8K

全称:Grade School Math 8K

测什么:小学数学应用题

规模:8,500 道题

样例:

Question: Janet's ducks lay 16 eggs per day. She eats three for
breakfast every morning and bakes muffins for her friends every
day with four. She sells the remainder at the farmers' market
daily for $2 per fresh duck egg. How much in dollars does she
make every day at the farmers' market?

Answer: 18
(16 - 3 - 4 = 9 eggs, 9 * 2 = 18 dollars)

评测方式:最终答案正确即可,需要从生成文本中提取数字

分数参考:

模型GSM8K
GPT-492.0%
Claude 3 Opus95.0%
LLaMA-2-70B56.8%

注意:

  • 需要 Chain-of-Thought 才能做好
  • 提取答案的方式会影响分数

MATH

测什么:高中/竞赛级数学

规模:12,500 道题

难度分级:1-5 级

学科:代数、几何、数论、概率、预备微积分...

特点:比 GSM8K 难很多,需要真正的数学推理能力

分数参考:

模型MATH
GPT-442.5%
Claude 3 Opus60.1%
LLaMA-2-70B13.5%

MATH 分数提升空间大,是区分模型数学能力的好指标。


代码生成

HumanEval

测什么:Python 代码生成能力

规模:164 道编程题

样例:

def has_close_elements(numbers: List[float], threshold: float) -> bool:
    """Check if in given list of numbers, are any two numbers
    closer to each other than given threshold.

    >>> has_close_elements([1.0, 2.0, 3.0], 0.5)
    False
    >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)
    True
    """

评测方式:生成代码,跑测试用例,Pass@k

分数参考(Pass@1):

模型HumanEval
GPT-467.0%
Claude 3 Opus84.9%
CodeLLaMA-34B48.8%

注意:

  • Pass@1 和 Pass@10 差别很大
  • 采样参数(temperature)影响结果

MBPP

全称:Mostly Basic Programming Problems

规模:974 道题

特点:比 HumanEval 简单,题量大

MultiPL-E

测什么:多语言代码生成

支持语言:Python、Java、JavaScript、C++、Rust、Go...

特点:把 HumanEval 翻译成多种编程语言


推理能力

ARC

全称:AI2 Reasoning Challenge

测什么:科学常识推理

分类:

  • ARC-Easy:简单
  • ARC-Challenge:有难度

规模:7,787 道选择题

样例:

Question: Which property of a mineral can be determined just
by looking at it?
(A) luster
(B) mass
(C) weight
(D) hardness

Answer: A

HellaSwag

测什么:常识推理,选择最合理的续写

规模:70,000 道题

样例:

A woman is outside with a bucket and a dog. The dog is running
around trying to avoid a bath. She...

(A) rinses the bucket off with soap and dries it with a towel.
(B) uses a hose to wash the dog.
(C) gets the dog wet, then makes it dry.
(D) gets into the bath herself.

Answer: B

特点:人类准确率 95%+,模型早期很差,现在基本都 90%+

WinoGrande

测什么:代词消解,常识推理

规模:44,000 道题

样例:

The trophy doesn't fit in the suitcase because it is too [big/small].
What is too big/small?

(A) trophy
(B) suitcase

阅读理解

SQuAD

全称:Stanford Question Answering Dataset

测什么:阅读理解,根据文章回答问题

版本:

  • SQuAD 1.1:答案在文章中
  • SQuAD 2.0:有些问题没有答案

RACE

测什么:阅读理解,来自中国中高考英语阅读

分类:

  • RACE-M:中学
  • RACE-H:高中

DROP

全称:Discrete Reasoning Over Paragraphs

测什么:需要数学推理的阅读理解


长上下文

LongBench

测什么:长上下文理解能力

任务:

  • 长文档问答
  • 长文本摘要
  • 代码补全
  • few-shot 学习

长度:涵盖 4K - 128K token

RULER

测什么:长上下文「大海捞针」

任务:在长文本中找到特定信息

特点:专门测长上下文能力是否真实有效


对话/指令遵循

MT-Bench

测什么:多轮对话能力

规模:80 道多轮对话题

评测方式:GPT-4 打分(1-10)

特点:测试模型能否进行高质量多轮对话

AlpacaEval

测什么:指令遵循能力

规模:805 条指令

评测方式:GPT-4 对比打分(和参考模型比)

IFEval

测什么:指令遵循能力

特点:有客观标准(如「回答必须少于 100 字」)


中文特定

Benchmark测什么规模
C-Eval综合知识14K
CMMLU综合知识11.5K
GAOKAO高考题2.8K
AGIEval综合能力8.1K
BELLE中文指令-

怎么选 Benchmark

评测综合能力

英文:MMLU + HellaSwag + WinoGrande + ARC
中文:C-Eval + CMMLU

评测特定能力

能力Benchmark
数学GSM8K + MATH
代码HumanEval + MBPP
长上下文LongBench + RULER
对话MT-Bench
指令遵循IFEval

完整评测(推荐)

综合:MMLU, C-Eval
推理:ARC, HellaSwag
数学:GSM8K, MATH
代码:HumanEval
对话:MT-Bench

小结

常见 Benchmark 速查:

Benchmark类型规模评测方式
MMLU综合知识14K选择题
C-Eval中文综合14K选择题
GSM8K小学数学8.5K答案匹配
MATH高等数学12.5K答案匹配
HumanEval代码生成164测试用例
ARC常识推理7.8K选择题
HellaSwag常识推理70K选择题
MT-Bench多轮对话80GPT-4 打分

选择建议:

  • 看综合能力:MMLU + C-Eval
  • 看特定能力:选对应 Benchmark
  • 多个 Benchmark 综合看,不要只看一个

下一篇讲 Leaderboard 和评测平台。