throw error if got adapter with added_tokens (#18046)

This commit is contained in:
Glen Liu
2026-02-05 10:55:43 -05:00
committed by GitHub
parent 2eb4359ada
commit 3f32a5831d

View File

@@ -154,6 +154,10 @@ class LoRAManager:
"""
Validate if an adapter can be loaded into the current LoRA memory pool and generate error if it is incompatible.
"""
if lora_config.lora_added_tokens_size > 0:
raise ValueError(
f"LoRA serving currently doesn't support adapters that add tokens to the vocabulary"
)
# Check if this LoRA adapter is already loaded
for existing_lora_ref in self.lora_refs.values():