← Latest papers
🤖 machine learning

LRAgent: Efficient KV Cache Sharing for Multi-LoRA LLM Agents

LRAgent is a KV cache sharing framework for multi-LoRA LLM agents that decomposes caches into shared base and low-rank adapter components, utilizing a novel Flash-LoRA-Attention kernel to significantly reduce memory and compute overhead while maintaining high accuracy and throughput.

Original authors: Hyesung Jeon, Hyeongju Ha, Jae-Joon Kim

Published 2026-06-02
📖 4 min read☕ Coffee break read

Original authors: Hyesung Jeon, Hyeongju Ha, Jae-Joon Kim

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine a team of specialized detectives working together to solve a complex mystery. Each detective has a unique skill set: one is great at planning, another is an expert at gathering clues (using tools), and a third is a master at reviewing the evidence to make sure the answer is right.

In the world of Artificial Intelligence, these detectives are "LLM Agents." To make them good at their specific jobs, we give them a shared "brain" (a large pre-trained model) but attach a small, custom "notebook" (called a LoRA adapter) to each one. This notebook teaches them their specific role without needing to retrain their entire brain.

The Problem: Too Many Notebooks

The trouble arises when these detectives work on a long, complicated case together. They all need to remember the same long list of clues and conversations (the "context").

In a standard setup, every detective keeps their own full copy of the memory of everything that has happened so far. Even though they are looking at the exact same clues, Detective A writes them down in their notebook, Detective B writes them down in theirs, and Detective C does the same.

  • The Result: The team runs out of desk space (memory) very quickly, and it takes a long time to write everything down again and again (computation overhead).

Existing solutions tried to share the memory, but they were like trying to merge three different languages into one dictionary without losing the unique slang each detective uses. It was messy and often made the detectives less accurate.

The Solution: LRAgent

The authors of this paper, LRAgent, realized something clever:

  1. The Shared Brain: The part of the memory that comes from the main "brain" is almost identical for everyone. It's the basic facts.
  2. The Custom Notebook: The only real difference between the detectives is the tiny, specific notes added by their custom "notebooks" (the LoRA adapters).

Instead of copying the whole memory for everyone, LRAgent splits the memory into two parts:

1. The "Base Cache" (The Shared Blueprint)

Since the main brain's memory is the same for everyone, the team only writes this down once. All three detectives point to this single, shared blueprint. This saves a massive amount of desk space.

2. The "LR Cache" (The Tiny Sticky Notes)

The custom notes from the LoRA adapters are very small and specific. Instead of writing them out in full sentences, LRAgent stores them in a highly compressed, "low-rank" format (like a tiny sticky note that says "add a hint of sarcasm" rather than writing out the whole sarcastic paragraph).

  • BaseShared: This method shares the big blueprint and keeps a tiny sticky note for each detective.
  • BaseLRShared: This is the super-efficient version. If the detectives use a specific setup where their "down-projection" (the way they read the clues) is identical, they can even share the sticky notes! They only need to apply their unique "up-projection" (the final touch) when they actually speak.

The Magic Trick: Flash-LoRA-Attention

You might ask: "If the notes are compressed, doesn't it take extra time to expand them back to full sentences when needed?"

Usually, yes. But the authors invented a special tool called Flash-LoRA-Attention.
Think of it like a chef who doesn't need to fully cook a giant pot of soup just to taste a single spoonful. Instead of expanding the tiny sticky note into a full paragraph before using it, this tool rearranges the math. It applies the tiny note directly to the shared blueprint while it's being processed.

  • The Benefit: It avoids the heavy lifting of expanding the memory, making the team work almost as fast as if they were sharing the entire memory, but with the accuracy of having their own custom notes.

The Results

The paper tested this on a "detective team" solving hard riddles (like HotpotQA and ScienceQA).

  • Accuracy: The team solved riddles just as well as if they had kept their own full, separate memories. They didn't lose any smarts.
  • Speed & Space: They used significantly less computer memory (about 1/3rd of the usual amount) and finished tasks much faster, especially when the cases got very long.

In short: LRAgent is a smart way for a team of AI specialists to share their memory. They keep the common facts in one shared file and only store their unique, tiny differences in a compressed format, allowing them to work together faster and cheaper without losing their individual expertise.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →