정의

DeepSeek-V4에 도입된 희소 어텐션(sparse attention) 아키텍처는 긴 컨텍스트(long context)에서 연산량과 KV 캐시 메모리를 획기적으로 줄이기 위해 세 가지 구성요소(sliding window, heavily compressed attention, compressed sparse attention)를 결합한 어텐션 메커니즘이다.

핵심 속성

  • 컨텍스트 길이: 1M 토큰 이상을 효율적으로 처리 가능
  • 연산량 감소: Pro 기준 연산량 27% 수준으로 감소
  • 메모리 소비: KV 캐시 크기를 10분의 1로 축소
  • 세 가지 구성요소: Sliding Window Attention (범위 제한), Heavily Compressed Attention (100:1 압축 후 full attention), Compressed Sparse Attention (4:1 압축 후 Lightning Indexer로 top-k 선택)
  • Lightning Indexer: 경량 연산으로 KV 캐시 중 중요 토큰 top-k를 선택
  • 학습 방식: 초기 1T 토큰은 dense attention, 이후 30T+ 토큰은 sparse attention으로 pre-training

관계

인용

“sparse attention을 거의 from scratch로 학습하는 것. … sparse attention을 통한 거의 from scratch pre-training을 밀어붙이고 싶었다는 것이고 아마 거의 성공적인 것 같습니다. 그런데 그걸 위해서 거쳐야 했던 과정들이 굉장히 힘든 과정들을 거쳤던 것 같아요.”

출처