Giter VIP home page Giter VIP logo

alpaca-chinese-dataset's Introduction

Alpaca Chinese Dataset 中文指令微调数据集【持续更新】

当前状态

目前整体翻译已经完成,质量大概为85/100左右,可以用来做中文fine tuning了,但后续希望可以持续更新到98分/100分质量的数据集。欢迎更多更多朋友可以参与到此项目中来。

如何贡献修改

欢迎大家一起参与维护该数据集,如果你希望修改数据集的内容,请人工修改./data目录下的json文件,不要直接修改最外层的alpaca-chinese-52k.json ./data下的json修改后,请运行:

python main.py

会自动将你的修改更新到alpaca-chinese-52k.json中

Star History

Star History Chart

数据集说明

本数据集包括中文和英文的混合数据集,方便双语微调,以及后续做持续的数据修正。

原始的Alpaca英文数据集也存在不少的问题,个别的数学类的sample是错的,有少部分output字段需要修正,一些的标签没有对齐等。本数据集会对原始的数据集进行修改和修正。再此基础上,翻译出对应的中文版本,中文版基本是原始sample的翻译,但是对于一些比如押韵类、时态类的一些instruction,直接翻译导致韵脚丢失,时态不一致等。需要对应的进行人工改写。主要分为以下几个方面:

    1. 修改原始英文数据集的一些问题
    1. 翻译为中文数据集
    1. 调整直译导致的一些sample
    1. code等一些特殊的输出不进行翻译
    1. 对齐一些特殊的标签 或者拒绝生成等输出

格式说明

数据集为json dump的json文件,一个sample包括6个字段,en_instruction, en_input, en_output是英文对应的三个字段,instruction, input, output是中文对应的三个字段。

{
    "en_instruction": "Conver the temperature from Fahrenheit to Celsius.",
    "instruction": "将温度从华氏度调到摄氏度。",
    "en_input": "94F",
    "input": "94F",
    "en_output": "34.4C",
    "output": "34.4摄氏度"
}

文件说明

Dataset file notes
alpaca-chinese alpaca-chinese-52k.json 包含了52k英文和中文的数据全集
alpaca-chinese ./data/alpaca_chinese_part*.json 分拆数据文件

一些修改说明

Case1 成语:有一些sample,直译后需要进行二次改写,例如成语类的

{
    "en_instruction": "What is the meaning of the following idiom?",
    "instruction": "以下成语是什么意思?",
    "en_input": "It’s raining cats and dogs",
    "input": "倾盆大雨",
    "en_output": "The idiom \"it’s raining cats and dogs\" means that it is raining heavily.",
    "output": "成语“倾盆大雨”的意思是雨下得像盆里得水往下倒,形容雨大势急。"
}

Case2 数学题,一些英文的sample是错误的,我们需要先修改后,再翻译。

原始如下,解是一个无理数,我们直接把题目改一下:

{
    "en_instruction": "Find the solution to the quadratic equation.",
    "instruction": "求二次方程的解。",
    "en_input": "3x² + 7x - 4 = 0",
    "input": "3x² + 7x - 4 = 0",
    "en_output": "The solution of the quadratic equation is x = -4 and x = 1/3.",
    "output": "二次方程的解是 x = -4 和 x = 1/3。"
}

修改后如下:

{
    "en_instruction": "Find the solution to the quadratic equation.",
    "instruction": "求二次方程的解。",
    "en_input": "2x² - x - 10 = 0",
    "input": "2x² - x - 10 = 0",
    "en_output": "The solution of the quadratic equation is x = -2 and x = 5/2.",
    "output": "二次方程的解是 x = -2 和 x = 5/2。"
}

Case3 字数限定 原始

{
    "en_instruction": "Compose a five word sentence describing your day.",
    "instruction": "写一个五个字的句子来描述你的一天。",
    "en_input": "",
    "input": "",
    "en_output": "Today was an amazing day.",
    "output": "今天是令人惊喜的一天"
}

修改后:

{
    "en_instruction": "Compose a five word sentence describing your day.",
    "instruction": "写一个五个字的句子来描述你的一天。",
    "en_input": "",
    "input": "",
    "en_output": "Today was an amazing day.",
    "output": "今天真美好"
}

Case4 拆字 原始:

{
    "en_instruction": "Find a five-letter word that begins with 'd' and ends with 's'.",
    "instruction": "找到一个以“d”开头并以“s”结尾的五个字母的单词。",
    "en_input": "",
    "input": "",
    "en_output": "davis.",
    "output": "戴维斯。"
}

修改后:

{
    "en_instruction": "Find a five-letter word that begins with 'd' and ends with 's'.",
    "instruction": "一个木字一个羽毛的羽是什么字。",
    "en_input": "",
    "input": "",
    "en_output": "davis.",
    "output": "栩栩如生的栩(xǔ)"
}

Case5 本地化

{
    "en_instruction": "Name one social networking website",
    "instruction": "说出一个社交网站",
    "en_input": "",
    "input": "",
    "en_output": "Facebook.",
    "output": "微博"
}

alpaca-chinese-dataset's People

Contributors

lwen1243 avatar open-chinese avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.