LoRA adapter routing in llm-d lets multiple fine-tuned models share a single GPU deployment -- slashing costs and eliminating resource fragmentation.
Traditional deployments need one GPU per fine-tuned model. As teams multiply adapters for legal, medical, code review, and support -- costs spiral and GPUs sit idle.
Low-Rank Adaptation keeps the base model frozen and trains only tiny adapter matrices -- typically 2-5% of model size. Multiple adapters share one base model on a single GPU.
The foundation weights stay unchanged. Only adapter matrices are trained and swapped.
Each adapter adds minimal parameters. Store dozens of adapters alongside one base model.
Adapters load and unload in milliseconds. No model reload, no cold start.
The Endpoint Picker scores every pod for each incoming request -- balancing adapter affinity, KV cache warmth, queue depth, and GPU headroom to find the optimal target.
Score = affinity(0.50) + cache(0.20) + load(0.15) + gpu(0.15)
Routes requests to pods that already have the needed adapter loaded -- avoiding costly swap operations.
Prefers pods with warm KV cache for the adapter, enabling faster time-to-first-token.
Considers queue depth and GPU utilization to avoid overloading any single pod.
Benchmarked with 5 LoRA adapters on Llama 3.1 70B. Smart EPP routing vs naive round-robin across swap rate, latency, and cache efficiency.
From API gateway through the EPP router, requests flow to pods running vLLM with hot-swappable LoRA adapters. The routing sidecar reports adapter state back to EPP.
Enable LoRA routing in llm-d with a few lines of YAML. The EPP handles adapter-aware scoring automatically.
apiVersion: inference.llm-d.ai/v1alpha1
kind: LLMInferenceService
spec:
model: llama-3.1-70b
adapters:
maxSlots: 4
spec:
routing:
strategy: lora-affinity
scoringWeights:
adapterAffinity: 0.50
kvCacheMatch: 0.20
spec:
adapters:
- name: legal-assistant-v2
source: huggingface/legal-lora
- name: code-reviewer-xl
source: huggingface/code-lora
spec:
replicas: 6
adapters:
maxSlots: 4
preloadStrategy: demand