UniPrefill: 블록 단위 동적 희소화를 통한 범용 장문맥 프리필 가속
UniPrefill: Universal Long-Context Prefill Acceleration via Block-wise Dynamic Sparsification
May 7, 2026
저자: Qihang Fan, Huaibo Huang, Zhiying Wu, Bingning Wang, Ran He
cs.AI
초록
대규모 언어 모델(LLM)이 빠르게 발전함에 따라, 모델의 성능은 점점 향상되는 동시에 더욱 긴 컨텍스트 길이를 요구하게 되었다. 긴 컨텍스트 처리의 추론 효율성을 개선하기 위해, 최근 몇 가지 새로운 저복잡도 하이브리드 아키텍처가 제안되어 긴 컨텍스트 추론의 계산 부담을 효과적으로 완화하고 있다. 그러나 기존의 긴 컨텍스트 프리필 가속화 연구는 주로 희소 어텐션 메커니즘에 초점을 맞추고 있으며, 이는 전체 어텐션 모델에서만 최대 속도 향상을 달성한다. 이러한 프리필 가속화 방법을 선형/전체 어텐션 하이브리드 또는 슬라이딩 윈도우/전체 어텐션 하이브리드와 같은 새로운 아키텍처에 적용하면 성능이 크게 저하된다. 또한, 이러한 방법은 일반적으로 연속 배칭과 호환되지 않아 vLLM과 같은 현대적인 추론 엔진에 통합하기 어렵다. 이에 본 논문에서는 거의 모든 모델 아키텍처에 적용 가능한 프리필 가속화 프레임워크인 UniPrefill을 제안하며, 이는 토큰 수준에서 직접 모델의 계산을 가속화한다. 또한 UniPrefill을 연속 배칭 연산자로 구현하고 vLLM의 스케줄링 전략을 확장하여 프리필-디코드 공동 처리와 텐서 병렬을 기본적으로 지원함으로써, UniPrefill을 vLLM에 원활하게 통합할 수 있도록 하였다. UniPrefill은 최초 토큰 생성 시간(TTFT)에서 최대 2.1배의 속도 향상을 달성하며, 동시 요청 수가 증가함에 따라 가속 효과는 더욱 두드러진다.
English
As large language models (LLMs) continue to advance rapidly, they are becoming increasingly capable while simultaneously demanding ever-longer context lengths. To improve the inference efficiency of long-context processing, several novel low-complexity hybrid architectures have recently been proposed, effectively alleviating the computational burden of long-context inference. However, existing research on long-context prefill acceleration remains predominantly focused on sparse attention mechanisms, which achieve their maximum speedup only on full-attention models. When transferred to emerging architectures--such as linear/full attention hybrids or sliding window/full attention hybrids--these prefill acceleration approaches suffer significant performance degradation. Furthermore, such methods are generally incompatible with continuous batching, making them difficult to integrate into modern inference engines such as vLLM. To this end, we propose UniPrefill, a prefill acceleration framework applicable to virtually any model architecture, which directly accelerates the model's computation at the token level. We further implement UniPrefill as a continuous batching operator and extend vLLM's scheduling strategy to natively support prefill-decode co-processing and tensor parallel for UniPrefill, enabling its seamless integration into vLLM. UniPrefill achieves up to 2.1x speedup in Time-To-First-Token (TTFT), with the acceleration becoming increasingly pronounced as the number of concurrent requests grows.