Skip to main content
QUICK REVIEW

[논문 리뷰] FAST-Prefill: FPGA Accelerated Sparse Attention for Long Context LLM Prefill

Rakshith Jayanth, Viktor Prasanna|arXiv (Cornell University)|2026. 02. 24.
Advanced Neural Network ApplicationsComputer Science인용 수 0
한 줄 요약

FAST-Prefill은 장문 컨텍스트 LLM의 prefill에서 동적 희소 어텐션을 위한 FPGA 가속기로, 스트리밍 희소 인덱스 생성, 생존성 기반의 이중 계층 KV 캐시, 하이브리드 매트릭스 처리 유닛을 제공하며, GPU 기준으로 최대 2.5x TTFT 및 최대 4.5x 에너지 효율 향상을 달성합니다.

ABSTRACT

In long-context large language model (LLM) inference, the prefill stage dominates computation due to self-attention over the complete input context. Sparse attention significantly reduces self-attention computation by limiting each token's interactions to a subset of tokens. The attention sparsity pattern varies across input prompts, and within a prompt, each attention head can follow a distinct pattern. This makes attention sparsity dynamic. The requirement of generating the sparsity pattern, combined with limited data reuse in attention, shifts the prefill compute to being memory-bound. This, in addition to the huge energy requirements for long-context inference on GPU, motivates FPGAs as good candidates for accelerating dynamic long-context inference. To tackle these challenges, we propose FAST-Prefill, the first FPGA accelerator for long-context prefill-stage inference with dynamic sparse attention. To efficiently generate sparse indices, we propose a extit{fused pipeline unit with a memory-aware execution order} to reduce large tensors and irregular memory accesses. To reduce off-chip memory traffic for accessing the KV cache, we utilize the memory hierarchy to design a extit{liveness-driven, dual-tier cache}. For high-throughput matrix multiplication, we design a extit{hybrid Matrix Processing Unit (MPU)} with DSPs and bit-plane decomposition using LUTs. We implement FAST-Prefill on Alveo U280 and evaluate it on the Llama and Qwen models (batch size = 1) for context lengths ranging from 4K to 128K tokens. We demonstrate an average speedup of up to 2.5$ imes$ in TTFT and 4.5$ imes$ improvement in energy efficiency over GPU implementation on Nvidia A5000 GPU.

연구 동기 및 목표

  • 자체 어텐션이 지배적 비용인 긴 컨텍스트 LLM prefill에서 효율성을 모색한다.
  • FPGA에서의 동적 희소성 패턴 및 메모리 바운드인 prefill 워크로드의 도전과제를 다룬다.
  • 희소 인덱스 생성, KV 캐시 관리, 행렬 곱(matmul)을 가속하기 위한 아키텍처 혁신을 제안한다.
  • 실제 모델에서 FPGA 하드웨어상에서의 실행 가능성 및 성능/에너지 이점을 입증한다.

제안 방법

  • W8A8 정밀도로 긴 컨텍스트 LLM의 동적 희소 prefill을 위한 최초의 FPGA 가속기인 FAST-Prefill을 제안한다.
  • 증분 축적을 통해 큰 중간 텐서를 제거하는 스트리밍 가능한 메모리 인지 SIGU(Sparse Index Generation Unit)을 구현한다.
  • 오프칩 메모리 트래픽을 줄이고 KV 재사용을 개선하기 위해 생존성 주도 이중 계층 KV 캐시(Hot/Cold)를 설계한다.
  • INT-8 매트멀을 위한 DSP 기반 산술과 비트 평면(LUT 기반) 산술을 결합한 하이브리드 매트릭스 처리 유닛(MPU)을 개발한다.
  • 레이어를 따라 스트리밍하는 동안 희소 인덱스 생성을 정확하게 유지하기 위해 128-토큰 청크 단위로 처리하고 배리어가 채워진 파이프라인을 사용한다.
  • Xilinx Alveo U280에서 Nvidia A5000과 비교 평가하고 Llama 및 Qwen 모델을 4K–128K 컨텍스트 길이로 사용하여 TTFT 및 에너지 효율을 보고한다.
Figure 1 : FAST-Prefill Architecture
Figure 1 : FAST-Prefill Architecture

실험 결과

연구 질문

  • RQ1W8A8 정밀도로 긴 컨텍스트 prefill에 대해 FPGA에서 동적 희소 어텐션을 효율적으로 가속할 수 있는가?
  • RQ2FPGA에서 큰 중간 텐서를 피하기 위해 희소 인덱스 생성을 누적과 어떻게 융합할 수 있는가?
  • RQ3동적 희소성 패턴에서 높은 KV 재사용을 지속시키려면 어떤 캐시 설계 및 메모리 계층구조가 최적인가?
  • RQ4비트 평면과 DSP 기반 매트멀을 결합한 하이브리드 MPU가 INT-8 계산의 처리량을 향상시키는가?

주요 결과

  • FAST-Prefill은 GPU 기반 동적 희소 prefill 구현 대비 최대 1.2–2.5x TTFT 향상을 달성한다.
  • FAST-Prefill은 GPU 기준 대비 최대 4.5x 에너지 효율을 제공한다.
  • 생존성 기반의 이중 계층 KV 캐시는 약 65% 히트율을 제공하여 오프칩 접근을 줄이고 KV 재사용을 개선하며 캐시 없는 설계 대비 TTFT를 약 2.5x 개선한다.
  • 하이브리드 MPU는 DSP-전용 MPU에 비해 약 1.8x 지연을 개선하고 LUT의 유휴를 방지한다.
  • 스트리밍 희소 인덱스 생성과 누적의 융합으로 큰 중간 결과물(≈4KB vs ≈4GB)을 물리적으로 만들지 않아 대역폭 효율적인 동작을 가능하게 한다.
  • Flex-Prefill 기준선과 비교하여 INT-8로 양자화될 때 RULER 벤치마크에서 W8A8-FAST-Prefill이 유사한 정확도를 유지한다.
Figure 2 : Prefill Workflow with Sparse Attention
Figure 2 : Prefill Workflow with Sparse Attention

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.