arXiv:2505.12250cs.CLcs.AI2025-05被引 2

从网页语料中高效提取多样化的指令数据,提升大模型训练效果

Not All Documents Are What You Need for Extracting Instruction Tuning Data

  • 通过聚类与多臂老虎机策略,迭代筛选高价值文档
  • 计算成本降低5-10倍,模型准确率提升2.5个百分点
  • 适合需要高质量指令数据的LLM训练场景

指令微调能提升大语言模型性能,但依赖高质量训练数据。近期利用大模型基于种子问答对生成指令数据,但生成内容缺乏多样性且与种子相似,难以适用于真实场景。为此,我们提出从富含知识的网络语料中提取指令数据。直接检索领域文档并提取全部问答对存在两大问题:(1)用大模型提取所有问答对成本过高;(2)大量提取的问答对与下游任务无关,可能降低模型表现。为此,我们提出EQUAL框架,通过对比学习生成嵌入并聚类文档,再使用多臂老虎机策略高效识别潜在高价值文档簇。该迭代方法显著降低计算开销,同时提升模型性能。在AutoMathText和StackOverflow上针对四个下游任务的实验表明,EQUAL将计算成本降低5-10倍,使LLaMA-3.1-8B和Mistral-7B的准确率提升2.5个百分点。

原文摘要 · Abstract (English)

Instruction tuning improves the performance of large language models (LLMs), but it heavily relies on high-quality training data. Recently, LLMs have been used to synthesize instruction data using seed question-answer (QA) pairs. However, these synthesized instructions often lack diversity and tend to be similar to the input seeds, limiting their applicability in real-world scenarios. To address this, we propose extracting instruction tuning data from web corpora that contain rich and diverse knowledge. A naive solution is to retrieve domain-specific documents and extract all QA pairs from them, but this faces two key challenges: (1) extracting all QA pairs using LLMs is prohibitively expensive, and (2) many extracted QA pairs may be irrelevant to the downstream tasks, potentially degrading model performance. To tackle these issues, we introduce EQUAL, an effective and scalable data extraction framework that iteratively alternates between document selection and high-quality QA pair extraction to enhance instruction tuning. EQUAL first clusters the document corpus based on embeddings derived from contrastive learning, then uses a multi-armed bandit strategy to efficiently identify clusters that are likely to contain valuable QA pairs. This iterative approach significantly reduces computational cost while boosting model performance. Experiments on AutoMathText and StackOverflow across four downstream tasks show that EQUAL reduces computational costs by 5-10x and improves accuracy by 2.5 percent on LLaMA-3.1-8B and Mistral-7B

指令微调数据提取大模型训练高效算法

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。