-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
271 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
125 changes: 62 additions & 63 deletions
125
src/zh/posts/eval/M3KE.md → src/zh/posts/dataset/M3KE.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,62 @@ | ||
--- | ||
author: shb | ||
icon: palette | ||
category: | ||
- 评估方法 | ||
date: 2023-07-08 | ||
tag: | ||
- 语言模型 | ||
- 评估 | ||
shortTitle: M3KE数据集分享 | ||
--- | ||
|
||
|
||
# M3KE评估数据集分享 | ||
|
||
M3KE数据集是一种针对大语言模型的多层次、多主题的知识评估数据集,旨在衡量中文大型语言模型在零样本和少样本设置中获取知识的能力。 | ||
|
||
<!-- more --> | ||
|
||
::: tip | ||
|
||
项目地址:https://github.com/tjunlp-lab/M3KE | ||
|
||
项目贡献者/机构:天津大学与华为诺亚方实验室 | ||
|
||
::: | ||
|
||
|
||
## 1 数据集数据 | ||
M3KE 收集了 20,477 个真人标准化考试题目(包含 4 个候选答案),覆盖 71 个任务,包括小学、初中、高中、大学、研究生入学考试题目,涉及人文、历史、政治、法律、教育、心理学、科学、工程技术、艺术等学科。 | ||
|
||
 | ||
|
||
## 2 数据集优势 | ||
(1) 契合中国教育体系,覆盖多教育阶段 | ||
研究人员模仿中国学生的教育经历,即小学、初中、高中、大学等主要教育阶段,旨在评估中文大模型在不同教育阶段下的表现。由于每个教育阶段需要掌握的知识点不同(例如,在语文学科中,小学和初中的知识或考点存在明显的差异),因此,M3KE 在不同教育阶段会包含相同的学科。为了提高数据集中学科知识点的覆盖范围,研究人员选择了中国升学考试中的统考试题,包括小升初、中考、高考,研究生入学考试和中国公务员考试等真题题目。 | ||
(2) 覆盖多学科领域 | ||
为提高数据集的学科覆盖率,研究人员基于人文艺术、社会科学和自然科学三大类进行构建,包括:文学、理学,历史、政治、法学、教育学、心理学、科学、工程技术、艺术等学科。为进一步拓展数据集的丰富度,研究人员补充了中医、宗教以及计算机等级考试等任务。 | ||
|
||
 | ||
|
||
|
||
|
||
 | ||
|
||
## 3 评估结果 | ||
<!-- ### 3.1 Zero-shot/Few-shot 零样本/少样本评估 --> | ||
在零样本设置条件下,模型要求直接回答问题;在少样本设置条件下,会预先给定模型同任务的若干示例,引导模型进行情景学习(In-Context Learning)。在 M3KE 中,所有题目均使用准确率计算得分。 | ||
(1) 不同学科类别下的模型零样本/少样本评估结果 | ||
|
||
 | ||
|
||
(2) 不同教育阶段下的模型零样本/少样本评估结果 | ||
|
||
 | ||
|
||
## 4 评估结果分析 | ||
|
||
(1)在零样本评估中(Table 4&6),所有参数小于 10B 的预训练语言模型(未经过微调)准确率都低于随机结果(25%),少样本的设置(Table 5&7)有助于模型性能的提升。但是,GLM130B 在零样本评估的结果好于少样本评估结果,原因可能是 GLM130B 在预训练阶段已经使用了部分指令数据,使其已经具备较好的零样本学习能力。 | ||
|
||
(2)大部分经过微调后的中文大模型仅达到随机结果(25%)水平,即使在小学阶段的测试中(Table 6&7)。这说明较低教育阶段中的知识仍然是当前中文大模型的短板之一。 | ||
|
||
(3)在零样本评估中,BELLE-7B-2M 取得了中文大模型中最好的成绩,但仍然与 GPT-3.5-turbo 有 14.8% 的差距。此外,有监督微调指令的数量也是一个重要的因素,经过两百万指令微调的 BELLE-7B-2M 好于经过二十万指令微调的 BELLE-7B-0.2M(Table 4)。 | ||
--- | ||
author: shb | ||
icon: palette | ||
category: | ||
- 数据集 | ||
date: 2023-07-08 | ||
tag: | ||
- 语言模型 | ||
shortTitle: M3KE数据集分享 | ||
--- | ||
|
||
|
||
# M3KE评估数据集分享 | ||
|
||
M3KE数据集是一种针对大语言模型的多层次、多主题的知识评估数据集,旨在衡量中文大型语言模型在零样本和少样本设置中获取知识的能力。 | ||
|
||
<!-- more --> | ||
|
||
::: tip | ||
|
||
项目地址:https://github.com/tjunlp-lab/M3KE | ||
|
||
项目贡献者/机构:天津大学与华为诺亚方实验室 | ||
|
||
::: | ||
|
||
|
||
## 1 数据集数据 | ||
M3KE 收集了 20,477 个真人标准化考试题目(包含 4 个候选答案),覆盖 71 个任务,包括小学、初中、高中、大学、研究生入学考试题目,涉及人文、历史、政治、法律、教育、心理学、科学、工程技术、艺术等学科。 | ||
|
||
 | ||
