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

Qwen2.5-1M 技术报告

Qwen2.5-1M Technical Report

Alibaba Group(阿里巴巴集团)
An Yang, Bowen Yu, Chengyuan Li, Dayiheng Liu, Fei Huang, Haoyan Huang, Jiandong Jiang, Jianhong Tu, Jianwei Zhang, Jingren Zhou, Junyang Lin, Kai Dang, Kexin Y… 展开作者

An Yang, Bowen Yu, Chengyuan Li, Dayiheng Liu, Fei Huang, Haoyan Huang, Jiandong Jiang, Jianhong Tu, Jianwei Zhang, Jingren Zhou, Junyang Lin, Kai Dang, Kexin Yang, Le Yu, Mei Li, Minmin Sun, Qin Zhu, Rui Men, Tao He, Weijia Xu, Wenbiao Yin, Wenyuan Yu, Xiafei Qiu, Xingzhang Ren, Xinlong Yang, Yong Li, Zhiying Xu, Zipeng Zhang

AI总结:

Qwen2.5-1M系列通过长上下文预训练、后训练及开源推理框架,将上下文扩展至100万token,实现3至7倍预填充加速,并在长上下文任务中超越GPT-4o-mini。

摘要:

我们介绍了 Qwen2.5-1M,这是一系列将上下文长度扩展到 100 万个 token 的模型。与之前的 128K 版本相比,Qwen2.5-1M 系列通过长上下文预训练和后训练,显著增强了长上下文能力。我们采用了长数据合成、渐进式预训练和多阶段监督微调等关键技术,在降低训练成本的同时有效提升了长上下文性能。为了在更广泛的用户群中推广长上下文模型的使用,我们提出并开源了我们的推理框架。该框架包含一种长度外推方法,无需额外训练即可将模型上下文长度至少扩展 4 倍甚至更多。为了降低推理成本,我们实现了稀疏注意力方法以及用于部署场景的分块预填充优化,并采用稀疏性细化方法来提高精度。此外,我们详细介绍了在推理引擎中的优化,包括内核优化、流水线并行和调度优化,这些优化显著提升了整体推理性能。通过利用我们的推理框架,Qwen2.5-1M 模型在具有 100 万个 token 上下文的场景中实现了 3 倍至 7 倍的显著预填充加速。该框架为使用开源模型开发需要长上下文处理的应用程序提供了高效且强大的解决方案。Qwen2.5-1M 系列目前包括开源模型 Qwen2.5-7B-Instruct-1M 和 Qwen2.5-14B-Instruct-1M,以及通过 API 访问的模型 Qwen2.5-Turbo。评估表明,Qwen2.5-1M 模型在长上下文任务中得到了极大提升,同时未损害在短上下文场景中的性能。具体而言,Qwen2.5-14B-Instruct-1M 模型在长上下文任务中显著优于 GPT-4o-mini,并支持长达 8 倍的上下文。

英文摘要:

We introduce Qwen2.5-1M, a series of models that extend the context length to 1 million tokens. Compared to the previous 128K version, the Qwen2.5-1M series have significantly enhanced long-context capabilities through long-context pre-training and post-training. Key techniques such as long data synthesis, progressive pre-training, and multi-stage supervised fine-tuning are employed to effectively enhance long-context performance while reducing training costs. To promote the use of long-context models among a broader user base, we present and open-source our inference framework. This framework includes a length extrapolation method that can expand the model context lengths by at least four times, or even more, without additional training. To reduce inference costs, we implement a sparse attention method along with chunked prefill optimization for deployment scenarios and a sparsity refinement method to improve precision. Additionally, we detail our optimizations in the inference engine, including kernel optimization, pipeline parallelism, and scheduling optimization, which significantly enhance overall inference performance. By leveraging our inference framework, the Qwen2.5-1M models achieve a remarkable 3x to 7x prefill speedup in scenarios with 1 million tokens of context. This framework provides an efficient and powerful solution for developing applications that require long-context processing using open-source models. The Qwen2.5-1M series currently includes the open-source models Qwen2.5-7B-Instruct-1M and Qwen2.5-14B-Instruct-1M, as well as the API-accessed model Qwen2.5-Turbo. Evaluations show that Qwen2.5-1M models have been greatly improved in long-context tasks without compromising performance in short-context scenarios. Specifically, the Qwen2.5-14B-Instruct-1M model significantly outperforms GPT-4o-mini in long-context tasks and supports contexts eight times longer.

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

↑