CommonIT:基于数据划分的大语言模型共性感知指令微调
CommonIT: Commonality-Aware Instruction Tuning for Large Language Models via Data Partitions
AI总结:
本文提出 CommonIT 共性感知指令微调策略,通过任务、嵌入和长度三种度量对指令数据聚类划分,使每个训练小批量仅含同组数据,在多个 LLM 和数据集上验证了其提升指令遵循能力的有效性。
摘要:
通过指令微调,大语言模型(LLMs)可以增强其遵循指令的能力。与大多数关注数据混合的工作不同,本研究从训练过程中数据采样的角度出发,致力于提升模型能力。受人类学习过程的启发——通常通过针对单一类型主题的集中练习,更容易掌握相似主题的解决方案——我们提出了一种新颖的指令微调策略,称为 CommonIT:共性感知指令微调(Commonality-aware Instruction Tuning)。具体而言,我们使用三个提出的度量指标(任务 Task、嵌入 Embedding 和长度 Length)将指令数据集聚类为不同的组。我们确保每个训练小批量(mini-batch),即“划分(partition)”,仅由来自单一组的数据组成,这既带来了跨小批量的数据随机性,也带来了批内数据相似性。在 LLaMa 模型上的严格测试表明,CommonIT 通过指令微调数据集(FLAN、CoT 和 Alpaca)和模型(LLaMa2-7B、Qwen2-7B、LLaMa 13B 和 BLOOM 7B)有效增强了 LLMs 的指令遵循能力。CommonIT 在使用 Length 度量时,在通用领域(即知识 Knowledge、推理 Reasoning、多语言 Multilinguality 和编码 Coding 的平均得分)上持续带来平均 2.1% 的提升;在使用 Task 度量时,在特定领域(即 GSM、Openfunctions 和 Code)上带来 5.2% 的提升;在使用 Embedding 度量时,在特定任务(即 MMLU)上带来 3.8% 的提升。代码可在 \url{https://github.com/raojay7/CommonIT} 获取。
英文摘要:
With instruction tuning, Large Language Models (LLMs) can enhance their ability to adhere to commands. Diverging from most works focusing on data mixing, our study concentrates on enhancing the model's capabilities from the perspective of data sampling during training. Drawing inspiration from the human learning process, where it is generally easier to master solutions to similar topics through focused practice on a single type of topic, we introduce a novel instruction tuning strategy termed CommonIT: Commonality-aware Instruction Tuning. Specifically, we cluster instruction datasets into distinct groups with three proposed metrics (Task, Embedding and Length). We ensure each training mini-batch, or "partition", consists solely of data from a single group, which brings about both data randomness across mini-batches and intra-batch data similarity. Rigorous testing on LLaMa models demonstrates CommonIT's effectiveness in enhancing the instruction-following capabilities of LLMs through IT datasets (FLAN, CoT, and Alpaca) and models (LLaMa2-7B, Qwen2-7B, LLaMa 13B, and BLOOM 7B). CommonIT consistently boosts an average improvement of 2.1\% on the general domain (i.e., the average score of Knowledge, Reasoning, Multilinguality and Coding) with the Length metric, and 5.2\% on the special domain (i.e., GSM, Openfunctions and Code) with the Task metric, and 3.8\% on the specific tasks (i.e., MMLU) with the Embedding metric. Code is available at \url{https://github.com/raojay7/CommonIT}.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。