한 번에 모든 프레임을 보세요: 다축 그레이디언트 체크포인팅을 활용한 효율적인 장문 비디오 이해를 위한 비디오-Ma^2mba
Look Every Frame All at Once: Video-Ma^2mba for Efficient Long-form Video Understanding with Multi-Axis Gradient Checkpointing
November 29, 2024
저자: Hosu Lee, Junho Kim, Hyunjun Kim, Yong Man Ro
cs.AI
초록
비디오 데이터의 규모와 복잡성이 증가함에 따라 기존의 트랜스포머 기반 대규모 다중 모달 모델(LMM)과 관련된 메모리 및 계산 요구가 제곱으로 증가하여 긴 비디오 시퀀스를 효율적으로 처리하는 것은 중요한 도전을 제기합니다. 이러한 문제를 해결하기 위해 우리는 어텐션 메커니즘을 대체하는 State Space Models(SSMs)를 Mamba-2 프레임워크 내에 통합한 새로운 아키텍처인 Video-Ma^2mba를 소개합니다. 이를 통해 LMM은 시간 및 메모리 요구 사항 측면에서 선형으로 확장되어 긴 지속 시간 비디오 콘텐츠를 처리할 수 있게 되었습니다. 더불어, 우리는 Multi-Axis Gradient Checkpointing(MA-GC) 방법을 도입하여 메모리 효율성을 향상시켰습니다. 이 방법은 여러 계산 축을 횡단하여 필수 활성화만 유지함으로써 메모리를 전략적으로 관리합니다. 우리의 접근법은 표준 그래디언트 체크포인팅에 비해 메모리 풋프린트를 크게 줄였습니다. 경험적 분석 결과, Video-Ma^2mba는 단일 GPU에서 1 FPS로 수백만 토큰 또는 2시간 이상의 연속된 시퀀스에 해당하는 방대한 비디오 시퀀스를 처리할 수 있음을 보여줍니다. 시간적 동적의 상세한 캡처를 유지함으로써 우리의 모델은 긴 비디오 이해 작업에서 응답의 정확성과 관련성을 향상시키며 기존 프레임워크에 비해 상당한 장점을 보여줍니다.
English
With the growing scale and complexity of video data, efficiently processing
long video sequences poses significant challenges due to the quadratic increase
in memory and computational demands associated with existing transformer-based
Large Multi-modal Models (LMMs). To address these issues, we introduce
Video-Ma^2mba, a novel architecture that incorporates State Space Models
(SSMs) within the Mamba-2 framework, replacing the attention mechanisms. This
allows the LMMs to scale linearly in terms of time and memory requirements,
making it feasible to handle long-duration video content. Furthermore, we
enhance the memory efficiency introducing the Multi-Axis Gradient Checkpointing
(MA-GC) method, which strategically manages memory by retaining only essential
activations across multiple computational axes. Our approach significantly
reduces the memory footprint compared to standard gradient checkpointing.
Empirical analyses show that Video-Ma^2mba can process extensive video
sequences-equivalent to millions of tokens or over two hours of continuous
sequences at 1 FPS-on a single GPU. By maintaining a detailed capture of
temporal dynamics, our model improves the accuracy and relevance of responses
in long video understanding tasks, demonstrating substantial advantages over
existing frameworks.Summary
AI-Generated Summary