LongCat 희소 어텐션: 스트리밍 인지 계층적 크로스 레이어 인덱싱을 통한 효율적인 장문 컨텍스트 처리
LongCat Sparse Attention: Taming the Lightning via Streaming-aware Hierarchical Cross-Layer Indexing
DeepSeek Sparse Attention (DSA)는 Lightning Indexer를 통해 효율적인 장문 컨텍스트 모델링을 가능하게 합니다. 그러나 실제 적용에는 인덱서의 높은 $O(L^2)$ 계산 비용과 출력으로 인해 발생하는 하드웨어 비효율적인, 불연속적인 메모리 접근 방식이라는 문제가 있습니다. 이러한 시스템 수준의 병목 현상을 해결하기 위해, 우리는 세 가지 상호 보완적이고 독립적인 전략을 포함하는 하드웨어-알고리즘 공동 설계 프레임워크인 LongCat Sparse Attention (LSA)를 제안합니다: (1) 스트리밍 인지 인덱싱은 분산된 KV 엔트리를 선택적으로 하드웨어에 맞춰 연속적인 형태로 변환하여 HBM 메모리의 효율적인 접근을 가능하게 합니다; (2) 크로스 레이어 인덱싱은 단일 레이어가 생성한 결과를 여러 계층에서 재사용하여 인덱싱 오버헤드를 줄이며, 이는 크로스 레이어 증류를 통해 지원됩니다; (3) 계층적 인덱싱은 각 쿼리에 대해 후보 집합을 점진적으로 줄이는 거친-부터-세밀한 방식으로 작동하여 인덱싱 계산량을 크게 줄입니다. 69B-A3B 모델에서 560B-A27B 모델까지의 광범위한 확장 실험 결과, LSA는 일반적인 벤치마크와 장문 컨텍스트 벤치마크 모두에서 전체 어텐션과 동등한 성능을 지속적으로 달성하는 것으로 나타났습니다. 또한, LSA는 최대 백만 토큰 길이의 네이티브 학습을 지원하며 LongCat-2.0 (1.6T-A48B) 개발의 기반이 됩니다. 추가 연구를 촉진하기 위해, 우리는 LSA를 LongCat-Flash-Lite에 통합하고 업데이트된 장문 컨텍스트 학습 코퍼스를 포함하는 LongCat-Flash-Lite-Sparse (69B-A3B)를 공개합니다.
DeepSeek Sparse Attention (DSA) enables efficient long-context modeling through its Lightning Indexer. However, practical deployment remains constrained by the indexer's expensive $O(L^2)$ scoring overhead and the hardware-inefficient, discontinuous memory-access patterns induced by its outputs. To address these system-level bottlenecks, we introduce LongCat Sparse Attention (LSA), a hardware-algorithm co-designed framework comprising three complementary and orthogonal strategies: (1) Streaming-Aware Indexing, which selectively converts scattered KV entries into hardware-aligned contiguous layouts to enable coalesced HBM access; (2) Cross-Layer Indexing, which amortizes indexing overhead by reusing the results produced by a single layer across consecutive layers, supported by cross-layer distillation; and (3) Hierarchical Indexing, which adopts a coarse-to-fine scoring scheme to progressively narrow the candidate set for each query, thereby substantially reducing indexing computation. Extensive scaling experiments, ranging from 69B-A3B to 560B-A27B models, demonstrate that LSA consistently achieves performance on par with full attention across both general-purpose and long-context benchmarks. Moreover, LSA supports native training with context lengths of up to one million tokens and underpins the development of LongCat-2.0 (1.6T-A48B). To facilitate further research, we also introduce and open-source LongCat-Flash-Lite-Sparse (69B-A3B), which integrates LSA into LongCat-Flash-Lite and incorporates an updated long-context training corpus.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.