ChatPaper.aiChatPaper

Qwen2.5-1M 기술 보고서

Qwen2.5-1M Technical Report

January 26, 2025
저자: 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
cs.AI

초록

우리는 문맥 길이를 1백만 토큰까지 확장하는 일련의 모델인 Qwen2.5-1M을 소개합니다. 이전 128K 버전과 비교했을 때, Qwen2.5-1M 시리즈는 긴 문맥 사전 훈련과 사후 훈련을 통해 상당히 향상된 장문맥 능력을 갖추고 있습니다. 장문 데이터 합성, 점진적 사전 훈련, 그리고 다단계 지도 미세 튜닝과 같은 주요 기술이 효과적으로 장문맥 성능을 향상시키면서 훈련 비용을 줄이는 데 사용됩니다. 더 많은 사용자들에게 장문맥 모델의 사용을 촉진하기 위해, 추론 프레임워크를 제시하고 오픈 소스로 공개합니다. 이 프레임워크에는 추가 훈련 없이 모델 문맥 길이를 최소 네 배 이상까지 확장할 수 있는 길이 추정 방법이 포함되어 있습니다. 추론 비용을 줄이기 위해, 배포 시나리오를 위한 희소 어텐션 방법과 청크 미리 채우기 최적화를 구현하고, 정확도를 향상시키기 위한 희소성 정제 방법을 채택합니다. 게다가, 커널 최적화, 파이프라인 병렬성, 그리고 스케줄링 최적화를 포함한 추론 엔진의 최적화 사항을 상세히 설명하며, 전체 추론 성능을 크게 향상시킵니다. 우리의 추론 프레임워크를 활용하여, Qwen2.5-1M 모델은 1백만 토큰 문맥 시나리오에서 놀라운 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를 크게 앞섰으며, 문맥을 여덟 배 더 길게 지원합니다.
English
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.

Summary

AI-Generated Summary

PDF623January 28, 2025