Serving Multiple LoRA Adapters in vLLM

Vladimir Lomtev•
Serving Multiple LoRA Adapters in vLLM

vLLM can serve one base model and multiple LoRA adapters at the same time: the adapter is selected by the model field in the request, and requests to different adapters and to the base model are processed in the same batch. This makes it possible to keep a dozen specialized “models” for different departments on one GPU instead of a dozen separate servers. The mode is enabled with the --enable-lora flag, and capacity is controlled with --max-loras, --max-lora-rank and --max-cpu-loras.

Prepared by AI Studio by Vladimir Lomtev on November 16, 2026, for teams that have fine-tuned or are planning to fine-tune a model for multiple tasks. The parameters and endpoints were cross-checked against the vLLM LoRA documentation and the engine argument reference. We did not run our own speed tests, so the memory calculation below is only approximate.

Contents

Why you need multiple adapters

LoRA is a fine-tuning method in which the model’s original weights do not change, and small low-rank matrices are added alongside some of the matrices. The result of training is a small adapter, not a new copy of the model. How to choose between LoRA, full fine-tuning, and other approaches is explained in the article “Fine-Tuning Models: SFT, LoRA, and QLoRA”.

A typical scenario: lawyers need a model that writes in the style of internal memos, support needs a model with the company’s tone of voice, and analysts need a model that answers confidently in JSON. Three full fine-tuned 16 GB models require three GPUs or three sequential loads. Three adapters for one base model can live alongside it on a single GPU.

Researchers have developed the idea of large-scale adapter serving: the authors of S-LoRA showed how one system can serve thousands of adapters with a shared base model by keeping them in system memory and loading them to the GPU as needed. vLLM implements a similar approach.

How much memory an adapter uses: the calculation

For a matrix of size d_out × d_in, an adapter of rank r adds r × (d_in + d_out) parameters. Example calculation for a configuration similar to 8B models: 32 layers, hidden size 4096, KV projections at 1024 because of GQA, adapters on q, k, v, and o projections, rank 16.

Projection Size Adapter parameters per layer
q 4096 × 4096 16 × (4096 + 4096) = 131 072
k 1024 × 4096 16 × (4096 + 1024) = 81 920
v 1024 × 4096 16 × (4096 + 1024) = 81 920
o 4096 × 4096 16 × (4096 + 4096) = 131 072
Total 425 984

Across 32 layers, that comes to 13,631,488 parameters, or about 26 MiB in BF16 at 2 bytes per parameter. A base model of this size in BF16 takes roughly 16 GB. So the adapters themselves are cheap in memory; what limits you is not their size, but the number of adapters in one batch and the compute load of applying them.

Running with multiple adapters

You can list adapters at startup with --lora-modules in the form name=path:

vllm serve Qwen/Qwen3-8B \
  --host 127.0.0.1 --port 8000 \
  --api-key "$VLLM_API_KEY" \
  --enable-lora \
  --lora-modules legal=/srv/lora/legal support=/srv/lora/support analytics=/srv/lora/analytics \
  --max-loras 4 \
  --max-lora-rank 16 \
  --max-cpu-loras 16

There is also a JSON format where you can specify the adapter’s base model:

vllm serve Qwen/Qwen3-8B --enable-lora \
  --lora-modules '{"name": "legal", "path": "/srv/lora/legal", "base_model_name": "Qwen/Qwen3-8B"}'

After startup, /v1/models will show the base model and each adapter; for the adapter, the field parent will show the base model.

Capacity settings

Parameter Default What it does
--max-loras 1 How many different adapters can be in one batch
--max-lora-rank 16 Maximum rank; allowed values are 1, 8, 16, 32, 64, 128, 256, 320, 512
--max-cpu-loras not specified in the reference How many adapters to keep in RAM; no fewer than max-loras
--lora-dtype auto Adapter data type; auto uses the base model's data type
--fully-sharded-loras disabled Full sharding of LoRA computations under tensor parallelism

The most common mistake is leaving --max-loras at the default. If set to 1, each batch can contain only one adapter: requests to different adapters will wait on each other, and the benefit of a shared server disappears. The documentation says that concurrent requests to different adapters depends on whether max_loras is large enough.

--max-lora-rank should match the highest rank among your adapters. The documentation warns that setting this too high wastes memory. If one adapter is trained with rank 64 and the others with 16, you will have to set 64 for all of them.

The flag --fully-sharded-loras is disabled by default in the reference docs: with tensor parallelism, only half of the LoRA computation is sharded. Full sharding is likely faster for long sequences, large ranks, or a large number of GPUs.

How the client selects an adapter

An adapter is selected the same way as a model — through the model:

import os
from openai import OpenAI

client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key=os.environ["VLLM_API_KEY"])

def ask(adapter: str, text: str) -> str:
    reply = client.chat.completions.create(
        model=adapter,  # "legal", "support", "analytics" or the base model
        messages=[{"role": "user", "content": text}],
        max_tokens=400,
    )
    return reply.choices[0].message.content

print(ask("support", "The customer says the order is delayed by a week. Reply politely."))

Requests to adapters and to the base model are handled together. On the gateway, it is convenient to map a department or API key to an adapter name so users do not have to choose it manually. Gateway options are covered in the article on enterprise AI access.

Loading adapters without restarting

vLLM can load and unload adapters at runtime through /v1/load_lora_adapter and /v1/unload_lora_adapter. This requires the environment variable VLLM_ALLOW_RUNTIME_LORA_UPDATING=True.

curl -X POST http://127.0.0.1:8000/v1/load_lora_adapter \
  -H "Authorization: Bearer $VLLM_API_KEY" -H "Content-Type: application/json" \
  -d '{"lora_name": "hr", "lora_path": "/srv/lora/hr"}'

curl -X POST http://127.0.0.1:8000/v1/unload_lora_adapter \
  -H "Authorization: Bearer $VLLM_API_KEY" -H "Content-Type: application/json" \
  -d '{"lora_name": "hr"}'

The parameter load_inplace: true replaces the adapter with the same name. The documentation ties this to asynchronous reinforcement learning: the adapter is updated without interrupting the current generation.

Important: the documentation explicitly warns that loading adapters at runtime carries security risks and should not be used in production except in an isolated, fully trusted environment. Anyone who can call these endpoints can alter the model's behavior. If you cannot avoid dynamic loading, block the endpoints at the gateway and allow them only for the deployment system.

There are also resolver plugins that find an adapter by name: in a local directory (lora_filesystem_resolver) or in Hugging Face repositories (lora_hf_hub_resolver). The documentation considers loading from Hugging Face unsafe and not intended for production.

How to verify that everything works

  1. Quality of each adapter. Run a set of test prompts separately through each adapter and through the base model. The adapter should produce the expected behavior, and the base model should remain unchanged.
  2. Mixed load. Send simultaneous requests to different adapters and check that time to first token does not jump up sharply. If it does, increase --max-loras.
  3. Eviction. If there are more adapters than --max-cpu-loras, infrequent adapters will be loaded from disk; measure the first-request latency for such an adapter.
  4. Comparison with the base model. Compare throughput for requests only to the base model versus mixed load. Using adapters adds computation; the difference depends on rank, number of adapters, and hardware.

The load-testing methodology is described in the article "Load Testing a Local LLM".

Limitations

  • All adapters must be trained for the same base model and version.
  • A rank higher than --max-lora-rank will not load.
  • Not all architectures and quantized formats support LoRA equally; check the documentation for your version. In SGLang, for example, LoRA adapters on top of quantized MoE models only appeared in version 0.5.23 as an optional engine.
  • If the adapter needs different tokens or a different chat template, you will need a separate model, not an adapter.

FAQ

How many adapters can one GPU hold? In memory — many: in the example above, an adapter takes about 26 MiB. The practical limit is set by --max-loras for one batch, RAM for --max-cpu-loras and the acceptable slowdown.

Can an adapter be merged with the model so you don’t have to configure LoRA in vLLM? You can merge the adapter weights into the base model and get a standalone model. This simplifies running one specialized model, but it removes the advantage of a shared server for multiple ones.

What happens if a client specifies a non-existent adapter? Without resolvers, an adapter with that name will not be found, and the request will fail with an error. With a resolver, it will try to find the adapter by name, so resolvers should be limited to trusted directories.

How Vladimir Lomtev’s AI studio helps with LoRA adapters

Vladimir Lomtev’s AI studio handles LLM deployment and fine-tuning, including on company servers. For multiple adapters, this means:

  • identify which tasks really require fine-tuning and which can be solved with prompting or RAG;
  • prepare data and train adapters for a single base model;
  • deploy vLLM with multiple adapters and map them to departments at the gateway;
  • test the quality of each adapter and the server’s behavior under mixed load.

The first step is to choose one process where the base model does not respond the way you need, gather examples of correct answers, and define the criterion by which the adapter will be considered successful. Discuss the project.

Bottom line: one server, many specializations

Multiple LoRA adapters on one model let you handle different tasks with a single GPU. Enable --enable-lora, raise --max-loras to the number of adapters that will actually be used at the same time, set --max-lora-rank to match the largest adapter, and do not expose dynamic loading externally. Test the quality of each adapter and behavior under mixed load before users go live.

Request an audit

Share your contact details and we will follow up.

← All articles

Comments (0)

Loading comments…

Leave a comment
No registration required

Book a strategy call
for agentic operations

Tell us which workflow you want to improve. We will map feasibility, risks, and the fastest MVP path.

By submitting, you agree to our privacy policy

Contacts

Global Operations

Serving U.S. clients remotely
with private cloud and on-prem options

Strategy calls by request

We respond after reviewing your workflow context.

info@agentsunrise.pro

For partnership inquiries

Have a proposal?

Write to us in messengers

© 2026 AgentSunrise