arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2405.16579cs.CL
收藏

自动为LLM跨多种粒度生成大量上下文驱动的SFT数据

Automatically Generating Numerous Context-Driven SFT Data for LLMs across Diverse Granularity

Beihang University(北京航空航天大学)

Shanghaoran Quan

AI总结:

提出AugCon方法,利用上下文分割树和对比学习评分器,自动生成跨粒度、高多样性和高保真度的SFT数据,实验证明其优于现有方法。

摘要:

从自定义语料库构建高质量的查询-响应对对于在许多应用中监督微调(SFT)大型语言模型(LLMs)至关重要,例如创建特定领域的AI助手或角色扮演代理。然而,通过人工标注获取这些数据成本高昂,且现有的自动化方法往往无法捕捉到上下文粒度的多样范围,并倾向于生成同质化的数据。为了解决这些问题,我们引入了一种名为AugCon的新方法,能够自动生成跨多个粒度级别、具有高多样性、高质量和高保真度的上下文驱动的SFT数据。AugCon首先使用上下文分割树(CST)生成查询,这是一种创新方法,用于递归推导查询并分割上下文以覆盖全部粒度。然后,我们通过对比学习训练一个评分器,与CST协作对查询进行排序和优化。最后,引入自我对齐和自我改进的协同整合,以获得高保真度的响应。我们进行了大量实验,结合人工和自动评估,涵盖一个测试场景和四个广泛使用的英文和中文基准。结果表明,与几种最先进的方法相比,AugCon在生成高多样性、高质量和高保真度的SFT数据方面具有显著优势。我们所有的代码、数据集和微调模型将在https://github.com/quanshr/AugCon上提供。

英文摘要:

Constructing high-quality query-response pairs from custom corpus is crucial for supervised fine-tuning (SFT) large language models (LLMs) in many applications, like creating domain-specific AI assistants or roleplaying agents. However, sourcing this data through human annotation is costly, and existing automated methods often fail to capture the diverse range of contextual granularity and tend to produce homogeneous data. To tackle these issues, we introduce a novel method named AugCon, capable of automatically generating context-driven SFT data across multiple levels of granularity with high diversity, quality and fidelity. AugCon begins by generating queries using the Context-Split-Tree (CST), an innovative approach for recursively deriving queries and splitting context to cover full granularity. Then, we train a scorer through contrastive learning to collaborate with CST to rank and refine queries. Finally, a synergistic integration of self-alignment and self-improving is introduced to obtain high-fidelity responses. Extensive experiments are conducted incorporating both human and automatic evaluations, encompassing a test scenario and four widely-used benchmarks in English and Chinese. The results highlight the significant advantages of AugCon in producing high diversity, quality, and fidelity SFT data against several state-of-the-art methods. All of our code, dataset, and fine-tuned model will be available at: https://github.com/quanshr/AugCon.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