You need to serve 200 customer-specific fine-tunes of the same 8B base model. How do you do that on a handful of GPUs, and what breaks first?
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
Multi-LoRA serving. Load the base weights once and treat each tenant as a rank-r adapter: for each targeted projection, y = Wx + scale * (B A x). The expensive base matmul is shared across the whole batch, and only the small low-rank terms are per-adapter, so one batch can mix adapters and you keep continuous batching. The alternative, 200 full model replicas, is absurd: 200 x ~16 GB versus 1 x 16 GB plus 200 x tens of MB.
Full worked answer with diagram
Multi-LoRA serving. Load the base weights once and treat each tenant as a rank-r adapter: for each targeted projection, y = Wx + scale * (B A x). The expensive base matmul is shared across the whole batch, and only the small low-rank terms are per-adapter, so one batch can mix adapters and you keep continuous batching. The alternative, 200 full model replicas, is absurd: 200 x ~16 GB versus 1 x 16 GB plus 200 x tens of MB.
The kernel is what makes it work. A naive loop over adapters serialises the batch. Production systems sort tokens by adapter into contiguous segments and do one grouped GEMM (the SGMV approach from Punica, used by LoRAX, vLLM and SGLang). vLLM exposes this as --enable-lora with --max-loras (distinct adapters allowed in one batch), --max-lora-rank, and --max-cpu-loras (host-side pool); the request names the adapter it wants.
What breaks:
- Rank heterogeneity. Grouped kernels pad to the max rank, so one rank-64 adapter taxes every rank-8 tenant sharing the batch. Standardise ranks across tenants.
- The
max_lorascap. If more distinct adapters are concurrently active than the cap allows, the scheduler serialises across adapter groups and TTFT tails explode. Fix it by routing: give each replica a subset of adapters (adapter affinity) so concurrency per replica stays under the cap. - Cold adapter fetch. Adapters are small, so host RAM paging is fast, but pulling from object storage on first request is a visible spike. Prefetch on session start.
- Prefix cache does not cross adapters. KV is adapter-specific, so a shared system prompt is cached separately per adapter. This surprises people.
- Evaluation. You now own 200 quality surfaces, not one.
Expect a real throughput cost versus a base-only server, growing with distinct adapters per batch. Measure it on your traffic rather than trusting a headline number.
Worth sketching. Showing the shared base matmul beside the per-adapter term explains in one glance why 200 tenants fit where 200 replicas never would.
flowchart LR
B["One mixed batch of tokens"] --> S["Sort tokens into contiguous<br/>per-adapter segments"]
S --> BASE["Shared base GEMM, run once for the batch"]
S --> SG["Grouped GEMM (SGMV):<br/>low-rank term per adapter"]
BASE --> ADD["Add per token"]
SG --> ADD
ADD --> O["Continuous batching intact,<br/>ranks padded to the batch maximum"]
What a good answer covers
- Load the base weights once and treat each tenant as a rank-r adapter
- The expensive base matmul is shared across the whole batch, and only the small low-rank terms are…
- The alternative, 200 full model replicas, is absurd: 200 x ~16 GB versus 1 x 16 GB plus 200 x tens of MB
- A naive loop over adapters serialises the batch
- Production systems sort tokens by adapter into contiguous segments and do one grouped GEMM (the SGMV…
Key terms: Rank heterogeneity · The max_loras cap · Cold adapter fetch · Evaluation
In the glossary: Continuous batching · vLLM · SGLang · TTFT
Interviewer follow-ups to expect
Why can't a shared system prompt's KV be reused across two different adapters?
When would you merge an adapter into the base weights and serve it as its own model instead?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep