Toward Zero-Cost Scaling of Multi-LoRA Serving on Causal Encoder–Decoder Models
- Publish
LoRA lets one model serve many specialists, but in serving it taxes every token. Our serving stack avoids most of that per-token overhead: every LoRA shares one KV cache, prefill carries zero adapter weight, and decode stops paying for how many LoRAs the batch happens to mix. A production replay with a LoRA named on every request holds the 1,000 RPM target, and an adapter swaps in 0.2 s.
TL;DR
- One KV copy serves every LoRA. Every persistent KV byte is written before any adapter is applied, so a thousand LoRAs share a single prefix cache. A request that switches LoRA keeps the cache it already built, and the pool holds one copy of a prefix instead of one per adapter.
- Prefill never sees an adapter. A prefill instance loads the encoder and zero bytes of adapter weight, so the two pools scale independently (1P:ND). The prompt tail that does need an adapter rides decode's existing verification loop, which is why it adds no step.
- FusedMoL computes each token's LoRA update inside the decode kernels. Each token names its LoRA the way it names an expert, and the low-rank update is computed inside the kernels that consume it. No per-token weight copy, no separate GEMM per projection, no reduction padded to the resident set — so each additional resident LoRA adds single digits to low teens of a percent per step, not a multiple.
- The adapter tax falls from 40–100% to 12–19%, and from over 60% to under 14% once the batch mixes adapters. An ordinary multi-LoRA path pays 40–100% per decoded token on the base model, and more than that under load — past 100% at high concurrency. Mixing five adapters already costs GLM-5.3 MoL more than 60% per step against a single adapter. Here sixteen mixed adapters cost 6.8–13.4% against one, and prefill pays nothing at all.
- A production replay holds the 1,000 RPM target with a LoRA named on every request. We replay 3,074 real chat requests, each naming one of sixteen adapters without regard to its content. The steady window sits at 989–998 requests per minute — level with the same stack serving base traffic only — and completion throughput does not move.
Dilemma in Multi-LoRA Serving
A single language model can be specialized through post-training for scientific or financial tasks. Deploying each specialist separately, however, requires a full set of model weights for each one. Low-rank adaptation (LoRA) [4] keeps the base weights frozen and represents each specialization with a lightweight adapter. This makes multi-LoRA serving possible: one engine shares the base weights across specialists and batches requests that use different adapters. The model is thereby fixed and the adapter becomes a per-request attribute. The part this does not solve is the batch: once requests in the same decode step carry different adapters, the engine has to apply different low-rank updates to the same base weights, token by token.
- Switching LoRAs can invalidate a request’s cached prefix. When different LoRAs modify weights along the KV-producing path, the same token prefix can yield different key and value tensors. A request that switches adapters cannot reuse the cached KV where those tensors would differ under the target adapter. On DeepSeek-V4.1-Flash [2, 3], we apply LoRA only to the decoder and keep the encoder and layer-20 global KV writers frozen [12]. This preserves persistent global KV across adapter switches, leaving only the local sliding-window state to rebuild [13].
- Resident adapter weights compete with KV cache for GPU memory and complicate PD scaling. In our 16-slot configuration, adapter expert tables alone occupy 27.95 GB per decode GPU, reducing the memory available for KV. Replicating adapter weights across the two pools also reduces prefix-cache capacity on prefill and restricts routing to replicas with the requested adapter in each pool. Scaling either pool then requires coordinating adapter placement across prefill and decode.
- Mixed-LoRA serving adds batching and decode overhead. Unmerged LoRA adds a low-rank update at each adapted projection. Serving tokens that use different adapter weights in the same batch presents an additional challenge. Unfused updates can also add kernel launches and memory traffic [5, 7]. At 132 DSpark verification tokens, our gather-and-BMM baseline stages about 13 GB of per-token weight copies per step and adds 38 LoRA kernel nodes per decoder layer.
FusedMoL: Fusing Multi-Slot LoRA in the Decode Engine
On decode the batch mixes adapters: every token belongs to a request, and every request names one of the resident adapters, or none. The work is to apply the right low-rank update to the right token, inside a step whose shape never changes — the same captured graph, the same six verified tokens per request, the same resident planes. Decomposed implementations pay for that three ways: per-token weight copies into HBM, a separate kernel per projection site, and reductions padded to the number of resident planes. We removed all three.
One stack, one pass per token
We call the stack FusedMoL, by analogy with the base model's FusedMoE: both compute a sparse, per-token contribution inside the kernel that consumes it, instead of materialising it and adding it afterwards. The consequence is a decode step whose cost no longer tracks how many adapters the batch happens to mix.
Pointer-stable slots and in-place swaps
Adapters arrive in two shapes: our own exports are bfloat16 and already restricted to the decoder half, while a Tinker checkpoint is float32 over all forty layers and is read down to the decoder half on load. The measurements below use the larger of the two, so every footprint quoted here is the pessimistic one. The engine reports 1.75 GB per slot and 27.95 GB for sixteen slots on each GPU — about a tenth of a B300 (Table 2).
| Quantity | Value |
|---|---|
| Checkpoint on disk, F32, decoder half | 6.96 GB |
| Expert tables per slot, per decode GPU | 1.75 GB |
| 16 resident slots, per decode GPU | 27.95 GB (10.2% of 275 GB) |
| 16 resident slots, 4-GPU decode instance | ~112 GB |
Table 2. Adapter residency, from the engine's own startup accounting. A second unit, rebuilt from a snapshot of this one, prints the same line (slots=16 per_slot=1.75 GB resident=27.95 GB), so this is not a property of a single machine.
All planes are allocated once at startup at fixed addresses, and the decode graphs are captured against those addresses. Loading or unloading writes into a plane in place and updates a name-to-slot table on the host: nothing is reallocated.
Production Evaluation
Everything below is measured on one 1P:1D serving unit: an encoder-only prefill over four GPUs paired with a decode instance over four GPUs carrying sixteen resident planes, with the rest of the pool served from storage on demand. Every number comes from that unit and is reported per unit, so capacity and latency scale with the number of units. Two runs of the same arm reproduce to 0.4% on request rate and 0.1 ms on per-token latency; across units the same arm spreads to about 2% and 0.9 ms, and the tables carry those wider bands.
A 1,000 RPM replay of long-context production traffic
The replay is 3,074 production chat requests, pushed at a target of 1,000 RPM with each request's original sampling parameters. It is a long-context workload and a single-turn one: prompt length runs from 4K to 373K tokens with a median of 140K, and the median conversation has one user turn (Table 3). Five requests in six arrive with more than 65K tokens of context and 19% exceed 262K, which is why prefix reuse rather than prefill arithmetic decides the throughput ceiling: one pass over the corpus moves about 419M prompt tokens, and any adapter-specific duplication of cached state is paid on all of it. Replies are short by comparison, 259 tokens at the median and 271 on average.
| Prompt length (tokens) | Requests in sample | Share |
|---|---|---|
| 1–4K | 25 | 3.1% |
| 4–16K | 0 | 0.0% |
| 16–65K | 106 | 13.2% |
| 65–262K | 520 | 65.0% |
| 262K–373K | 149 | 18.6% |
| All | 800 | 100% |
Table 3. Prompt-length distribution, from a tokenized sample of 800 of the 3,074 requests. Over the full corpus the mean is 136K tokens and the median 140K.
Each arm replays the same 3,074 request bodies through the same pipeline. In the base arm a body names no adapter; in the other arm the identical bodies name one of sixteen adapters in round-robin, so the only field that differs is the adapter. Both arms replay at the 1,000 RPM target. Each run's plateau is taken with the first 120 s and the last 60 s dropped; the two earlier arms were shorter and are counted at their own plateau.
| Arm | Runs | Sustained RPM | TPOT p50 | Completion tokens/min |
|---|---|---|---|---|
| base traffic | 3 | 972–988 | 11.1–12.0 ms | 264–270K |
| sixteen adapters | 4 | 989–998 | 13.1–13.4 ms | 265–270K |
Table 4. Throughput and per-token cost on the 1,000 RPM replay. Rates are the median of whole minutes in the flat part of each run, which is why they sit below the peak minute of 1,013–1,021; each range spans every run of that arm, on either unit and in either campaign. Completion tokens per minute counts the same requests by output length instead of arrival, so it is not an independent measurement.
The most recent pair on one unit reads 987.5 RPM for base traffic and 989.5 and 992.5 for two runs of sixteen adapters; the earlier campaign reads 972 and 986 for base and 994 and 998 for sixteen adapters. Sixteen adapters come in 0.2–0.4% above base in all four paired comparisons, which is far below the 2% band that one arm spans across runs, so we read the two as equal rather than as a gain. Per-token latency is a different matter. Base sits at 11.1–12.0 ms and sixteen adapters at 13.1–13.4 ms across all seven runs, and the paired gap is 1.4–2.1 ms on every unit and in every campaign; the seven kernels read from sixteen weight planes instead of one. Completion tokens per minute follow the same story, 264–270K in both arms.
We report time to first token separately for each load level, because it varies with the number of active requests per decode rank rather than with the adapters: with 14–21 requests running per DP rank and an empty queue, both arms sit at 2.7–3.1 s; with a shallow batch of 1–5 they sit at 1.3–2.3 s. Within either regime sixteen adapters add 0.10–0.15 s, consistently, across all seven runs. Most of the absolute value is the prefill of a 140K-token prompt plus a request's share of the prompt-tail slices.
Controlled concurrency sweep
The replay has time-varying prompts and a hit rate that drifts with them, so we also sweep concurrency on a fixed workload: 36,864-token contexts, 512-token outputs, and 8 to 128 requests per decode rank — 32 to 512 concurrent requests on one decode instance. To keep the tail out of the measurement we take the window after every request has finished its replay and no request is waiting on a transfer (Table 5, Figure 3).
| R (total) | T = 6R | base, 16 slots armed | 1 adapter | 4 adapters | 16 adapters | 16 vs. 1 adapter |
|---|---|---|---|---|---|---|
| 8 (32) | 48 | 21.75 ms | 23.21 ms | 23.84 ms | 24.78 ms | +6.8% |
| 16 (64) | 96 | 25.17 ms | 27.06 ms | 27.90 ms | 28.98 ms | +7.1% |
| 32 (128) | 192 | 31.02 ms | 33.99 ms | 35.00 ms | 37.01 ms | +8.9% |
| 64 (256) | 384 | 41.09 ms | 45.04 ms | 47.98 ms | 50.02 ms | +11.1% |
| 128 (512) | 768 | 57.01 ms | 63.50 ms | 69.52 ms | 71.98 ms | +13.4% |
Table 5. Autoregressive step latency, 36,864-token contexts, after the prompt tail has drained.

