How does S-LoRA serve thousands of LoRA adapters concurrently on a single base model?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Explain how S-LoRA serves thousands of distinct LoRA adapters from one shared base model, including how the forward pass handles a batch where each request targets a different adapter.
Keep one base model resident, store thousands of small LoRA adapters in a paged pool, and apply each request's adapter inside one batched call via a segmented gather-scatter matmul.
Imagine a print shop with one giant printing press and thousands of small custom stamps. The press is expensive, so you keep exactly one and never swap it. Each customer brings a tiny stamp that tweaks the output just for them. You keep the popular stamps on the desk and the rest in a drawer, fetching one in a fraction of a second when needed. The clever part: when a batch of customers arrives, you run the big press once for everyone, then walk down the line applying each person's own stamp to just their page. Nobody waits for a separate press run. One press plus a drawer of cheap stamps serves a whole city of customers.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: why merging fails for multi-tenant + base resident plus paged adapters + segmented batched matmul (BGMV/SGMV) over heterogeneous rows + CPU paging for cold adapters + production economics.
| Strategy | GPU memory cost | Batch behavior | Tenants per GPU |
|---|---|---|---|
| Merge adapter into base | One full model per tenant | One model per request | Handful |
| Swap single active adapter | Base plus one adapter | Serialized, one adapter at a time | Many but slow |
| S-LoRA paged plus segmented kernel | Base plus paged adapter pool | One batched pass, heterogeneous adapters | Thousands |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Claiming you must split the batch by adapter or merge each adapter into the base weights. Both kill multi-tenant throughput; the whole point is one batched pass over heterogeneous adapters.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.