QingyiSi/Alpaca-CoT
收藏Hugging Face2023-09-14 更新2024-03-04 收录
下载链接:
https://hf-mirror.com/datasets/QingyiSi/Alpaca-CoT
下载链接
链接失效反馈官方服务:
资源简介:
---
language:
- en
- zh
- ml
tags:
- Instruction
- Cot
license: apache-2.0
datasets:
- dataset1
- dataset2
---
# Instruction-Finetuning Dataset Collection (Alpaca-CoT)
This repository will continuously collect various instruction tuning datasets. And we standardize different datasets into the same format, which can be directly loaded by the [code](https://github.com/PhoebusSi/alpaca-CoT) of Alpaca model.
We also have conducted empirical study on various instruction-tuning datasets based on the Alpaca model, as shown in [https://github.com/PhoebusSi/alpaca-CoT](https://github.com/PhoebusSi/alpaca-CoT).
If you think this dataset collection is helpful to you, please `like` this dataset and `star` our [github project](https://github.com/PhoebusSi/alpaca-CoT)!
You are in a warm welcome to provide us with any non-collected instruction-tuning datasets (or their sources). We will uniformly format them, train Alpaca model with these datasets and open source the model checkpoints.
# Contribute
Welcome to join us and become a contributor to this project!
If you want to share some datasets, adjust the data in the following format:
```
example.json
[
{"instruction": instruction string,
"input": input string, # (may be empty)
"output": output string}
]
```
Folder should be like this:
```
Alpaca-CoT
|
|----example
| |
| |----example.json
| |
| ----example_context.json
...
```
Create a new pull request in [Community
](https://huggingface.co/datasets/QingyiSi/Alpaca-CoT/discussions) and publish your branch when you are ready. We will merge it as soon as we can.
# Data Usage and Resources
## Data Format
All data in this folder is formatted into the same templates, where each sample is as follows:
```
[
{"instruction": instruction string,
"input": input string, # (may be empty)
"output": output string}
]
```
## alpaca
#### alpaca_data.json
> This dataset is published by [Stanford Alpaca](https://github.com/tatsu-lab/stanford_alpaca). It contains 52K English instruction-following samples obtained by [Self-Instruction](https://github.com/yizhongw/self-instruct) techniques.
#### alpaca_data_cleaned.json
> This dataset is obtained [here](https://github.com/tloen/alpaca-lora). It is a revised version of `alpaca_data.json` by stripping of various tokenization artifacts.
## alpacaGPT4
#### alpaca_gpt4_data.json
> This dataset is published by [Instruction-Tuning-with-GPT-4](https://github.com/Instruction-Tuning-with-GPT-4/GPT-4-LLM).
It contains 52K English instruction-following samples generated by GPT-4 using Alpaca prompts for fine-tuning LLMs.
#### alpaca_gpt4_data_zh.json
> This dataset is generated by GPT-4 using Chinese prompts translated from Alpaca by ChatGPT.
<!-- ## belle_cn
#### belle_data_cn.json
This dataset is published by [BELLE](https://github.com/LianjiaTech/BELLE). It contains 0.5M Chinese instruction-following samples, which is also generated by [Self-Instruction](https://github.com/yizhongw/self-instruct) techniques.
#### belle_data1M_cn.json
This dataset is published by [BELLE](https://github.com/LianjiaTech/BELLE). It contains 1M Chinese instruction-following samples. The data of `belle_data_cn.json` and `belle_data1M_cn.json` are not duplicated. -->
## Chain-of-Thought
#### CoT_data.json
> This dataset is obtained by formatting the combination of 9 CoT datasets published by [FLAN](https://github.com/google-research/FLAN). It contains 9 CoT tasks involving 74771 samples.
#### CoT_CN_data.json
> This dataset is obtained by tranlating `CoT_data.json` into Chinese, using Google Translate(en2cn).
#### formatted_cot_data folder
> This folder contains the formatted English data for each CoT dataset.
#### formatted_cot_data folder
> This folder contains the formatted Chinese data for each CoT dataset.
## CodeAlpaca
#### code_alpaca.json
> This dataset is published by [codealpaca](https://github.com/sahil280114/codealpaca). It contains code generation task involving 20022 samples.
## finance
#### finance_en.json
> This dataset is collected from [here](https://huggingface.co/datasets/gbharti/finance-alpaca). It contains 68912 financial related instructions in English.
## firefly
#### firefly.json
> his dataset is collected from [here](https://github.com/yangjianxin1/Firefly). It contains 1649398 chinese instructions in 23 nlp tasks.
## GPT4all
#### gpt4all.json
> This dataset is collected from [here](https://github.com/nomic-ai/gpt4all). It contains 806199 en instructions in code, storys and dialogs tasks.
#### gpt4all_without_p3.json
> gpt4all without Bigscience/P3, contains 437605 samples.
## GPTeacher
#### GPTeacher.json
> This dataset is collected from [here](https://github.com/teknium1/GPTeacher). It contains 29013 en instructions generated by GPT-4, General-Instruct - Roleplay-Instruct - Code-Instruct - and Toolformer.
## Guanaco
#### GuanacoDataset.json
> This dataset is collected from [here](https://huggingface.co/datasets/JosephusCheung/GuanacoDataset). It contains 534610 en instructions generated by text-davinci-003 upon 175 tasks from the Alpaca model by providing rewrites of seed tasks in different languages and adding new tasks specifically designed for English grammar analysis, natural language understanding, cross-lingual self-awareness, and explicit content recognition.
#### Guanaco_additional_Dataset.json
> A new additional larger dataset for different languages.
## HC3
#### HC3_ChatGPT.json/HC3_Human.json
> This dataset is collected from [here](https://huggingface.co/datasets/Hello-SimpleAI/HC3). It contains 37175 en/zh instructions generated by ChatGPT and human.
#### HC3_ChatGPT_deduplication.json/HC3_Human_deduplication.json
> HC3 dataset without deduplication instructions.
## instinwild
#### instinwild_en.json & instinwild_cn.json
> The two datasets are obtained [here](https://github.com/XueFuzhao/InstructionWild). It contains 52191 English and 51504 Chinese instructions, which are collected from Twitter, where users tend to share their interesting prompts of mostly generation, open QA, and mind-storm types. (Colossal AI used these datasets to train the ColossalChat model.)
## instruct
#### instruct.json
> The two datasets are obtained [here](https://huggingface.co/datasets/swype/instruct). It contains 888969 English instructions, which are caugmentation performed using the advanced NLP tools provided by AllenAI.
## Natural Instructions
#### natural-instructions-1700tasks.zip
> This dataset is obtained [here](https://github.com/allenai/natural-instructions). It contains 5040134 instructions, which are collected from diverse nlp tasks
## prosocial dialog
#### natural-instructions-1700tasks.zip
> This dataset is obtained [here](https://huggingface.co/datasets/allenai/prosocial-dialog). It contains 165681 English instructions, which are produuced by GPT-3 rewrites questions and humans feedback
## xP3
#### natural-instructions-1700tasks.zip
> This dataset is obtained [here](https://huggingface.co/datasets/bigscience/xP3). It contains 78883588 instructions, which are collected by prompts & datasets across 46 of languages & 16 NLP tasks
## Chinese-instruction-collection
> all datasets of Chinese instruction collection
## combination
#### alcapa_plus_belle_data.json
> This dataset is the combination of English `alpaca_data.json` and Chinese `belle_data_cn.json`.
#### alcapa_plus_cot_data.json
> This dataset is the combination of English `alpaca_data.json` and CoT `CoT_data.json`.
#### alcapa_plus_belle_cot_data.json
> This dataset is the combination of English `alpaca_data.json`, Chinese `belle_data_cn.json` and CoT `CoT_data.json`.
## Citation
Please cite the repo if you use the data collection, code, and experimental findings in this repo.
```
@misc{alpaca-cot,
author = {Qingyi Si, Zheng Lin },
school = {Institute of Information Engineering, Chinese Academy of Sciences, Beijing, China},
title = {Alpaca-CoT: An Instruction Fine-Tuning Platform with Instruction Data Collection and Unified Large Language Models Interface},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/PhoebusSi/alpaca-CoT}},
}
```
Cite the original Stanford Alpaca, BELLE and FLAN papers as well, please.
语言:
- 英语(en)
- 中文(zh)
- 马来语(ml)
标签:
- 指令(Instruction)
- 思维链(Chain-of-Thought, CoT)
许可证:Apache-2.0
关联数据集:
- dataset1
- dataset2
# 指令微调数据集合集(Alpaca-CoT)
本仓库将持续收录各类指令微调(Instruction Fine-Tuning)数据集,并将所有异构数据集统一标准化为相同格式,可直接通过Alpaca模型的[配套代码](https://github.com/PhoebusSi/alpaca-CoT)加载使用。
我们还基于Alpaca模型对各类指令微调数据集开展了实证研究,相关成果详见[https://github.com/PhoebusSi/alpaca-CoT](https://github.com/PhoebusSi/alpaca-CoT)。
若您认为本数据集合集对您有所帮助,请为本数据集点`赞`,并为我们的[GitHub项目](https://github.com/PhoebusSi/alpaca-CoT)点亮`星标`!
我们诚挚欢迎您向我们贡献尚未收录的指令微调数据集(或其获取来源)。我们将统一对其进行格式标准化,并基于这些数据集训练Alpaca模型,最终开源模型权重。
# 贡献指南
欢迎加入我们,成为本项目的贡献者!
若您希望分享数据集,请将数据调整为如下格式:
example.json
[
{"instruction": instruction string,
"input": input string, # (may be empty)
"output": output string}
]
文件夹结构应如下所示:
Alpaca-CoT
|
|----example
| |
| |----example.json
| |
| ----example_context.json
...
请在[社区板块](https://huggingface.co/datasets/QingyiSi/Alpaca-CoT/discussions)中新建拉取请求(Pull Request),准备就绪后发布您的分支,我们将尽快合并您的贡献。
# 数据使用与资源
## 数据格式
本文件夹内的所有数据均采用统一模板格式,单条样本示例如下:
[
{"instruction": instruction string,
"input": input string, # (may be empty)
"output": output string}
]
## Alpaca 数据集
#### alpaca_data.json
> 本数据集由[Stanford Alpaca](https://github.com/tatsu-lab/stanford_alpaca)发布,包含通过[Self-Instruction](https://github.com/yizhongw/self-instruct)技术生成的52K条英语指令遵循样本。
#### alpaca_data_cleaned.json
> 本数据集取自[此处](https://github.com/tloen/alpaca-lora),是对`alpaca_data.json`的修订版本,已去除各类分词伪影。
## Alpaca-GPT4 数据集
#### alpaca_gpt4_data.json
> 本数据集由[Instruction-Tuning-with-GPT-4](https://github.com/Instruction-Tuning-with-GPT-4/GPT-4-LLM)发布,包含GPT-4基于Alpaca提示词生成的52K条英语指令遵循样本,用于大语言模型(Large Language Model, LLM)微调。
#### alpaca_gpt4_data_zh.json
> 本数据集由GPT-4基于ChatGPT翻译自Alpaca的中文提示词生成。
<!-- ## BELLE 中文数据集
#### belle_data_cn.json
本数据集由[BELLE](https://github.com/LianjiaTech/BELLE)发布,包含0.5M条中文指令遵循样本,同样通过[Self-Instruction](https://github.com/yizhongw/self-instruct)技术生成。
#### belle_data1M_cn.json
本数据集由[BELLE](https://github.com/LianjiaTech/BELLE)发布,包含1M条中文指令遵循样本,`belle_data_cn.json`与`belle_data1M_cn.json`的数据无重复。 -->
## 思维链(Chain-of-Thought, CoT)数据集
#### CoT_data.json
> 本数据集通过整合[FLAN](https://github.com/google-research/FLAN)发布的9个思维链(CoT)数据集并统一格式得到,涵盖9个CoT任务,总计74771条样本。
#### CoT_CN_data.json
> 本数据集通过谷歌翻译(en2cn)将`CoT_data.json`翻译为中文得到。
#### formatted_cot_data 文件夹
> 本文件夹包含各CoT数据集的格式化英文版本数据。
#### formatted_cot_data 文件夹
> 本文件夹包含各CoT数据集的格式化中文版本数据。
## CodeAlpaca 数据集
#### code_alpaca.json
> 本数据集由[codealpaca](https://github.com/sahil280114/codealpaca)发布,包含20022条代码生成任务样本。
## 金融领域数据集
#### finance_en.json
> 本数据集取自[此处](https://huggingface.co/datasets/gbharti/finance-alpaca),包含68912条英语金融相关指令样本。
## Firefly 数据集
#### firefly.json
> 本数据集取自[此处](https://github.com/yangjianxin1/Firefly),包含23个自然语言处理(Natural Language Processing, NLP)任务下的1649398条中文指令样本。
## GPT4All 数据集
#### gpt4all.json
> 本数据集取自[此处](https://github.com/nomic-ai/gpt4all),包含806199条英语指令样本,涵盖代码生成、故事创作与对话任务。
#### gpt4all_without_p3.json
> 移除了Bigscience/P3数据集的GPT4All版本,包含437605条样本。
## GPTeacher 数据集
#### GPTeacher.json
> 本数据集取自[此处](https://github.com/teknium1/GPTeacher),包含29013条由GPT-4生成的英语指令样本,涵盖通用指令、角色扮演指令、代码指令以及Toolformer相关任务。
## Guanaco 数据集
#### GuanacoDataset.json
> 本数据集取自[此处](https://huggingface.co/datasets/JosephusCheung/GuanacoDataset),包含534610条由text-davinci-003生成的英语指令样本,基于Alpaca模型的175个任务,通过多语言种子任务重写以及新增英语语法分析、自然语言理解、跨语言自我认知、显性内容识别等专属任务得到。
#### Guanaco_additional_Dataset.json
> 面向多语言的新增大规模数据集。
## HC3 数据集
#### HC3_ChatGPT.json/HC3_Human.json
> 本数据集取自[此处](https://huggingface.co/datasets/Hello-SimpleAI/HC3),包含37175条由ChatGPT与人类生成的中英双语指令样本。
#### HC3_ChatGPT_deduplication.json/HC3_Human_deduplication.json
> 未进行指令去重的HC3数据集。
## InstructionWild 数据集
#### instinwild_en.json & instinwild_cn.json
> 本数据集取自[此处](https://github.com/XueFuzhao/InstructionWild),包含52191条英语指令与51504条中文指令,数据采集自Twitter平台,用户在此分享的提示词多涵盖生成式任务、开放域问答与头脑风暴类内容。(Colossal AI曾使用该数据集训练ColossalChat模型。)
## Instruct 数据集
#### instruct.json
> 本数据集取自[此处](https://huggingface.co/datasets/swype/instruct),包含888969条英语指令样本,通过AllenAI提供的先进自然语言处理工具完成数据增强。
## 自然指令(Natural Instructions)数据集
#### natural-instructions-1700tasks.zip
> 本数据集取自[此处](https://github.com/allenai/natural-instructions),包含5040134条指令样本,采集自多样化的自然语言处理任务。
## 亲社会对话(Prosocial Dialog)数据集
#### natural-instructions-1700tasks.zip
> 本数据集取自[此处](https://huggingface.co/datasets/allenai/prosocial-dialog),包含165681条英语指令样本,由GPT-3重写问题并结合人类反馈生成。
## xP3 数据集
#### natural-instructions-1700tasks.zip
> 本数据集取自[此处](https://huggingface.co/datasets/bigscience/xP3),包含78883588条指令样本,采集自涵盖46种语言与16个自然语言处理任务的提示词与数据集。
## 中文指令数据集合集
> 本合集包含所有中文指令数据集。
## 组合数据集
#### alpaca_plus_belle_data.json
> 本数据集由英语`alpaca_data.json`与中文`belle_data_cn.json`合并得到。
#### alpaca_plus_cot_data.json
> 本数据集由英语`alpaca_data.json`与思维链`CoT_data.json`合并得到。
#### alpaca_plus_belle_cot_data.json
> 本数据集由英语`alpaca_data.json`、中文`belle_data_cn.json`与思维链`CoT_data.json`合并得到。
## 引用声明
若您使用本仓库中的数据集合集、代码或实验成果,请引用本仓库:
@misc{alpaca-cot,
author = {Qingyi Si, Zheng Lin },
school = {Institute of Information Engineering, Chinese Academy of Sciences, Beijing, China},
title = {Alpaca-CoT: An Instruction Fine-Tuning Platform with Instruction Data Collection and Unified Large Language Models Interface},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {url{https://github.com/PhoebusSi/alpaca-CoT}},
}
同时请引用原始的Stanford Alpaca、BELLE与FLAN相关论文。
提供机构:
QingyiSi
原始信息汇总
数据集概述
数据集名称
- Instruction-Finetuning Dataset Collection (Alpaca-CoT)
数据集描述
- 该数据集持续收集多种指令微调数据集,并标准化不同数据集至同一格式,以便直接加载于Alpaca模型。
数据集语言
- 英语、中文、马拉雅拉姆语
数据集许可证
- Apache-2.0
数据集包含的子数据集
- alpaca
alpaca_data.json: 包含52K英语指令样本,由斯坦福Alpaca发布。alpaca_data_cleaned.json:alpaca_data.json的修订版,去除了各种分词器工件。
- alpacaGPT4
alpaca_gpt4_data.json: 包含52K英语指令样本,由GPT-4生成。alpaca_gpt4_data_zh.json: 由GPT-4使用中文提示生成。
- Chain-of-Thought
CoT_data.json: 包含9个CoT任务,共74771样本。CoT_CN_data.json:CoT_data.json的中文翻译版本。
- CodeAlpaca
code_alpaca.json: 包含20022样本,涉及代码生成任务。
- finance
finance_en.json: 包含68912英语金融相关指令。
- firefly
firefly.json: 包含1649398中文指令,涉及23个NLP任务。
- GPT4all
gpt4all.json: 包含806199英语指令,涉及代码、故事和对话任务。gpt4all_without_p3.json: 不包含Bigscience/P3的版本,包含437605样本。
- GPTeacher
GPTeacher.json: 包含29013英语指令,由GPT-4生成。
- Guanaco
GuanacoDataset.json: 包含534610英语指令,由text-davinci-003生成。Guanaco_additional_Dataset.json: 不同语言的新增大型数据集。
- HC3
HC3_ChatGPT.json/HC3_Human.json: 包含37175英语/中文指令,由ChatGPT和人类生成。
- instinwild
instinwild_en.json&instinwild_cn.json: 包含52191英语和51504中文指令。
- instruct
instruct.json: 包含888969英语指令。
- Natural Instructions
natural-instructions-1700tasks.zip: 包含5040134指令,涉及多样NLP任务。
- prosocial dialog
natural-instructions-1700tasks.zip: 包含165681英语指令,由GPT-3重写问题和人类反馈生成。
- xP3
natural-instructions-1700tasks.zip: 包含78883588指令,跨46种语言和16个NLP任务。
数据格式
- 所有数据均格式化为同一模板,每个样本包含指令、输入(可能为空)和输出字符串。
贡献方式
- 欢迎贡献者分享数据集,需按指定格式调整数据,并通过创建新的拉取请求进行提交。
搜集汇总
数据集介绍

构建方式
QingyiSi/Alpaca-CoT数据集通过整合多种指令调优数据集构建而成,涵盖了从英文到中文、多语言的广泛领域。该数据集的构建过程中,采用了统一的数据格式,确保所有数据集能够直接加载到Alpaca模型中。具体而言,数据集包括了通过自我指令技术生成的样本、GPT-4生成的指令样本、以及从多个公开数据集中提取并格式化的样本。此外,数据集还包含了通过翻译和组合不同数据集生成的多语言版本,以支持更广泛的模型训练需求。
特点
QingyiSi/Alpaca-CoT数据集的主要特点在于其多样性和标准化。数据集不仅包含了多种语言的指令样本,还涵盖了从代码生成到自然语言理解等多个任务类型。通过统一的数据格式,用户可以轻松地将这些数据集应用于不同的模型训练任务中。此外,数据集的构建过程中还考虑了数据的多样性和质量,确保了训练出的模型具有较高的泛化能力。
使用方法
QingyiSi/Alpaca-CoT数据集的使用方法相对简单,用户可以直接加载数据集并用于指令调优模型的训练。数据集的格式统一,每个样本包含指令、输入和输出三个部分,用户可以根据需要调整输入部分的内容。此外,数据集还提供了详细的文档和代码示例,帮助用户快速上手。用户可以通过HuggingFace的datasets库加载数据集,并结合Alpaca模型的代码进行训练和评估。
背景与挑战
背景概述
QingyiSi/Alpaca-CoT数据集是由中国科学院信息工程研究所的Qingyi Si和Zheng Lin等人于2023年创建的,旨在收集和标准化各种指令微调数据集。该数据集的核心研究问题是如何通过统一的数据格式和模型接口,提升大规模语言模型在指令微调任务中的表现。其影响力在于为研究人员提供了一个便捷的平台,能够直接加载和使用多种指令微调数据集,从而推动了自然语言处理领域中指令微调技术的研究与发展。
当前挑战
QingyiSi/Alpaca-CoT数据集面临的挑战主要包括:首先,如何从多样化的数据源中筛选和整合高质量的指令微调数据,确保数据的多样性和代表性;其次,在数据标准化过程中,如何处理不同数据集之间的格式差异,确保数据能够无缝集成到统一的模型训练框架中;最后,随着数据集的不断扩展,如何有效管理和更新数据集,以适应快速变化的模型训练需求,也是一个重要的挑战。
常用场景
经典使用场景
QingyiSi/Alpaca-CoT数据集主要用于指令微调任务,特别是在自然语言处理领域中,通过提供标准化的指令数据集,帮助模型学习如何根据给定的指令生成相应的输出。该数据集涵盖了多种语言和任务类型,包括代码生成、金融指令、多轮对话等,适用于大规模语言模型的微调训练。
解决学术问题
该数据集解决了在自然语言处理领域中,如何有效进行指令微调的学术问题。通过提供多样化的指令数据,帮助研究者探索和验证不同指令对模型性能的影响,从而提升模型在特定任务上的表现。这对于推动指令驱动型模型的研究具有重要意义,尤其是在多语言和多任务场景下的应用。
衍生相关工作
基于QingyiSi/Alpaca-CoT数据集,研究者们开发了多种指令微调模型,如Alpaca模型及其变体。这些模型在多语言处理、代码生成、金融分析等任务中表现出色。此外,该数据集还促进了多任务学习、跨语言迁移学习等领域的研究,推动了大规模语言模型在实际应用中的广泛部署。
以上内容由遇见数据集搜集并总结生成



