Abstract
Modern AI workflows increasingly rely on multi-adapter Large Language Model (LLM) architectures, where specialized Low-Rank Adaptation (LoRA) modules are swapped dynamically. However, switching adapters typically invalidates the Key-Value (KV) cache, leading to redundant recomputations and high latency. This paper introduces "Activated LoRA" (aLoRA) and a modified vLLM serving engine that enables cross-model KV-cache reuse. By ensuring identical prefix representations between base models and adapters, the system achieves up to a 58x reduction in end-to-end latency and over 100x improvement in Time-to-First-Token (TTFT) for long-context requests.
Introduction
In agentic workflows and multi-turn conversations, a single base model often utilizes multiple LoRA adapters for specialized tasks such as coding, safety filtering, or tool use. A significant bottleneck in current serving systems is the "prefill" stage: whenever an adapter is switched, the system treats it as a distinct model, forcing a full recomputation of the KV-cache for the entire conversation history. This process is computationally expensive and scales poorly with sequence length.
Methodology: Activated LoRA and vLLM Integration
The proposed solution bridges the gap between model specialization and system efficiency through two primary innovations.
Activated LoRA (aLoRA)
Standard LoRA modifies model weights across all tokens. In contrast, aLoRA is designed to remain identical to the base model until a specific "activation sequence" is encountered. Since the weights are identical for the prefix of the prompt, the resulting KV-cache for those tokens is also identical across the base model and any aLoRA adapter.
vLLM Serving Engine Enhancements
The researchers integrated these concepts into the vLLM framework, a high-throughput LLM serving engine known for its PagedAttention mechanism.
Key modifications include:
- Base-Aligned Hashing: Standard vLLM incorporates the "Adapter ID" into its cache hashing logic, preventing different adapters from sharing memory blocks. The authors modified this logic to ignore the Adapter ID for "pre-activation" tokens, allowing the KV-Cache Manager to hit existing blocks in the Block Tables.
- Activation-Aware Masking: A custom forward pass uses a bitmask to apply adapter weights only to tokens following the activation point, maintaining mathematical consistency while enabling cache sharing.
Experimental Evaluation
The system's performance was evaluated using Granite 3.2 (8B), Llama 3.3 (70B), and Mistral Large 2 (123B) models. The workloads simulated complex multi-turn pipelines where a base model's output is processed by an adapter-specialized critic.
Key Results
- Latency and TTFT: The system demonstrated a 58x reduction in end-to-end latency for synchronous pipelines. Time-to-First-Token (TTFT) improved by over 100x for long contexts, as the expensive prefill stage was bypassed.
- Cache Efficiency: For 1024-token prompts, the aLoRA-enhanced system achieved an 84% cache hit rate, compared to 0% for standard LoRA serving, which suffers from total cache invalidation upon adapter switching.
- Throughput: By eliminating redundant computations, the system avoids "head-of-line blocking" and maintains high throughput even under heavy asynchronous loads.
Discussion and Future Work
The benefits of aLoRA and cross-model cache reuse scale with model size and sequence length, making it particularly effective for modern long-context applications. While aLoRA may require a slightly higher rank ($r$) during training to match standard LoRA's accuracy, the inference overhead is negligible.
Future research directions include optimizing batching for multiple different adapters that share a common prefix and validating the system on diverse real-world agentic benchmarks. This work represents a significant step toward making complex, multi-model AI systems responsive enough for real-time interaction.
Summary updated