数据集:

yahma/alpaca-cleaned

英文

Alpaca-Cleaned 数据集卡片

数据集描述

这是原始的 Stanford Alpaca 数据集的清理版本。在这个数据集中修复了以下问题:

  • 幻觉:原始数据集中的许多指令引用了互联网上的数据,导致 GPT3 产生幻觉性的回答。
  • "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\""
    
  • 合并指令:原始数据集中有许多指令被合并在一起的情况,原因不明。
  • "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"
    
  • 空输出:原始数据集中的某些条目的输出为空。
  • "instruction": "Calculate the area of the following shape in square centimeters.",
    "input": "rectangle of size 4 cm x 5 cm",
    "output": ""
    
  • 空代码示例:原始数据集中的某些描述缺少代码示例,导致难以理解代码的预期行为。
  • 图像生成指令:原始数据集中的一些描述包括生成图像的指令,这显然是不可能的。
  • "instruction": "Create a graphic or logo that visually represents the word \"courage\".",
    "input": "",
    "output": "<No Output>"
    
  • N/A 输出:原始数据集中的一些代码片段的输出为 N/A。
  • 输入字段不一致:原始数据集中在应该为空的输入字段的使用上不一致。
  • "input":"<no input>"
    "input":"No input"
    "input":"noinput"
    "input":"<noinput>"
    
  • 错误答案:原始数据集中的一些指令/问题的答案是错误的。其中约有80%的数学问题估计含有错误答案。
  • "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"
    
  • 不明确/不合理的指令:许多指令不明确,我们试图澄清(或重新编写)不合理的指令。对于那些指令略微不清楚,但可以推断出意义的情况,不会进行更改。
  • "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."
    
  • 多余的转义和控制字符:原始数据集中存在几个带有多余转义和控制字符的条目。
  • 原始 Alpaca 数据集概述

    Alpaca 是由 OpenAI 的 text-davinci-003 引擎生成的包含52000条指令和演示的数据集。这些指令数据可用于为语言模型进行指令调整,使语言模型更好地遵循指令。

    作者在 Self-Instruct framework 发布的数据生成流程的基础上进行了以下修改:

    • 使用 text-davinci-003 引擎生成指令数据,而不是 davinci。
    • 编写了 new prompt ,明确要求使用 text-davinci-003 生成指令。
    • 使用了更加激进的批量解码,即一次生成20条指令,大大降低了数据生成的成本。
    • 简化了数据生成流程,放弃了分类指令和非分类指令之间的差异。
    • 每个指令只生成了一个实例,而不是像 Self-Instruct 中的2到3个实例。

    这种方法以更低的成本(不到500美元)获得了一个包含52000个示例的指令跟踪数据集。在初步研究中,作者还发现与 Self-Instruct 发布的数据相比,这52000条生成的数据更加多样化。

    支持的任务和排行榜

    Alpaca 数据集旨在为指令训练预训练语言模型。

    语言

    Alpaca 中的数据为英文(BCP-47 en)。

    数据集结构

    数据实例

    "train" 的示例如下所示:

    {
        "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",
    }
    

    数据字段

    数据字段如下:

    • instruction:描述模型应执行的任务。这52K个指令都是唯一的。
    • input:任务的可选上下文或输入。例如,当指令是"总结以下文章"时,输入为文章内容。大约有40%的示例有输入。
    • output:由 text-davinci-003 生成的指令答案。
    • text:使用作者在微调模型时使用的格式( prompt template )格式化的 instruction,input和output。

    数据拆分

    train
    alpaca 52002

    数据集创建

    策划理由

    [需要更多信息]

    源数据

    初始数据收集和规范化

    [需要更多信息]

    语言生产商是谁?

    [需要更多信息]

    注释

    注释过程

    [需要更多信息]

    注释者是谁?

    [需要更多信息]

    个人和敏感信息

    [需要更多信息]

    使用数据的注意事项

    数据的社会影响

    配套此数据集发布的摘录 blog post 如下:

    我们相信发布上述资源将使学术界能够对指令跟踪语言模型进行受控的科学研究,从而产生更好的科学成果,并最终解决这些模型当前存在的问题。同时,任何发布都会带来一定的风险。首先,我们认识到发布我们的训练方案揭示了某些功能的可行性。一方面,这使更多的人(包括不良行为者)能够创建可能带来伤害的模型(无论是有意还是无意的)。另一方面,这种意识可能激励迅速采取防御措施,尤其是来自学术界的行动,现在他们有了深入研究这些模型安全性的手段。总体而言,我们认为对研究界的好处大于此特定发布的风险。鉴于我们正在发布训练方案,我们认为发布数据、模型权重和训练代码的风险进一步降低,因为该方案的简单性。与此同时,发布这些资源对于可重复的科学研究具有极大的好处,使学术界可以使用标准数据集、模型和代码进行受控的比较并探索扩展。部署 Alpaca 的交互演示还带来潜在风险,例如更广泛地传播有害内容以及降低打垃圾邮件、欺诈或虚假信息的门槛。为此,我们采取了两种降低风险的策略。首先,我们使用 OpenAI 的内容审核 API 实现了内容过滤,该API根据 OpenAI 的使用政策过滤掉有害内容。其次,我们使用 Kirchenbauer 等人 2023年的方法对所有模型输出进行了水印处理,以便他人可以在一定的概率下判断输出是否来自 Alpaca 7B。最后,我们对使用演示的条款和条件非常严格;它仅限于非商业用途,并遵守 LLaMA 的许可协议。我们知道一旦我们发布了模型权重,或者用户自己训练了自己的指令跟踪模型,这些风险降低措施可能会被规避。然而,通过安装这些缓解措施,我们希望推进最佳实践,并最终制定社区规范来负责任地部署基础模型。

    偏见讨论

    [需要更多信息]

    其他已知限制

    alpaca 数据集由语言模型(text-davinci-003)生成,不可避免地会包含一些错误或偏见。我们鼓励用户谨慎使用这些数据,并提出新的方法来过滤或改进其中的不完美之处。

    附加信息

    数据集创建者

    [需要更多信息]

    许可信息

    该数据集在 Creative Commons NonCommercial (CC BY-NC 4.0) 下提供。

    引用信息

    @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}},
    }
    

    贡献

    [需要更多信息]