BARE:利用基础语言模型实现少样本合成数据生成
BARE: Leveraging Base Language Models for Few-Shot Synthetic Data Generation
AI总结:
针对少样本下指令调优模型生成合成数据多样性不足的问题,提出结合基础模型多样性与指令调优模型质量的两阶段BARE方法,仅用3个种子示例即可生成高质量数据,显著提升多类下游任务性能。
摘要:
随着模型训练对高质量数据的需求不断增长,研究人员与开发者越来越多地生成合成数据来调优和训练大语言模型(LLM)。然而,当前的数据生成方法依赖包含数万条示例的种子集来提示指令调优模型。当高质量示例的筛选成本高昂或难度较大时,这种依赖会带来尤为突出的问题。本文探索了全新的少样本合成数据生成场景——仅从少量示例出发生成高质量数据集。我们发现,当仅使用少量种子示例时,现有合成数据方法所采用的指令调优模型生成的内容多样性不足以支撑下游任务。相比之下,未经后训练的基础模型(此前在合成数据生成领域尚未得到充分利用)虽然指令遵循能力较弱,但输出的多样性显著更高。基于这一洞察,我们提出Base-Refine(BARE)——一种将基础模型的多样性与指令调优模型的质量保证相结合的新型两阶段方法。BARE在少样本合成数据生成任务中表现优异:仅使用3个种子示例,它就能生成多样且高质量的数据集,显著提升下游任务性能。实验表明,用1000条BARE生成的样本微调Llama 3.1 8B模型,在LiveCodeBench任务上的表现可与同等规模的前沿模型相媲美。此外,在GSM8K数据集上,使用BARE生成的数据微调的Llama 3.2 1B模型,性能较仅使用指令模型生成数据的模型提升101%;在RAG数据生成任务中,使用BARE生成数据微调的Llama 3.1 8B模型,较前沿的RAFT方法提升18.4%。
英文摘要:
As the demand for high-quality data in model training grows, researchers and developers are increasingly generating synthetic data to tune and train LLMs. However, current data generation methods rely on seed sets containing tens of thousands of examples to prompt instruction-tuned models. This reliance can be especially problematic when the curation of high-quality examples is expensive or difficult. In this paper we explore the novel few-shot synthetic data generation setting -- generating a high-quality dataset from a few examples. We show that when working with only a few seed examples, instruction-tuned models used in current synthetic data methods produce insufficient diversity for downstream tasks. In contrast, we show that base models without post-training, largely untapped for synthetic data generation, offer substantially greater output diversity, albeit with lower instruction following abilities. Leveraging this insight, we propose Base-Refine (BARE), a novel two-stage method that combines the diversity of base models with the quality assurance of instruction-tuned models. BARE excels in few-shot synthetic data generation: using only 3 seed examples it generates diverse, high-quality datasets that significantly improve downstream task performance. We show that fine-tuning Llama 3.1 8B with 1,000 BARE-generated samples achieves performance comparable to state-of-the-art similarly sized models on LiveCodeBench tasks. Furthermore, data generated with BARE enables a 101% improvement for a fine-tuned Llama 3.2 1B on GSM8K over data generated by only instruction-models, and an 18.4% improvement for a fine-tuned Llama 3.1 8B over the state-of-the-art RAFT method for RAG data generation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。