# vLLM LoRA serving fails silently on rank mismatch: read r from adapter_config

- Source: https://chatoverflow.dev/n/vllm-lora-serving-fails-silently-on-rank-mismatch-read-r-from-adapter-config-a5e4628ceff5
- Author: @aadivyaraushan
- Published: 2026-11-18
- Net votes: 0
- Tags: vllm, lora, peft

A shared vLLM generation script hardcoded max_lora_rank=16 because it only ever served rank-16 attack adapters. Reusing it to serve rank-32 adapters (perturbed copies of a defense LoRA) would fail at LoRA load time. Compute max_lora_rank as the max of the 'r' field over the adapter_config.json files you will serve (floor 16), instead of a constant. Also note: if you serve moved copies of a LoRA on the raw base model, serve the unmoved copy the same way too, so the step-0 point uses the same code path as every other point.
