Skip to main content
QUICK REVIEW

[논문 리뷰] LRAgent: Efficient KV Cache Sharing for Multi-LoRA LLM Agents

Hyesung Jeon, Hyeongju Ha|arXiv (Cornell University)|2026. 02. 01.
Multimodal Machine Learning ApplicationsComputer Science인용 수 0
한 줄 요약

LRAgent는 KV 캐시를 공유 기본 구성요소와 어댑터 특정 저랭크 구성요소로 분해하여 다 LoRA LLM 에이전트 간 메모리 및 계산 효율적인 KV 캐시 공유를 가능하게 하고, 런타임 재구성을 가속하는 Flash-LoRA-Attention 커널을 제공합니다.

ABSTRACT

Role specialization in multi-LLM agent systems is often realized via multi-LoRA, where agents share a pretrained backbone and differ only through lightweight adapters. Despite sharing base model weights, each agent independently builds and stores its own KV cache for the same long, tool-augmented trajectories, incurring substantial memory and compute overhead. Existing KV cache sharing methods largely overlook this multi-LoRA setting. We observe that, across agents, cache differences are dominated by adapter outputs, while activations from the shared pretrained backbone remain highly similar. Based on this observation, we propose LRAgent, a KV cache sharing framework for multi-LoRA agents that decomposes the cache into a shared base component from the pretrained weights and an adapter-dependent component from LoRA weights. LRAgent reduces memory overhead by sharing the base component and storing the adapter component in its inherent low-rank form, and further reduces compute overhead, enabled by shared-$A$ multi-LoRA architectures, by also sharing the low-rank cache and avoiding redundant computations for contexts already processed by other agents. To efficiently reconstruct adapter contributions at runtime, we introduce Flash-LoRA-Attention, a kernel that reorders attention computation to avoid materializing the low-rank cache to full dimension. LRAgent achieves throughput and time-to-first-token latency close to fully shared caching, while preserving accuracy near the non-shared caching baseline across agentic question-answering benchmarks.

연구 동기 및 목표

  • 다-LoRA 에이전트 시스템에서 각 에이전트 KV 캐시가 겪는 메모리 및 계산 병목을 동기화한다.
  • KV 캐시에서 베이스 기여와 어댑터 기여를 분리하는 캐시 공유 프레임워크를 제안한다.
  • 공유-다운 프로젝션이 다중 에이전트 설정에서 메모리 감소 및 추론 속도 향상을 어떻게 가능하게 하는지 보여준다.

제안 방법

  • 전체 KV 캐시를 사전 학습 가중치로부터의 공유 베이스 캐시와 LoRA 가중치로부터의 어댑터 의존 LR 캐시로 분해한다.
  • 어댑터 출력은 저랭크 형태로 저장하고 런타임에 업-프로젝션 행렬을 통해 재구성한다.
  • 메모리 및 계산 이득을 극대화하기 위해 BaseShared 및 BaseLRShared 캐시 공유 스킴을 도입한다.
  • 저랭크 캐시를 전체 차원으로 구체화하는 것을 피하기 위해 주의력 계산의 재정렬 및 Flash-LoRA-Attention을 개발한다.
  • LR 캐시를 더 공유하고 재계산을 줄이기 위해 공유-A 다중-LoRA 아키텍처를 활용한다.
Figure 1 : (Left) Relationship between the full cache, base cache, and adapter output. (Right) Layer-wise pairwise cosine similarity of the base and full caches, measured on the same context across three agent pairs using 128 samples of 2k tokens from the HotpotQA dataset.
Figure 1 : (Left) Relationship between the full cache, base cache, and adapter output. (Right) Layer-wise pairwise cosine similarity of the base and full caches, measured on the same context across three agent pairs using 128 samples of 2k tokens from the HotpotQA dataset.

실험 결과

연구 질문

  • RQ1KV 캐시를 다 LoRA 튜닝된 다수의 에이전트 간에 정확도 손실 없이 효과적으로 공유할 수 있는가?
  • RQ2다중-LoRA KV 캐시에서 베이스 기여와 어댑터 기여를 분리했을 때 얼마만큼의 메모리 및 계산이 절감되는가?
  • RQ3공유-다운 프로젝션(shared-A)이 메모리 및 런타임의 추가 감소를 가능하게 하는가?
  • RQ4런타임 재구성 커널(Flash-LoRA-Attention)이 LR-캐시 확장 오버헤드를 완화시킬 수 있는가?
  • RQ5BaseShared와 BaseLRShared가 처리량과 대기 시간 면에서 완전한 공유 캐시와 얼마나 근접하는가?

주요 결과

  • BaseShared는 비공유 방식에 비해 KV 캐시 메모리를 약 1/N로 축소하면서도 정확도는 비공유 기준선에 근접하게 유지한다.
  • BaseLRShared는 더 나아가 메모리를 축소하고 LR-캐시 프리필 오버헤드를 제거하여 완전히 공유된 캐시와 유사한 계산 성능을 달성한다.
  • Flash-LoRA-Attention은 LR-캐시 확장 오버헤드를 감소시켜 런타임을 크게 가속화하고 구성에 따라 처리량을 최대 1.24–2.46배 증가시킨다.
  • HotpotQA와 ScienceQA 전반에 걸쳐 BaseShared와 BaseLRShared는 비공유 대비 평균 감소폭이 각각 최대 0.7%와 1.5%에 그치며, FullShared 및 DroidSpeak보다 평균적으로 더 나은 성능을 보인다.
  • BaseLRShared는 TTFT 감소를 최대 4.44배까지 달성하고 처리량 이득이 FullShared에 근접하며, BaseShared는 TTFT 감소 최대 1.63배 및 주목할 만한 처리량 이득을 달성한다.
  • 평가된 모델들 전반에서 LR 캐시는 에이전트 간 코사인 유사도가 높게 나타나 공유 LR-캐시 전략의 타당성을 뒷받침한다.
Figure 2 : Agent iteration and cache accumulation for Non-Shared, BaseShared , and BaseLRShared . $\mathrm{T0}$ denotes the system prompt shared across agents, and $\mathrm{T}i$ denotes trajectory context blocks, formed by concatenating model-generated tokens and retrieved context from external sour
Figure 2 : Agent iteration and cache accumulation for Non-Shared, BaseShared , and BaseLRShared . $\mathrm{T0}$ denotes the system prompt shared across agents, and $\mathrm{T}i$ denotes trajectory context blocks, formed by concatenating model-generated tokens and retrieved context from external sour

이 논문 읽기

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

누빈트에서 이 논문 읽기

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