|
||
## 2 数据集优势 | ||
(1) 契合中国教育体系,覆盖多教育阶段 | ||
研究人员模仿中国学生的教育经历,即小学、初中、高中、大学等主要教育阶段,旨在评估中文大模型在不同教育阶段下的表现。由于每个教育阶段需要掌握的知识点不同(例如,在语文学科中,小学和初中的知识或考点存在明显的差异),因此,M3KE 在不同教育阶段会包含相同的学科。为了提高数据集中学科知识点的覆盖范围,研究人员选择了中国升学考试中的统考试题,包括小升初、中考、高考,研究生入学考试和中国公务员考试等真题题目。 | ||
(2) 覆盖多学科领域 | ||
为提高数据集的学科覆盖率,研究人员基于人文艺术、社会科学和自然科学三大类进行构建,包括:文学、理学,历史、政治、法学、教育学、心理学、科学、工程技术、艺术等学科。为进一步拓展数据集的丰富度,研究人员补充了中医、宗教以及计算机等级考试等任务。 | ||
|
||
 | ||
|
||
|
||
|
||
 | ||
|
||
## 3 评估结果 | ||
<!-- ### 3.1 Zero-shot/Few-shot 零样本/少样本评估 --> | ||
在零样本设置条件下,模型要求直接回答问题;在少样本设置条件下,会预先给定模型同任务的若干示例,引导模型进行情景学习(In-Context Learning)。在 M3KE 中,所有题目均使用准确率计算得分。 | ||
(1) 不同学科类别下的模型零样本/少样本评估结果 | ||
|
||
 | ||
|
||
(2) 不同教育阶段下的模型零样本/少样本评估结果 | ||
|
||
 | ||
|
||
## 4 评估结果分析 | ||
|
||
(1)在零样本评估中(Table 4&6),所有参数小于 10B 的预训练语言模型(未经过微调)准确率都低于随机结果(25%),少样本的设置(Table 5&7)有助于模型性能的提升。但是,GLM130B 在零样本评估的结果好于少样本评估结果,原因可能是 GLM130B 在预训练阶段已经使用了部分指令数据,使其已经具备较好的零样本学习能力。 | ||
|
||
(2)大部分经过微调后的中文大模型仅达到随机结果(25%)水平,即使在小学阶段的测试中(Table 6&7)。这说明较低教育阶段中的知识仍然是当前中文大模型的短板之一。 | ||
|
||
(3)在零样本评估中,BELLE-7B-2M 取得了中文大模型中最好的成绩,但仍然与 GPT-3.5-turbo 有 14.8% 的差距。此外,有监督微调指令的数量也是一个重要的因素,经过两百万指令微调的 BELLE-7B-2M 好于经过二十万指令微调的 BELLE-7B-0.2M(Table 4)。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ shortTitle: "CIMI: 因果启发的可解释框架" | |
category: | ||
- 提示技术 | ||
tag: | ||
- 推理 | ||
- LLM | ||
- 可解释 | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: RAG | ||
title: 检索增强生成RAG | ||
icon: puzzle-piece | ||
index: false | ||
article: false | ||
|
176 changes: 88 additions & 88 deletions
176
src/zh/posts/prompt/CoT.md → src/zh/posts/reasoning/CoT.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,88 @@ | ||
--- | ||
author: lx | ||
icon: wand-magic-sparkles | ||
date: 2023-06-05 | ||
shortTitle: "Chain-of-Thought: 思维链" | ||
category: | ||
- 提示技术 | ||
tag: | ||
- 推理 | ||
- LLM | ||
- CoT | ||
--- | ||
|
||
# Chain-of-Thought: 思维链 | ||
|
||
该文介绍了 `Chain-of-Thought: 思维链` 框架,结合 `in-context`, `few-shot prompting` 以及多步中间推理,通过大模型来改善数学计算、常识推理的效果。 | ||
|
||
<!-- more --> | ||
|
||
::: tip | ||
论文题目:Chain-of-Thought Prompting Elicits Reasoning in Large Language Models | ||
作者:Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed H. Chi, Quoc V. Le, Denny Zhou | ||
机构:Google | ||
::: | ||
|
||
<PDF url="https://arxiv.org/pdf/2201.11903.pdf" /> | ||
|
||
<BiliBili bvid="BV1t8411e7Ug" /> | ||
|
||
--- | ||
|
||
## 1 背景介绍 | ||
|
||
> 语言模型的本质是对任意一段文本序列的概率进行建模 | ||
用一个训练好的大语言模型求解推理任务的几种范式: | ||
|
||
### 1.1 Zero-Shot | ||
|
||
 | ||
