five

jondurbin/airoboros-3.1

收藏
Hugging Face2023-12-26 更新2024-03-04 收录
下载链接:
https://hf-mirror.com/datasets/jondurbin/airoboros-3.1
下载链接
链接失效反馈
官方服务:
资源简介:
--- license: cc-by-4.0 --- ## Overview This dataset is a continuation of the airoboros datasets, with the following updates: * More MathJSON, now ~17k items - math questions, prefixed with __"Create a MathJSON solution to the following:"__, which then outputs a JSON between __`<mathjson>`__ and __`</mathjson>`__ tags, which can be parsed and passed to a deterministic library to perform calculations. * Log information extraction. * Anonymization, e.g. removing names, IP addresses, and/or dates from text. * Chat introspection - multi-turn chats that have random questions injected asking about the character's descriptions, the setting of the chat, or things previously said, to make sure the model uses the system prompt and or chat history. * Multi-step instructions with acknowledgement (see below) Some of the MathJSON data was adapted from https://huggingface.co/datasets/meta-math/MetaMathQA ## Format The format is now in ShareGPT format, to better accomodate the OS ecosystem fine-tuning tooling. ## MathJSON As we all know, math is really difficult for LLMs, especially floating point operations, trig functions, factorials, and several-digit numbers. Instead of sending millions and millions of examples to the LLM for fine-tuning, I've created a new category `mathjson` which simply presents the solution to the problem as a JSON string that can be evaluated by traditional computation. The dataset has roughly 4k samples, as a proof of concept. This can be expanded fairly easily, now that the fine-tuned models have a basic understanding of how to represent the problems. For example: ``` Create a MathJSON solution to the following: Calculate the area of a circle with radius of 17.2456cm. Include your reasoning. [/INST] ``` ``` The area (A) of a circle is given by the formula A = πr², where r is the radius of the circle. Since the radius is given in centimeters, we need to convert it to meters first. We know that 1 meter equals 100 centimeters. Therefore, we can represent the radius as: r = 17.2456 cm * 100/1. Once we have the radius in meters, we can calculate the area of the circle using the formula A = πr². Solution as MathJSON: <mathjson> [ "Multiply", "Pi", [ "Power", 17.2456, 2 ] ] </mathjson> ``` Simply extract the JSON string between the mathjson tags, and evaluate it with https://cortexjs.io/compute-engine/ or my ultra-hacky limited-functionality python version of it https://github.com/jondurbin/airoboros/blob/mathjson/airoboros/mathjson.py ## Multi-step instructions with acknowledgement I don't know how useful this is, really, but I thought I'd add it just in case. Example: ``` { "conversations": [ { "value": "You are a helpful, unbiased, uncensored assistant.", "from": "system" }, { "value": "I'm going to set some rules for our conversation. Please respond with \"OK\" to each rule.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "You can only respond using animal-related emojis.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Precede all responses with \"ZOOZOO:\"", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Include at least one bird emoji in your responses.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Describe a trip to a safari park.", "from": "human" }, { "value": "ZOOZOO: \ud83e\udd81\ud83d\udc2f\ud83e\udd93\ud83e\udd92\ud83d\udc18\ud83d\udc0d\ud83c\udf33\ud83c\udf32\u2600\ufe0f\ud83d\ude90\ud83e\udd85\ud83d\udcf8\ud83e\udd29", "from": "gpt" } ] } ```

