用高效偏好优化提升长文本模型生成能力,避免幻觉。
LOGO -- Long cOntext aliGnment via efficient preference Optimization
- 采用无参考偏好优化与位置合成构建训练数据,解决长序列内存瓶颈。
- 仅用0.3B数据训练16小时,在80K上下文上性能媲美GPT-4。
- 可扩展上下文长度,同时保持原模型多任务能力。
长上下文模型(LCMs)在处理超长输入序列(超过1亿标记)方面展现出巨大潜力。尽管已有研究发现这些模型能准确定位上下文中的关键信息,但其生成表现仍不理想,常出现幻觉等对齐偏差。现有方法通过提升预训练和指令微调的数据规模与质量取得进展,但在效果或效率上仍有不足。本文提出LOGO(Long cOntext aliGnment via efficient preference Optimization),首次将偏好优化引入长上下文对齐训练。为克服长序列带来的显存限制,LOGO采用无参考偏好优化策略,并通过位置合成构造训练数据。仅需在单台8×A800 GPU上用0.3B数据训练16小时,即可使Llama-3-8B-Instruct-80K模型在真实长上下文任务中达到与GPT-4相当的性能,同时保持其在语言建模和MMLU等任务上的原有能力。此外,LOGO还能扩展模型上下文窗口并提升生成质量。
原文摘要 · Abstract (English)
Long-context models(LCMs) have shown great potential in processing long input sequences(even more than 100M tokens) conveniently and effectively. With significant progress, recent research has pointed out that LCMs can accurately locate token-level salient information within the context. Yet, the generation performance of these LCMs is far from satisfactory and might result in misaligned responses, such as hallucinations. To enhance the generation capability of LCMs, existing works have investigated the effects of data size and quality for both pre-training and instruction tuning. Though achieving meaningful improvement, previous methods fall short in either effectiveness or efficiency. In this paper, we introduce LOGO(Long cOntext aliGnment via efficient preference Optimization), a training strategy that first introduces preference optimization for long-context alignment. To overcome the GPU memory-bound issue caused by the long sequence, LOGO employs a reference-free preference optimization strategy and adopts a position synthesis method to construct the training data. By training with only 0.3B data on a single 8$\times$A800 GPU machine for 16 hours, LOGO allows the Llama-3-8B-Instruct-80K model to achieve comparable performance with GPT-4 in real-world long-context tasks while preserving the model's original capabilities on other tasks, e.g., language modeling and MMLU. Moreover, LOGO can extend the model's context window size while enhancing its generation performance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。