通过分组采样提升大模型指令遵循能力,效果优于传统混合训练。
CommonIT: Commonality-Aware Instruction Tuning for Large Language Models via Data Partitions
- 按任务、嵌入、长度分组数据,每批只用同一组样本
- 在通用域平均提效2.1%,特殊任务域最高提效5.2%
- 适合追求指令理解性能优化的研究者和开发者
指令微调能提升大语言模型(LLM)遵循指令的能力。与多数关注数据混合的研究不同,本文从训练时的数据采样角度出发,受人类学习过程启发——专注单一主题更易掌握,提出一种名为CommonIT的新型指令微调策略。具体而言,利用任务、嵌入和长度三个指标将指令数据集聚类为不同组,并确保每个训练小批量(即“分区”)仅包含来自同一组的数据,从而实现批次间数据随机性与批次内数据相似性的平衡。在LLaMa系列模型上进行严格测试,结果表明,使用FLAN、CoT和Alpaca等指令数据集,以及LLaMa2-7B、Qwen2-7B、LLaMa 13B和BLOOM 7B等模型时,CommonIT可显著提升指令遵循能力:以长度度量在通用领域(知识、推理、多语言、编码)平均提升2.1%;以任务度量在特殊领域(GSM、Openfunctions、Code)提升5.2%;以嵌入度量在特定任务(MMLU)上提升3.8%。代码已公开于https://github.com/raojay7/CommonIT。
原文摘要 · Abstract (English)
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}.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。