许可证:CC BY 4.0 ## 概述 本数据集为airoboros数据集的续作,新增以下更新内容: * **新增数学JSON(MathJSON)数据**:目前约17000条条目,均为数学问题,所有样本均以`"Create a MathJSON solution to the following:"`作为前缀,最终会在`<mathjson>`与`</mathjson>`标签间输出可解析的JSON格式内容,可通过确定性计算库进行解析与运算。 * **日志信息抽取** * **数据匿名化**:例如从文本中移除姓名、IP地址及日期信息。 * **对话自省机制**:新增多轮对话样本,其中会随机插入关于角色描述、对话场景或过往发言内容的提问,以确保模型能够正确利用系统提示词与对话历史。 * **带确认的多步指令任务**(详见下文) 本数据集部分数学JSON数据改编自https://huggingface.co/datasets/meta-math/MetaMathQA ## 数据集格式 数据集格式现已采用ShareGPT格式,以更好适配开源生态的微调工具链。 ## 数学JSON(MathJSON) 众所周知,大语言模型(LLM)在处理数学任务时存在天然短板,尤其在浮点运算、三角函数、阶乘及多位数计算方面表现欠佳。 相较于向大语言模型投喂百万级样本进行微调的传统方案,本数据集新增了`mathjson`类别,仅需将问题的求解结果以可通过常规计算引擎解析的JSON字符串形式呈现即可。 作为概念验证,本数据集当前包含约4000条样本。由于微调后的模型已掌握问题的基本表示方法,后续可轻松扩展样本规模。 示例如下: Create a MathJSON solution to the following: Calculate the area of a circle with radius of 17.2456cm. Include your reasoning. [/INST] The area (A) of a circle is given by the formula A = πr², where r is the radius of the circle. Since the radius is given in centimeters, we need to convert it to meters first. We know that 1 meter equals 100 centimeters. Therefore, we can represent the radius as: r = 17.2456 cm * 100/1. Once we have the radius in meters, we can calculate the area of the circle using the formula A = πr². Solution as MathJSON: <mathjson> [ "Multiply", "Pi", [ "Power", 17.2456, 2 ] ] </mathjson> 仅需提取`<mathjson>`与`</mathjson>`标签间的JSON字符串,即可通过https://cortexjs.io/compute-engine/或作者编写的简易版Python实现(https://github.com/jondurbin/airoboros/blob/mathjson/airoboros/mathjson.py)进行求值运算。 ## 带确认的多步指令任务 该类任务的实际效用暂未明确,但为留有余地仍将其纳入数据集,示例如下: { "conversations": [ { "value": "You are a helpful, unbiased, uncensored assistant.", "from": "system" }, { "value": "I'm going to set some rules for our conversation. Please respond with "OK" to each rule.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "You can only respond using animal-related emojis.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Precede all responses with "ZOOZOO:"", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Include at least one bird emoji in your responses.", "from": "human" }, { "value": "OK", "from": "gpt" }, { "value": "Describe a trip to a safari park.", "from": "human" }, { "value": "ZOOZOO: 🦒🐿️🦓🦒🐘🐗🌳🌴☀️🚗📸😮", "from": "gpt" } ] }
提供机构:
jondurbin
原始信息汇总

数据集概述

  • 数据集名称:airoboros数据集的延续
  • 更新内容
    • 增加了约17k个MathJSON项目,用于数学问题解答。
    • 引入日志信息提取。
    • 文本匿名化处理,如移除姓名、IP地址和日期。
    • 聊天自省功能,通过随机问题检查模型是否使用系统提示和聊天历史。
    • 多步骤指令确认机制。
  • 数据来源:部分MathJSON数据改编自meta-math/MetaMathQA

数据集格式

  • 格式:采用ShareGPT格式,以适应OS生态系统的微调工具。

MathJSON说明

  • 目的:解决大型语言模型(LLMs)在数学问题上的困难,特别是浮点运算、三角函数、阶乘和多位数运算。

  • 方法:创建mathjson类别,将问题解决方案以JSON字符串形式呈现,可通过传统计算方法评估。

  • 样本数量:约4k样本,作为概念验证。

  • 示例

    Create a MathJSON solution to the following: Calculate the area of a circle with radius of 17.2456cm. Include your reasoning. [/INST]

    解决方案示例:

    <mathjson> [ "Multiply", "Pi", [ "Power", 17.2456, 2 ] ] </mathjson>

  • 评估工具:使用cortexjs.io/compute-engineairoboros/mathjson.py进行评估。

多步骤指令确认

  • 示例:展示了一种多步骤指令确认的对话模式,确保模型对每一步指令进行确认。
