RelayGR: 크로스-스테이지 릴레이-레이스 추론을 통한 장문 시퀀스 생성형 추천 시스템 확장
RelayGR: Scaling Long-Sequence Generative Recommendation via Cross-Stage Relay-Race Inference
실시간 추천 시스템은 엄격한 지연 시간 목표(SLO) 하에서 여러 단계를 거치는 복잡한 과정을 수행하며, 특히 랭킹 단계에서는 수십 밀리초라는 매우 짧은 시간이 주어집니다. 생성형 추천(GR) 모델은 사용자의 행동 시퀀스를 활용하여 품질을 향상시킬 수 있지만, 실제 운영 환경에서는 랭킹 단계의 P99 지연 시간 제약으로 인해 온라인 시퀀스 길이에 제한이 있습니다. 우리는 GR 토큰의 대부분이 추천 후보 아이템과 독립적인 사용자 행동을 인코딩하고 있다는 사실을 발견했습니다. 이를 바탕으로, 사용자 행동의 초기 부분을 미리 추론하여 랭킹 과정에서 재사용함으로써 연산 부담을 줄일 수 있다는 아이디어를 떠올랐습니다. 이 아이디어를 실제 산업 규모로 구현하는 것은 쉽지 않습니다. 초기 부분 저장소는 여러 파이프라인 단계를 거쳐 최종 랭킹 인스턴스가 결정되기 전까지 유지되어야 하며, 사용자 그룹의 특성상 저장소 크기는 단일 장치를 훨씬 넘어갈 수 있습니다. 또한, 무분별한 사전 추론은 높은 QPS(Query Per Second) 환경에서 공유 자원에 과부하를 줄 수 있습니다. 우리는 GR을 위한 인-HBM 릴레이-레이스 추론을 가능하게 하는 프로덕션 시스템인 RelayGR을 개발했습니다. RelayGR은 장기 사용자 정보를 선택적으로 미리 추론하고, 해당 KV(Key-Value) 저장소를 요청 수명 주기 동안 HBM(High Bandwidth Memory)에 유지하며, 이후 랭킹 단계에서 원격 데이터 접근 없이 이를 활용할 수 있도록 합니다. RelayGR은 다음 세 가지 기술을 결합합니다. 1) 저장소 크기와 사전 추론 부하를 제한하면서도 위험도가 높은 요청만 처리하는 시퀀스 기반 트리거, 2) 보조 사전 추론 신호와 랭킹 요청을 동일한 인스턴스로 라우팅하여 저장소 생성 및 사용을 함께 수행하는 친화도 기반 라우터, 3) 서버 로컬 DRAM을 사용하여 짧은 기간 동안의 크로스-요청 재사용을 활용하고 불필요한 데이터 재로딩을 방지하는 메모리 기반 확장기. 우리는 RelayGR을 Huawei Ascend NPU에서 구현하고 실제 쿼리를 사용하여 평가했습니다. 특정 P99 SLO를 유지하면서, RelayGR은 최대 1.5배 더 긴 시퀀스를 지원하고, SLO 준수 처리량을 최대 3.6배 향상시켰습니다.
Real-time recommender systems execute multi-stage cascades (retrieval, pre-processing, fine-grained ranking) under strict tail-latency SLOs, leaving only tens of milliseconds for ranking. Generative recommendation (GR) models can improve quality by consuming long user-behavior sequences, but in production their online sequence length is tightly capped by the ranking-stage P99 budget. We observe that the majority of GR tokens encode user behaviors that are independent of the item candidates, suggesting an opportunity to pre-infer a user-behavior prefix once and reuse it during ranking rather than recomputing it on the critical path. Realizing this idea at industrial scale is non-trivial: the prefix cache must survive across multiple pipeline stages before the final ranking instance is determined, the user population implies cache footprints far beyond a single device, and indiscriminate pre-inference would overload shared resources under high QPS. We present RelayGR, a production system that enables in-HBM relay-race inference for GR. RelayGR selectively pre-infers long-term user prefixes, keeps their KV caches resident in HBM over the request lifecycle, and ensures the subsequent ranking can consume them without remote fetches. RelayGR combines three techniques: 1) a sequence-aware trigger that admits only at-risk requests under a bounded cache footprint and pre-inference load, 2) an affinity-aware router that co-locates cache production and consumption by routing both the auxiliary pre-infer signal and the ranking request to the same instance, and 3) a memory-aware expander that uses server-local DRAM to capture short-term cross-request reuse while avoiding redundant reloads. We implement RelayGR on Huawei Ascend NPUs and evaluate it with real queries. Under a fixed P99 SLO, RelayGR supports up to 1.5$\times$ longer sequences and improves SLO-compliant throughput by up to 3.6$\times$.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.