Remove unnecessary load_weights methods (#44589)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -128,9 +128,13 @@ class WorkerLoRAManager:
|
||||
peft_helper.validate_legal(self.lora_config)
|
||||
|
||||
# For some models like Qwen2VL, we need to use hf_to_vllm_mapper
|
||||
# to ensure correct loading of lora weights.
|
||||
# to ensure correct loading of lora weights. Drop the QKV/MLP fusion
|
||||
# substr maps so constituent names (e.g. `q_proj`) survive for the
|
||||
# LoRA manager to pack, while keeping genuine renames/prefixes.
|
||||
model = self._adapter_manager.model
|
||||
hf_to_vllm_mapper = getattr(model, "hf_to_vllm_mapper", None)
|
||||
if hf_to_vllm_mapper is not None:
|
||||
hf_to_vllm_mapper = hf_to_vllm_mapper.get_unstacked_mapper()
|
||||
|
||||
# Get model-defined prefixes to skip during LoRA loading.
|
||||
lora_skip_prefixes = getattr(model, "lora_skip_prefixes", None)
|
||||
|
||||
Reference in New Issue
Block a user