ChatPaper.aiChatPaper

모든 토큰이 중요하다: 대규모 언어 모델에서 1,600만 토큰 초장문 컨텍스트 일반화 성능

Every Token Counts: Generalizing 16M Ultra-Long Context in Large Language Models

November 28, 2025
저자: Xiang Hu, Zhanchao Zhou, Ruiqi Liang, Zehuan Li, Wei Wu, Jianguo Li
cs.AI

초록

본 연구는 '기억할 수 있는 기계' 구축이라는 과제를 탐구하며, 장기 기억을 효율적인 초장기 문맥 모델링 문제로 규정합니다. 우리는 이를 위해 희소성, 무작위 접근 유연성, 길이 일반화라는 세 가지 핵심 속성이 필요함을 주장합니다. 초장기 문맥 모델링을 해결하기 위해 우리는 이 세 가지 속성을 모두 충족하는 새로운 어텐션 메커니즘인 계층적 희소 어텐션(HSA)을 활용합니다. 우리는 HSA를 트랜스포머에 통합하여 8B 매개변수의 MoE 모델인 HSA-UltraLong을 구축했으며, 8조 개 이상의 토큰으로 학습하고 도메인 내 및 도메인 외 문맥 길이를 가진 다양한 작업에서 엄격하게 평가하여 초장기 문맥 처리 능력을 입증했습니다. 결과에 따르면 우리 모델은 도메인 내 길이에서는 전체 어텐션 기준 모델과 유사한 성능을 보이면서도 최대 16M 길이의 문맥을 가진 대부분의 문맥 내 검색 작업에서 90% 이상의 정확도를 달성했습니다. 본 보고서는 실험적 통찰과 미해결 과제를 제시함으로써 초장기 문맥 모델링 분야의 향후 연구를 위한 기반을 마련합니다.
English
This work explores the challenge of building ``Machines that Can Remember'', framing long-term memory as the problem of efficient ultra-long context modeling. We argue that this requires three key properties: sparsity, random-access flexibility, and length generalization. To address ultra-long-context modeling, we leverage Hierarchical Sparse Attention (HSA), a novel attention mechanism that satisfies all three properties. We integrate HSA into Transformers to build HSA-UltraLong, which is an 8B-parameter MoE model trained on over 8 trillion tokens and is rigorously evaluated on different tasks with in-domain and out-of-domain context lengths to demonstrate its capability in handling ultra-long contexts. Results show that our model performs comparably to full-attention baselines on in-domain lengths while achieving over 90\% accuracy on most in-context retrieval tasks with contexts up to 16M. This report outlines our experimental insights and open problems, contributing a foundation for future research in ultra-long context modeling.
PDF141December 2, 2025