분산 LLM 서비스 환경에서 이론적으로 최적의 어텐션/FFN 비율
Theoretically Optimal Attention/FFN Ratios in Disaggregated LLM Serving
어텐션-FFN 분산(AFD)은 LLM 디코딩을 위한 새로운 아키텍처로, 상태 정보를 많이 사용하는 어텐션 연산(KV 캐시 기반)과 상태 정보를 사용하지 않는, 계산 집약적인 FFN 연산을 분리하고, 각 단계별 통신을 통해 연결합니다. AFD는 메모리와 컴퓨팅 리소스를 독립적으로 확장할 수 있도록 하지만, 어텐션/FFN 할당 비율에 따라 성능이 크게 달라집니다. 비율을 잘못 설정하면 단계별 병목 현상과 장비 유휴 시간이 발생할 수 있습니다. 본 연구에서는 rA-1F 토폴로지에서 AFD 번들을 설계하기 위한 분석적 프레임워크를 개발했습니다. 핵심적인 어려움은 어텐션 측의 작업량이 고정되지 않고, 토큰 컨텍스트가 증가하며, 요청이 다양한 길이로 지속적으로 유입되는 반면, FFN 측의 작업량은 집계된 배치 크기에 따라 안정적이라는 점입니다. 확률적 워크로드 모델을 사용하여 시스템 전체에서 평균 처리량을 최대화하는 최적의 어텐션/FFN 비율에 대한 폐쇄형 규칙을 도출했습니다. 실제 추적 데이터를 기반으로 AFD 시뮬레이션을 통해 이론적 결과를 검증한 결과, 다양한 워크로드에서 이론적으로 최적의 어텐션/FFN 비율이 시뮬레이션 결과와 10% 이내의 오차로 일치하며, 유휴 시간을 지속적으로 줄이는 것을 확인했습니다.
Attention-FFN disaggregation (AFD) is an emerging architecture for LLM decoding that separates state-heavy, KV-cache-dominated Attention computation from stateless, compute-intensive FFN computation, connected by per-step communication. While AFD enables independent scaling of memory and compute resources, its performance is highly sensitive to the Attention/FFN provisioning ratio: mis-sizing induces step-level blocking and costly device idle time. We develop a tractable analytical framework for sizing AFD bundles in an $r$A-$1$F topology, where the key difficulty is that Attention-side work is nonstationary-token context grows and requests are continuously replenished with random lengths-while FFN work is stable given the aggregated batch. Using a probabilistic workload model, we derive closed-form rules for the optimal A/F ratio that maximize average throughput per instance across the system. A trace-calibrated AFD simulator validates the theory: across workloads, the theoretical optimal A/F ratio matches the simulation-optimal within 10%, and consistently reduces idle time.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.