|
||
这里语言模型的输入就是一道数学题,连接上一个字符串 `The answer is`,然后让语言模型帮助续写。续写的答案就是80。 | ||
|
||
### 1.2 Zero-Shot-CoT | ||
|
||
 | ||
|
||
`Zero-Shot-CoT` 在 `Zero-Shot` 的基础上增加了一句 `Let's think step by step.`,大语言模型会自动续写推理过程并得出最后的答案。 | ||
|
||
### 1.3 Manual-CoT | ||
|
||
 | ||
|
||
在输入问题之前,**手动设计**一些问题和答案的样例。`Manual-CoT` 比 `Zero-Shot-CoT` 的性能要好,因为在输入端提供了问题,推理,答案的样例供参考。然而为了提供这些样例就需要人工设计,这就增加了人工的成本。 | ||
|
||
### 1.4 Auto-CoT | ||
|
||
 | ||
|
||
如何将人工设计样例的过程自动化?步骤如下: | ||
(1)通过多样性选择有代表性的问题 | ||
(2)对于每一个采样的问题,接上 `Let's think step by step.`,直接丢给语言模型,让它帮我们生成中间推理步骤和答案。然后把所有采样的问题和模型自动生成的推理步骤和答案全部拼接在一起来构成 `Few-Shot-Learning` 所需要的样例,最后跟上下面需要求解的问题,一起丢给语言模型,让其帮我们续写。 | ||
|
||
|
||
## 2 思路 | ||
|
||
结合 `in-context`, `few-shot prompting` 以及多步中间推理,通过大模型来改善数学计算、常识推理的效果 | ||
|
||
 | ||
|
||
`CoT` 思维链的灵感来源于人做推理的过程,作者借鉴了这个过程,通过设计类似于思维链来激发大模型,使之拥有推理能力,并且能由于这个有逻辑性的思维链的存在,多步的中间推到可以得到最终的正确答案。 | ||
|
||
 | ||
|
||
## 3 实验结果 | ||
|
||
 | ||
