arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.19553cs.CL
收藏

一夜之间将 Llama-3 的上下文扩展十倍

Extending Llama-3's Context Ten-Fold Overnight

Beijing Academy of Artificial Intelligence(北京人工智能研究院);Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院)

Peitian Zhang, Ninglu Shao, Zheng Liu, Shitao Xiao, Hongjin Qian, Qiwei Ye, Zhicheng Dou

AI总结:

本文通过 QLoRA 微调和仅 3.5K 条 GPT-4 合成样本,在 8 小时内将 Llama-3-8B-Instruct 的上下文从 8K 高效扩展到 80K,并公开全部资源以促进社区研究。

摘要:

我们通过 QLoRA 微调将 Llama-3-8B-Instruct 的上下文长度从 8K 扩展到 80K。整个训练周期非常高效,在一台配备 8 块 A800(80G)GPU 的机器上仅需 8 小时。所得模型在广泛的评估任务上表现出优越的性能,例如 NIHS、主题检索和长上下文语言理解;同时,它也很好地保留了在短上下文上的原有能力。上下文的显著扩展主要归功于仅 3.5K 个由 GPT-4 生成的合成训练样本,这表明 LLM 具有扩展其原始上下文长度的内在(但在很大程度上被低估的)潜力。事实上,如果有更多计算资源,上下文长度可以扩展到远超 80K。因此,团队将公开发布全部资源(包括数据、模型、数据生成流程、训练代码),以促进社区未来的研究:\url{https://github.com/FlagOpen/FlagEmbedding}。

英文摘要:

We extend the context length of Llama-3-8B-Instruct from 8K to 80K via QLoRA fine-tuning. The entire training cycle is super efficient, which takes 8 hours on one 8xA800 (80G) GPU machine. The resulted model exhibits superior performances across a broad range of evaluation tasks, such as NIHS, topic retrieval, and long-context language understanding; meanwhile, it also well preserves the original capability over short contexts. The dramatic context extension is mainly attributed to merely 3.5K synthetic training samples generated by GPT-4 , which indicates the LLMs' inherent (yet largely underestimated) potential to extend its original context length. In fact, the context length could be extended far beyond 80K with more computation resources. Therefore, the team will publicly release the entire resources (including data, model, data generation pipeline, training code) so as to facilitate the future research from the community: \url{https://github.com/FlagOpen/FlagEmbedding}.

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

↑