cahya/alpaca-id-cleaned
收藏Hugging Face2023-09-23 更新2024-03-04 收录
下载链接:
https://hf-mirror.com/datasets/cahya/alpaca-id-cleaned
下载链接
链接失效反馈官方服务:
资源简介:
---
license: cc-by-4.0
language:
- id
tags:
- instruction-finetuning
pretty_name: Alpaca-Cleaned
task_categories:
- text-generation
---
# Dataset Card for Indonesian Alpaca-Cleaned
- **Repository:** https://github.com/gururise/AlpacaDataCleaned
## Dataset Description
This is the Indonesian translated version of the cleaned original Alpaca Dataset released by Stanford. The following issues have been identified in the original release and fixed in this dataset:
1. **Hallucinations:** Many instructions in the original dataset had instructions referencing data on the internet, which just caused GPT3 to hallucinate an answer.
```
"instruction":"Summarize the given article in 200 Words.",
"input": "https://www.bbc.com/news/world-51461830",
"output": "The recent protests in Belarus are part of a growing wave of discontent against the rule of Alexander Lukashenko, who has led the country since 1994. Demonstrations against his government have been ongoing since August, and come in the wake of an election widely seen as rigged. As police and security forces have cracked down on protesters, the movement has only grown, with hundreds of thousands of people taking to the streets to call for new leadership. Human rights activists have accused the government of using extreme violence in order prosecute protesters, leading to an international outcry and sanctions from the European Union. As the situation in Belarus continues to unfold, the international community is monitoring the situation closely - hoping for a peaceful resolution, while also standing firm against the oppressive tactics employed by the Belarusian state."
"instruction": "Classify the following shape according to simple geometry.",
"input": "<Picture Attached>",
"output": "Triangle"
"instruction": "Given a recent news article, write a headline for it.",
"input": "https://www.news.example.com/article-1",
"output": "\"NASA Launches a Mars 2020 Mission to Search for Signs of Ancient Life\""
```
2. **Merged Instructions:** There were many instructions that were merged together in the original dataset for some reason.
```
"instruction": "Should I invest in stocks?",
"input": "",
"output": "It depends on your individual situation. Investing in stocks carries a certain amount of risk but can also offer potential rewards. Make sure to research the different types of stocks, understand the risks and rewards, and develop a plan that works for you.\n##\n18. Instruction: Identify the noun in the following sentence:\n18. Input:\nThe large apple was delicious.\n18. Output:\nApple"
```
3. **Empty outputs:** Some entries in the original dataset had empty outputs.
```
"instruction": "Calculate the area of the following shape in square centimeters.",
"input": "rectangle of size 4 cm x 5 cm",
"output": ""
```
4. **Empty code examples:** Some descriptions in the original dataset were missing code examples, making it difficult to understand the intended behavior of the code.
5. **Instructions to generate images:** Some descriptions in the original dataset included instructions to generate images, something obviously not possible.
```
"instruction": "Create a graphic or logo that visually represents the word \"courage\".",
"input": "",
"output": "<No Output>"
```
6. **N/A outputs:** Some code snippets in the original dataset had N/A outputs.
7. **Inconsistent input field:** The original dataset had inconsistent usage of the input field when it was supposed to be empty.
```
"input":"<no input>"
"input":"No input"
"input":"noinput"
"input":"<noinput>"
```
8. **Wrong answers:** Some instructions/questions in the original dataset had incorrect answers. About 80% of the math problems are estimated to have incorrect answers.
```
"instruction": "Calculate the median of the following data set.",
"input": "1, 2, 4, 5, 8, 9",
"output": "5"
"instruction": "Convert 25m to km.",
"input": "",
"output": "25km"
```
9. **Non-Sensical/Unclear instructions:** Many instructions are unclear, we try to clarify (or re-write) if instructions are non-sensical. Instructions that are slightly unclear, but where one could deduce the meaning are not altered.
```
"instruction": "Freeze the following sample of yogurt for 10 minutes.",
"input": "Yogurt sample",
"output": "<noinput>"
"instruction": "Increase the font size to 12 points.",
"input": "",
"output": "The font size has been increased to 12 points."
```
10. **Extraneous escape and control characters:** The original dataset had several entries with extraneous escape and control characters.
### Original Alpaca Dataset Summary
Alpaca is a dataset of 52,000 instructions and demonstrations generated by OpenAI's `text-davinci-003` engine. This instruction data can be used to conduct instruction-tuning for language models and make the language model follow instruction better.
The authors built on the data generation pipeline from [Self-Instruct framework](https://github.com/yizhongw/self-instruct) and made the following modifications:
- The `text-davinci-003` engine to generate the instruction data instead of `davinci`.
- A [new prompt](https://github.com/tatsu-lab/stanford_alpaca/blob/main/prompt.txt) was written that explicitly gave the requirement of instruction generation to `text-davinci-003`.
- Much more aggressive batch decoding was used, i.e., generating 20 instructions at once, which significantly reduced the cost of data generation.
- The data generation pipeline was simplified by discarding the difference between classification and non-classification instructions.
- Only a single instance was generated for each instruction, instead of 2 to 3 instances as in Self-Instruct.
This produced an instruction-following dataset with 52K examples obtained at a much lower cost (less than $500).
In a preliminary study, the authors also found that the 52K generated data to be much more diverse than the data released by [Self-Instruct](https://github.com/yizhongw/self-instruct/blob/main/data/seed_tasks.jsonl).
### Supported Tasks and Leaderboards
The Alpaca dataset designed for instruction training pretrained language models.
### Languages
The data in Alpaca are in English (BCP-47 en).
## Dataset Structure
### Data Instances
An example of "train" looks as follows:
```json
{
"instruction": "Create a classification task by clustering the given list of items.",
"input": "Apples, oranges, bananas, strawberries, pineapples",
"output": "Class 1: Apples, Oranges\nClass 2: Bananas, Strawberries\nClass 3: Pineapples",
"text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\nCreate a classification task by clustering the given list of items.\n\n### Input:\nApples, oranges, bananas, strawberries, pineapples\n\n### Response:\nClass 1: Apples, Oranges\nClass 2: Bananas, Strawberries\nClass 3: Pineapples",
}
```
### Data Fields
The data fields are as follows:
* `instruction`: describes the task the model should perform. Each of the 52K instructions is unique.
* `input`: optional context or input for the task. For example, when the instruction is "Summarize the following article", the input is the article. Around 40% of the examples have an input.
* `output`: the answer to the instruction as generated by `text-davinci-003`.
* `text`: the `instruction`, `input` and `output` formatted with the [prompt template](https://github.com/tatsu-lab/stanford_alpaca#data-release) used by the authors for fine-tuning their models.
### Data Splits
| | train |
|---------------|------:|
| alpaca | 52002 |
## Dataset Creation
### Curation Rationale
[More Information Needed]
### Source Data
#### Initial Data Collection and Normalization
[More Information Needed]
#### Who are the source language producers?
[More Information Needed]
### Annotations
#### Annotation process
[More Information Needed]
#### Who are the annotators?
[More Information Needed]
### Personal and Sensitive Information
[More Information Needed]
## Considerations for Using the Data
### Social Impact of Dataset
Excerpt the [blog post](https://crfm.stanford.edu/2023/03/13/alpaca.html) accompanying the release of this dataset:
> We believe that releasing the above assets will enable the academic community to perform controlled scientific studies on instruction-following language models, resulting in better science and ultimately new techniques to address the existing deficiencies with these models. At the same time, any release carries some risk. First, we recognize that releasing our training recipe reveals the feasibility of certain capabilities. On one hand, this enables more people (including bad actors) to create models that could cause harm (either intentionally or not). On the other hand, this awareness might incentivize swift defensive action, especially from the academic community, now empowered by the means to perform deeper safety research on such models. Overall, we believe that the benefits for the research community outweigh the risks of this particular release. Given that we are releasing the training recipe, we believe that releasing the data, model weights, and training code incur minimal further risk, given the simplicity of the recipe. At the same time, releasing these assets has enormous benefits for reproducible science, so that the academic community can use standard datasets, models, and code to perform controlled comparisons and to explore extensions. Deploying an interactive demo for Alpaca also poses potential risks, such as more widely disseminating harmful content and lowering the barrier for spam, fraud, or disinformation. We have put into place two risk mitigation strategies. First, we have implemented a content filter using OpenAI’s content moderation API, which filters out harmful content as defined by OpenAI’s usage policies. Second, we watermark all the model outputs using the method described in Kirchenbauer et al. 2023, so that others can detect (with some probability) whether an output comes from Alpaca 7B. Finally, we have strict terms and conditions for using the demo; it is restricted to non-commercial uses and to uses that follow LLaMA’s license agreement. We understand that these mitigation measures can be circumvented once we release the model weights or if users train their own instruction-following models. However, by installing these mitigations, we hope to advance the best practices and ultimately develop community norms for the responsible deployment of foundation models.
### Discussion of Biases
[More Information Needed]
### Other Known Limitations
The `alpaca` data is generated by a language model (`text-davinci-003`) and inevitably contains some errors or biases. We encourage users to use this data with caution and propose new methods to filter or improve the imperfections.
## Additional Information
### Dataset Curators
[More Information Needed]
### Licensing Information
The dataset is available under the [Creative Commons NonCommercial (CC BY-NC 4.0)](https://creativecommons.org/licenses/by-nc/4.0/legalcode).
### Citation Information
```
@misc{alpaca,
author = {Rohan Taori and Ishaan Gulrajani and Tianyi Zhang and Yann Dubois and Xuechen Li and Carlos Guestrin and Percy Liang and Tatsunori B. Hashimoto },
title = {Stanford Alpaca: An Instruction-following LLaMA model},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/tatsu-lab/stanford_alpaca}},
}
```
### Contributions
[More Information Needed]
提供机构:
cahya原始信息汇总
数据集概述
数据集名称
- 名称: Alpaca-Cleaned
- 别名: Indonesian Alpaca-Cleaned
数据集描述
- 原始数据来源: 斯坦福大学发布的Alpaca数据集
- 翻译版本: 印尼语翻译版
- 问题修复: 针对原始数据集中的多个问题进行了修复,包括幻觉问题、合并指令、空输出、空代码示例、生成图像指令、N/A输出、输入字段不一致、错误答案、指令不清晰、多余控制字符等。
数据集内容
- 任务类型: 文本生成
- 语言: 印尼语 (id)
- 许可证: Creative Commons Attribution 4.0 (CC-BY-4.0)
数据集结构
- 数据实例: 包含指令、可选输入、输出和格式化文本字段
- 数据字段:
instruction: 描述任务input: 提供任务上下文output: 模型生成的答案text: 格式化的指令、输入和输出
数据集创建
- 数据生成: 使用OpenAI的
text-davinci-003引擎生成52,000条指令数据 - 修改: 对数据生成流程进行了简化,包括使用新的提示模板和更激进的批量解码策略
使用注意事项
- 社会影响: 数据集的发布旨在促进学术界对指令遵循语言模型的研究,但也存在风险,如模型可能被用于不当目的
- 偏见和限制: 数据由语言模型生成,可能包含错误或偏见,建议谨慎使用并寻求改进方法
许可证和引用
- 许可证: 数据集遵循Creative Commons NonCommercial (CC BY-NC 4.0)许可
- 引用信息: 提供详细的引用格式和链接
以上概述基于提供的README文件内容,确保了信息的准确性和相关性。
搜集汇总
数据集介绍

构建方式
在自然语言处理领域,指令微调数据集对于提升语言模型的指令遵循能力至关重要。该数据集是在斯坦福大学原始Alpaca数据集基础上,经过系统性清洗与印尼语翻译构建而成。原始Alpaca数据集由OpenAI的text-davinci-003引擎生成,包含52,000条指令与演示,但其存在幻觉、指令合并、空输出、代码示例缺失、图像生成指令、不一致输入字段、错误答案、无意义指令以及多余转义字符等十类问题。清洗过程针对这些问题逐一修正,例如移除引用互联网数据的幻觉指令、拆分合并指令、填补空输出、标准化输入字段、纠正数学错误,并过滤无意义内容。随后,将清洗后的英文数据翻译为印尼语,形成面向印尼语指令微调的高质量数据集。
使用方法
该数据集适用于对预训练语言模型进行指令微调,以提升其遵循用户指令的能力。使用时,可直接加载HuggingFace上的cahya/alpaca-id-cleaned数据集,其训练集包含52,002条样本。研究人员可将格式化文本字段作为输入,输出字段作为目标,采用标准的文本生成任务训练范式。由于数据集采用CC BY-NC 4.0许可,仅限非商业用途,且需遵守LLaMA的许可协议。建议在微调后使用内容过滤和水印技术降低潜在风险,如生成有害内容或散布虚假信息。该数据集为印尼语指令微调研究提供了可靠的基础资源。
背景与挑战
背景概述
在自然语言处理领域,指令微调(instruction fine-tuning)已成为提升大语言模型遵循人类指令能力的关键技术。2023年,斯坦福大学的研究团队(包括Rohan Taori、Ishaan Gulrajani等人)发布了Alpaca数据集,包含52,000条由OpenAI的text-davinci-003引擎生成的指令-输出对,旨在以极低成本(不足500美元)构建高质量的指令微调数据。该数据集基于Self-Instruct框架改进,通过批量解码和简化生成流程,显著提升了数据多样性与生成效率。然而,原始Alpaca数据集存在幻觉、错误答案、空输出等问题,影响了模型训练的可靠性。为此,cahya等人推出了印尼语清洗版本cahya/alpaca-id-cleaned,通过修复上述缺陷并翻译为印尼语,为低资源语言的指令微调研究提供了更纯净的数据基础,推动了多语言大模型在东南亚地区的应用与发展。
当前挑战
该数据集面临的核心挑战源于原始Alpaca数据的内在缺陷:其一,幻觉问题尤为突出,许多指令要求模型总结网络文章或描述图片,但GPT-3无法访问外部信息,导致生成虚构内容;其二,数学与逻辑推理错误占比极高,约80%的数学题答案有误,如中位数计算和单位换算出现明显偏差;其三,数据格式混乱,包括指令与输出合并、空输出、输入字段不一致(如“<no input>”与“No input”并存)以及多余转义字符。在构建过程中,清洗工作需逐一甄别并修正上述问题,同时将英文指令翻译为印尼语以适配本地化需求,这要求处理语言歧义与语义保真度,确保翻译后指令的意图清晰、答案准确,从而构建一个可靠且可复用的指令微调数据集。
常用场景
经典使用场景
在自然语言处理领域,指令微调是提升预训练语言模型遵循人类意图能力的核心范式。cahya/alpaca-id-cleaned数据集作为斯坦福Alpaca数据集的印尼语清洗版本,为多语言指令微调研究提供了高质量的训练资源。该数据集最经典的使用场景是用于对印尼语预训练语言模型进行监督式指令微调,通过52,000条涵盖文本生成、分类、推理等多样化任务的指令-输出对,使模型学会理解并执行人类以印尼语下达的复杂指令,从而显著增强模型在印尼语场景下的交互能力与任务泛化性能。
解决学术问题
该数据集系统性地解决了原始Alpaca数据集中存在的幻觉、合并指令、空输出、错误答案等十大质量问题,为指令微调研究提供了更可靠的实验基准。在学术研究中,它有效消除了数据噪声对模型训练效果的干扰,使得研究者能够更准确地评估指令微调方法本身的效能,而非受限于数据缺陷。这一清洗过程推动了指令数据质量控制方法论的发展,并为后续构建高质量多语言指令数据集树立了重要典范,促进了跨语言指令微调研究的可重复性与科学严谨性。
实际应用
在实际应用层面,基于该数据集微调的印尼语模型可广泛应用于智能客服、教育辅导、内容生成等场景。例如,在印尼语智能问答系统中,模型能够准确理解用户提出的各类问题并生成符合语境的回答;在自动化内容创作领域,模型可依据指令生成新闻摘要、产品描述或教学材料。此外,该数据集还支持开发面向印尼语社区的AI助手,帮助用户完成信息检索、文本分类、数据整理等日常任务,显著降低了印尼语自然语言处理应用的门槛。
数据集最近研究
最新研究方向
在低资源语言指令微调领域,cahya/alpaca-id-cleaned数据集为印尼语等小语种大语言模型的训练提供了高质量的基础资源。当前研究前沿聚焦于如何通过清洗原始Alpaca数据中存在的幻觉、错误答案及格式不一致等问题,提升指令微调数据的可靠性与多样性。该数据集的出现推动了多语言指令微调范式的演进,尤其在东南亚语言处理领域,为构建更鲁棒、更符合本地化语义理解的对话系统奠定了数据基础。其影响在于降低了非英语语言模型研发的数据门槛,促进了全球范围内指令微调技术的公平发展,同时也为研究数据质量对模型行为的影响提供了关键的对比基准。
以上内容由遇见数据集搜集并总结生成