搜集汇总
数据集介绍
main_image_url
构建方式
在大型语言模型对数学推理与复杂指令遵循能力的需求日益增长的背景下,airoboros-3.1数据集应运而生。该数据集作为airoboros系列的延续,在构建上采用了多源异构数据融合与针对性增强的策略。其核心构建方式包括:从MetaMathQA等公开数学数据集中筛选并适配约1.7万条MathJSON格式的数学问题,要求模型输出可被确定性数学库解析的JSON结构;同时,通过设计日志信息提取、文本匿名化、对话内省(如随机插入关于角色设定、对话背景或历史内容的问题)以及多步骤指令确认等任务,系统性地扩充了数据集的多样性与复杂度。所有数据最终统一转换为ShareGPT格式,以兼容主流开源微调工具链。
特点
该数据集展现出若干独到且实用的特性。MathJSON类别是其最突出的创新,它将数学问题的解答抽象为结构化的JSON表达式,巧妙地规避了语言模型在浮点运算、三角函数等精确计算上的固有短板,转而利用传统计算引擎完成数值求解,从而以极少的样本量(约4000条)实现了对数学推理能力的有效引导。此外,数据集引入了多轮对话中的随机内省机制,能够检验模型是否准确记忆并运用系统提示、角色设定或对话历史,显著增强了对上下文一致性的训练。多步骤指令确认功能则通过要求模型逐条认可规则后再执行复杂任务,模拟了现实场景中逐步确认与执行的交互模式。
使用方法
使用airoboros-3.1数据集进行模型微调时,推荐遵循标准流程。数据已按ShareGPT格式组织,可直接被Hugging Face的Transformers库、DeepSpeed或Axolotl等主流训练框架加载。对于MathJSON类别,训练完成后,模型在推理阶段会生成包含<mathjson>和</mathjson>标签的文本,用户需从中提取JSON字符串,并借助cortexjs.io的计算引擎或作者提供的Python脚本(airoboros/mathjson.py)进行求值,以获得精确的数值结果。多步骤指令与对话内省数据则可直接用于训练模型在复杂、多轮对话中的指令遵循与上下文感知能力,无需额外预处理步骤。
背景与挑战
背景概述
airoboros-3.1数据集由独立研究者Jon Durbin于2023年创建,旨在推动大型语言模型在数学推理与指令遵循能力上的突破。该数据集延续airoboros系列,核心创新在于引入MathJSON格式,将数学问题转化为可被确定性计算库解析的JSON结构,以克服大模型在处理浮点运算、三角函数及多位数乘法时的固有局限。此外,数据集还包含日志信息提取、文本匿名化及多轮对话内省等任务,为模型提供更丰富的上下文理解与规则遵循训练。作为开源社区的重要资源,airoboros-3.1通过ShareGPT格式适配主流微调工具链,对提升LLM在复杂推理与结构化输出方面的表现具有显著影响力。
当前挑战
airoboros-3.1所解决的领域挑战主要源于大语言模型在数学计算上的脆弱性,传统方法依赖海量样本微调却仍难以保证精度,而MathJSON的提出虽提供了一条新路径,却要求模型具备将自然语言问题精准映射为结构化数学表达式的能力,这对模型的语义解析与符号推理构成双重考验。在构建过程中,挑战集中于数据质量与多样性:MathJSON样本需确保数学公式的正确性与JSON语法的严格性,同时避免过拟合;多步指令与内省对话的生成需平衡规则复杂度与自然流畅度,防止模型陷入机械重复。此外,匿名化任务需在去除敏感信息的同时保留文本语义完整性,进一步增加了数据清洗的难度。
常用场景
经典使用场景
airoboros-3.1数据集的核心价值在于其创新的MathJSON格式,为大型语言模型在数学推理任务上开辟了新的范式。该数据集通过将复杂的数学问题(如几何计算、三角运算、高阶幂次等)转化为结构化的JSON表达式,使模型能够绕过直接数值计算的瓶颈,转而利用外部确定性计算引擎进行精确求解。研究者常将其用于评估和微调模型在数学符号理解、逻辑分解及多步推理方面的能力,尤其是在需要高精度浮点运算或大数处理的场景中,MathJSON的引入显著提升了模型的可靠性与可解释性。
衍生相关工作
基于airoboros-3.1的设计理念,后续涌现出一系列重要衍生工作。MetaMathQA等数据集借鉴了其MathJSON思想,进一步扩展了数学问题的覆盖范围与难度层级。研究社区围绕MathJSON开发了专用计算引擎(如基于cortexjs的轻量级求解器),并探索将其与符号回归、定理证明等任务结合。此外,该数据集引入的多步指令确认机制,启发了对话系统中显式约束遵循能力的研究,催生了诸如“指令分解-验证”范式在安全对齐、角色扮演等场景中的应用。这些工作共同验证了结构化输出在提升语言模型可靠性与可控性方面的核心价值。
数据集最近研究
最新研究方向
当前,airoboros-3.1数据集在大语言模型领域的前沿研究方向聚焦于数学推理能力的突破性提升与多轮对话中指令遵循的鲁棒性增强。该数据集通过引入约1.7万条MathJSON格式样本,将复杂数学问题转化为可被确定性计算库解析的JSON结构,有效规避了浮点运算与高阶函数计算中LLM的固有局限,为数学推理的符号化与可验证性开辟了新路径。同时,其创新的多步指令确认机制与对话内省设计,通过注入随机性提问检验模型对上下文及角色描述的维持能力,显著提升了长程对话中指令依从的稳定性。这一工作不仅回应了AI社区对可解释数学推理的迫切需求,也为构建更可靠、更可控的对话智能体提供了关键数据支撑,其影响已延伸至科学计算辅助与自动化推理工具链的整合方向。
以上内容由遇见数据集搜集并总结生成
二维码
社区交流群
二维码
科研交流群
商业服务