[Bugfix][LoRA] Log when an adapter applies no weights (#55310)

Signed-off-by: Guancheng Fu <110874468+gc-fu@users.noreply.github.com>

Guancheng Fu committed Sep 10, 2026 at 01:44 UTC a207d7ce1d0cc33121726a7189080a0fa40ebb4d
1 file changed +9
vllm/lora/model_manager.py
+9
@@ -336,6 +336,7 @@ class LoRAModelManager:
336 "Activating LoRA. int id: %d, slot index: %d", lora_model.id, index
337 )
338 self.lora_index_to_id[index] = lora_model.id
339 + num_lora_weights_applied = 0
340 for module_name, module in self.modules.items():
341 module_lora = self._get_lora_layer_weights(lora_model, module_name)
342 if not module_lora:
@@ -350,7 +351,15 @@ class LoRAModelManager:
351 module_lora.lora_a,
352 module_lora.lora_b,
353 )
354 + num_lora_weights_applied += 1
355 logger.debug("Successfully loaded LoRA weights for module %s.", module_name)
356 + if num_lora_weights_applied == 0:
357 + logger.debug_once(
358 + "No LoRA weights were applied for adapter %s on this worker. "
359 + "Requests may use the base model; check --lora-target-modules. "
360 + "This may be expected with pipeline or expert parallelism.",
361 + lora_model.id,
362 + )
363 return True
364
365 def _deactivate_adapter(self, lora_id: int):