|
||
100B(1000亿参数)参数量以下的模型效果不好,侧面反映了他们的instruct fine-tune不够,COT很难激发他的in-context 推理能力。而在100B以上模型效果很好,甚至超过了之前基于监督训练的SOTA模型。 | ||
|
||
|
||
## 4 参考 | ||
|
||
<!-- | ||
[1] [Chain-of-Thought Prompting Elicits Reasoning in Large Language Models](https://zhuanlan.zhihu.com/p/610241799) | ||
[2] [GOOGLE | COT(chain of thought)开山之作,利用思维链提升复杂问题推理能力一、概述](https://mp.weixin.qq.com/s?__biz=Mzg3Njk2NTc4Mw==&mid=2247483895&idx=1&sn=33ab2fe70af404d528f0771ae5416c87&chksm=cf2b7b0ff85cf21928bba2205f9a3b61b44486bda55947f9f6f2891a4bf6d1b3787cfbf523e5&scene=21#wechat_redirect) | ||
[3] [CoT开山之作:Chain-of-Thought Prompting Elicits Reasoning in Large Language Models 论文解读](https://zhuanlan.zhihu.com/p/617594574) | ||
--> | ||
--- | ||
author: lx | ||
icon: wand-magic-sparkles | ||
date: 2023-06-05 | ||
shortTitle: "Chain-of-Thought: 思维链" | ||
category: | ||
- 大模型推理 | ||
tag: | ||
- 推理 | ||
- LLM | ||
- CoT | ||
--- | ||
|
||
# Chain-of-Thought: 思维链 | ||
|
||
该文介绍了 `Chain-of-Thought: 思维链` 框架,结合 `in-context`, `few-shot prompting` 以及多步中间推理,通过大模型来改善数学计算、常识推理的效果。 | ||
|
||
<!-- more --> | ||
|
||
::: tip | ||
论文题目:Chain-of-Thought Prompting Elicits Reasoning in Large Language Models | ||
作者:Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed H. Chi, Quoc V. Le, Denny Zhou | ||
机构:Google | ||
::: | ||
|
||
<PDF url="https://arxiv.org/pdf/2201.11903.pdf" /> | ||
|
||
<BiliBili bvid="BV1t8411e7Ug" /> | ||
|
||
--- | ||
|
||
## 1 背景介绍 | ||
|
||
> 语言模型的本质是对任意一段文本序列的概率进行建模 | ||
用一个训练好的大语言模型求解推理任务的几种范式: | ||
|
||
### 1.1 Zero-Shot | ||
|
||
 | ||
|
||
这里语言模型的输入就是一道数学题,连接上一个字符串 `The answer is`,然后让语言模型帮助续写。续写的答案就是80。 | ||
|
||
### 1.2 Zero-Shot-CoT | ||
|
||
 | ||
|
||
`Zero-Shot-CoT` 在 `Zero-Shot` 的基础上增加了一句 `Let's think step by step.`,大语言模型会自动续写推理过程并得出最后的答案。 | ||
|
||
### 1.3 Manual-CoT | ||
|
||
 | ||
|
||
在输入问题之前,**手动设计**一些问题和答案的样例。`Manual-CoT` 比 `Zero-Shot-CoT` 的性能要好,因为在输入端提供了问题,推理,答案的样例供参考。然而为了提供这些样例就需要人工设计,这就增加了人工的成本。 | ||
|
||
### 1.4 Auto-CoT | ||
|
||
 | ||
|
||
如何将人工设计样例的过程自动化?步骤如下: | ||
(1)通过多样性选择有代表性的问题 | ||
(2)对于每一个采样的问题,接上 `Let's think step by step.`,直接丢给语言模型,让它帮我们生成中间推理步骤和答案。然后把所有采样的问题和模型自动生成的推理步骤和答案全部拼接在一起来构成 `Few-Shot-Learning` 所需要的样例,最后跟上下面需要求解的问题,一起丢给语言模型,让其帮我们续写。 | ||
|
||
|
||
## 2 思路 | ||
|
||
结合 `in-context`, `few-shot prompting` 以及多步中间推理,通过大模型来改善数学计算、常识推理的效果 | ||
|
||
 | ||
|
||
`CoT` 思维链的灵感来源于人做推理的过程,作者借鉴了这个过程,通过设计类似于思维链来激发大模型,使之拥有推理能力,并且能由于这个有逻辑性的思维链的存在,多步的中间推到可以得到最终的正确答案。 | ||
|
||
 | ||
|
||
## 3 实验结果 | ||
|
||
 | ||
|
||
100B(1000亿参数)参数量以下的模型效果不好,侧面反映了他们的instruct fine-tune不够,COT很难激发他的in-context 推理能力。而在100B以上模型效果很好,甚至超过了之前基于监督训练的SOTA模型。 | ||
|
||
|
||
## 4 参考 | ||
|
||
<!-- | ||
[1] [Chain-of-Thought Prompting Elicits Reasoning in Large Language Models](https://zhuanlan.zhihu.com/p/610241799) | ||
[2] [GOOGLE | COT(chain of thought)开山之作,利用思维链提升复杂问题推理能力一、概述](https://mp.weixin.qq.com/s?__biz=Mzg3Njk2NTc4Mw==&mid=2247483895&idx=1&sn=33ab2fe70af404d528f0771ae5416c87&chksm=cf2b7b0ff85cf21928bba2205f9a3b61b44486bda55947f9f6f2891a4bf6d1b3787cfbf523e5&scene=21#wechat_redirect) | ||
[3] [CoT开山之作:Chain-of-Thought Prompting Elicits Reasoning in Large Language Models 论文解读](https://zhuanlan.zhihu.com/p/617594574) | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ category: | |
- 大模型推理 | ||
tag: | ||
- GPT-4 | ||
- Reasoning | ||
- 推理 | ||
- OpenAI | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ article: false | |
category: | ||
- 大模型推理 | ||
tag: | ||
- Reasoning | ||
- 推理 | ||
dir: | ||
order: 7 | ||
--- |
Oops, something went wrong.