PyTorchKR Papers

최신 논문

총 3편
태그·기간 등 상세 필터

카테고리 탐색

로그인 후 이 태그 구독

arXiv:2407.00079v5cs.DC공식 코드 · Papers with Code

Mooncake: LLM 서빙을 위한 KVCache 중심의 분리형 아키텍처

Mooncake: A KVCache-centric Disaggregated Architecture for LLM Serving

Mooncake은 Moonshot AI가 제공하는 주요 대규모 언어 모델(LLM) 서비스인 Kimi의 서빙 플랫폼입니다. Mooncake은 prefill 클러스터와 디코딩(decoding) 클러스터를 분리하는 KVCache 중심의 분리형(disaggregated) 아키텍처를 특징으로 합니다. 또한 GPU 클러스터에서 충분히 활용되지 않는 CPU, DRAM, SSD 자원을 활용하여 KVCache의 분리형 캐시를 구현합니다. Mooncake의 핵심은 KVCache 중심 스케줄러로, 지연 시간(latency) 관련 서비스 수준 목표(Service Level Objective, SLO)를 충족하면서 전체 유효 처리량(throughput)을 최대화하는 균형을 맞춥니다. 모든 요청이 처리될 것이라고 가정하는 기존 연구들과 달리, Mooncake은 과부하가 매우 심한 상황으로 인한 문제에 직면합니다. 이를 완화하기 위해 우리는 예측 기반 조기 거부(early rejection) 정책을 개발했습니다. 실험 결과 Mooncake은 긴 컨텍스트(long-context) 상황에서 뛰어난 성능을 보입니다. 기준선(baseline) 방법과 비교하여, Mooncake은 특정 시뮬레이션 상황에서 SLO를 준수하면서도 처리량을 최대 525%까지 증가시킬 수 있습니다. 실제 워크로드에서 Mooncake의 혁신적인 아키텍처는 Kimi가 75% 더 많은 요청을 처리할 수 있게 합니다.

arXiv:2607.01831v1cs.DC

Lynx: Progressive Speculative Quantization for accelerating KV Transfer in Long-Context Inference

Long-context inference is increasingly common in large language model (LLM) serving, driven by retrieval-augmented generation and agentic systems. In disaggregated inference, these workloads require transferring large Key-Value (KV) caches across the network, where decoding cannot begin until the transfer completes. Recent KV quantization techniques reduce data volume and alleviate this bottleneck, but existing schemes fail to achieve both low network-exposed latency and high inference accuracy. We challenge the assumption that the KV cache is an indivisible unit that must be fully received before use. We leverage the observation that different bits in the KV cache contribute unequally to attention computation and inference precision: the most significant bits capture the coarse structure of attention and the least significant bits refine precision. This property enables partial use of the KV cache during decoding. We present Lynx, a system that enables progressive, split-stream KV transfer by partitioning the KV cache into a high-priority Anchor stream carrying the most significant bits and a low-priority Residual stream carrying remaining precision. Decoding begins upon receipt of the Anchor stream and proceeds speculatively while the Residual stream is transferred concurrently, followed by verification that ensures equivalence to higher-precision decoding. Across multiple models and serving workloads, Lynx achieves Time-to-First-Token (TTFT) comparable to aggressive 4-bit KV quantization, while matching the accuracy of high-precision (BF16) inference, improving TTFT over standard 8-bit KV quantization by up to $1.43\times$ and improving accuracy over state-of-the-art by up to $5.1\%$.

arXiv:2606.17081v1cs.AR

비집약형 추론(Disaggregated Inference)에서의 무정부 상태의 대가(Price of Anarchy)

The Price of Anarchy in Disaggregated Inference

비집약형 추론 아키텍처는 프리필(prefill)과 디코드(decode) 단계를 물리적으로 분리하여 별도의 GPU 풀에 배치함으로써, 고정된 하드웨어 예산을 공유하는 경쟁하는 "에이전트(agent)"를 생성합니다. 본 연구는 NVIDIA Dynamo를 구체적인 사례 연구로 사용하여, 우리가 아는 한 이 아키텍처에 대한 최초의 공식적인 게임 이론적 분석을 제공합니다. 우리는 비집약형 서빙을 세 가지 결합된 게임으로 모델링합니다: 프리필과 디코드 풀 간의 2인 자원 게임, 계층적 KV 캐시에 대한 이기적인 캐싱 게임, 그리고 요청 라우팅을 위한 긍정적 외부 효과가 있는 혼잡 게임입니다. 우리는 후자의 두 가지를 실증적으로 검증하며, P/D 자원 게임은 분석적으로 다룹니다(9.2절). 우리는 GPU 포화 상태가 게임의 보상 구조를 변화시키는 레짐 전이를 유도하는 방식을 특성화합니다: 포화 상태 미만에서는 이기적인 행동이 제한된 무정부 상태의 대가(PoA)를 가지며, 포화 상태에서는 초선형 지연 시간과 캐시 외부 효과로 인해 우리의 실증적 추정량인 PoA-hat(6.4절에서 정의)이 상승합니다. 이 분석을 기반으로, 우리는 포화 전이를 실시간으로 감지하고 그에 따라 라우팅 파라미터를 조정하여 캐시 선호도 활용(cache-affinity exploitation)에서 부하 분산 혼잡 회피(load-balanced congestion avoidance)로 전환하는 적응형 컨트롤러를 설계합니다. 우리는 두 가지 모델인 Nemotron-4-340B(TP=8, InfiniBand 간 KV 전송을 사용하는 전체 노드 워커)과 Llama-3.1-70B(TP=4)를 사용하여 Dynamo를 실행하는 3노드 NVIDIA B200 클러스터에 프레임워크를 구현했으며, 두 모델 모두에서 동일한 첫 번째 무릎 이후 그리드 지점(C=128)을 가진 동일한 3단계 레짐 PoA-hat 구조를 발견했습니다. 적응형 라우팅은 각 모델을 더 나은 운영 지점으로 이동시킵니다. 가장 강력한 결과는 70B 1P/5D 토폴로지에서 나타났으며, 여기서 포화 단계에서 PoA-hat이 13%의 처리량 비용으로 3.1배(66.4에서 21.5로) 감소했습니다. 70B 1P/2D에서는 PoA-hat이 2.2배 감소하고 TTFT P99가 7.6배 감소했습니다(8.5절 참조).