Figure 3. Left: step latency across the sweep. Right: output throughput per GPU against per-request token rate.
Most of the growth between and is not LoRA at all: the 16-adapter row rises 25.24 ms and the base row 19.34 ms.
A profiler trace at both ends puts most of the kernel growth in the expert GEMM, and the mechanism is expert granularity: at small batches a third of the experts stay idle and cost almost nothing, while at large batches every expert is live in every layer, so each layer reads all of its expert weights.
The rest of the gap — +6.8% at the smallest batch, +13.4% at the largest — is locality: a single live adapter is reused out of L2, while sixteen live planes scatter the same reads. The two sections agree numerically: the replay's per-token latency times the measured accept length lands inside this sweep's band.
Capacity beyond HBM
Each decode instance keeps sixteen adapters in GPU memory. A request for a seventeenth adapter waits for a slot rather than failing: a mount costs a fraction of a second, and an adapter that has been evicted is swapped back on the next request and answered in under a second. How many adapters a unit can serve therefore stops being a question about HBM (Table 6).
| Action | Latency | What the running batch sees |
|---|---|---|
| Mount, copy already staged | 0.13 s | Base traffic is unaffected |
| Mount, first time on this unit | 0.25 s | Base traffic is unaffected; the next mount of it starts at 0.13 s |
| Unmount | 0.04 s | The slot falls back to the base model |
| Request for an evicted adapter | 0.74–0.80 s end to end | Served, not rejected |
Table 6. Online mount, unmount and swap-in, measured on a decode unit under background traffic. Latency is the end-to-end HTTP call; the right-hand column is what the other requests experience.
In a burst of seventeen distinct adapters against sixteen planes, all seventeen requests completed — the last one waits for a plane instead of failing. A restart does not reset the clock either: the first mount of an adapter costs the same 0.25 s as any later one, because what a mount computes once is kept. Across all of it the running batch sees no dropped request.
Conclusion
On DeepSeek-V4.1-Flash, we confine LoRA to the decoder and freeze the encoder and the layer-20 KV-writing projections. This keeps persistent global KV valid across adapter switches and lets requests using different adapters share cached prefixes. Adapter-free prefill can serve multiple decode instances, so the two pools can scale independently. Fed-tail rebuilds the adapter-specific sliding-window state in the existing decode verification graph, avoiding the scheduling bubbles of a separate replay pass.
On decode, FusedMoL makes the adapter a per-token attribute: each token names its slot, and the low-rank update is computed where it is consumed. The rewritten path cuts LoRA kernel nodes per decoder layer from 38 to seven, and preallocated planes at fixed addresses let adapters come and go on the same graph.
On one 1P:1D unit, the 3,074-request replay — a LoRA named on every request, chosen without regard to its content — holds the 1,000 RPM target, and completion throughput stays level with the same stack serving base traffic only. Adapters mount in 0.13–0.25 s and unmount in 0.04 s, and an adapter that has been evicted comes back in under a second: capacity follows storage rather than HBM.
Limitations and next steps
At high concurrency, sixteen simultaneously live planes cost 11–13% of step time against a single adapter. The profiler puts it down to thread blocks reading sixteen distinct weight planes through an L2 that cannot hold them, on top of an expert set that is fully live at that batch size.
Capacity now follows disk, with two specific limits. The first mount of an adapter on a unit requires a one-time build; when the active set substantially exceeds sixteen adapters, frequent swaps increase storage traffic. The step after this is to let a session move between adapters mid-conversation and keep every step at this cost.
Acknowledgments
We built our serving stack on the open-source implementation in SGLang and on DeepSeek’s DeepInfer project. We thank the contributors to both projects for their work and the SGLang and DeepInfer communities for their support.
References
[1] Macaron-V1: Towards Open Continual Learning with Self-Improvement and Mixture-of-LoRA (Mind Lab et al, 2026)
[2] DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence (DeepSeek-AI et al, 2026)
[3] DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compression (DeepSeek-AI et al, 2026)
[4] LoRA: Low-Rank Adaptation of Large Language Models (Hu et al, 2022)
[5] Punica: Multi-Tenant LoRA Serving (Chen et al, 2023)
[6] SGLang: Efficient Execution of Structured Language Model Programs (Zheng et al, 2024)
[7] S-LoRA: Serving Thousands of Concurrent LoRA Adapters (Sheng et al, 2023)
[9] Mooncake: A KVCache-centric Disaggregated Architecture for LLM Serving (Qin et al, 2024)
[10] Fast Inference from Transformers via Speculative Decoding (Leviathan et al, 2023)
[11] DroidSpeak: KV Cache Sharing Across Fine-Tuned Model Variants (Liu et al, 2026)
[12] Adapting Causal Encoder–Decoder Models with LoRA (Chiang et al, 2026)
[13] Serving Causal Encoder–Decoder Models with MoL2 (Zhou et al, 2026)
[14] Feat: deepseek-v4.1: Encoder-only prefill for PD (--dsv41-encoder-only-prefill) (sgl-project/sglang #45265, open)
[15] Feat: dsv41: Support encoder-only prefill for PD disaggregation (sgl-project/sglang #40874, open)
[16] Perf: deepseek-v4.1: Feed encoder-only decode tails through DSpark verify steps (sgl-project/sglang #46727, closed as a stale draft)
[17] Perf: dsv41: Run the decoder tail only over the prompt's last window (sgl-project/sglang #46152, open)
[18] Feat: Run encoder SWA bounded replay on PD prefill workers (sgl-project/sglang #44952, merged)
[19] Perf: deepseek-v4.1: Run encoder SWA bounded replay in the breakable prefill graph (sgl-project/sglang #44930, merged)
Citation
@misc{li2026ced_zero_cost_mol,
author = {Smith Li and Song Cao and Yuhua Zhou and Kieran Liu and Adrian Zhou and Andrew Chen and Pony Ma and {Mind Lab}},
title = {Toward Zero-Cost Scaling of Multi-LoRA Serving on Causal Encoder–Decoder Models},
year = {2026},
howpublished = {Mind Lab: A Lab for Experiential Intelligence},
note = {https://macaron.im/mindlab/research/toward-zero-cost-scaling-of-multi-lora-serving-on-causal-encoder-decoder-models},
}
