mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-06-06 19:02:19 +08:00
update packed modules mapping (#11)
Signed-off-by: prashanth058 <prashanth.dannamaneni@uipath.com>
This commit is contained in:
parent
0642610719
commit
5e78570cce
@ -340,12 +340,7 @@ class QKVParallelLinearWithLoRA(ColumnParallelLinearWithLoRA):
|
|||||||
packed_modules_list: list,
|
packed_modules_list: list,
|
||||||
model_config: PretrainedConfig | None = None,
|
model_config: PretrainedConfig | None = None,
|
||||||
) -> bool:
|
) -> bool:
|
||||||
# Vision tower QKV has packed_modules_list=[] (already packed in checkpoint)
|
return type(source_layer) is QKVParallelLinear and len(packed_modules_list) == 1
|
||||||
# Language models have packed_modules_list=[module_name]
|
|
||||||
# (single LoRA for qkv_proj)
|
|
||||||
return type(source_layer) is QKVParallelLinear and (
|
|
||||||
len(packed_modules_list) <= 1
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class MergedQKVParallelLinearWithLoRA(MergedColumnParallelLinearWithLoRA):
|
class MergedQKVParallelLinearWithLoRA(MergedColumnParallelLinearWithLoRA):
|
||||||
|
|||||||
@ -1061,6 +1061,7 @@ class Qwen2_5_VLForConditionalGeneration(
|
|||||||
packed_modules_mapping = {
|
packed_modules_mapping = {
|
||||||
"qkv_proj": ["q_proj", "k_proj", "v_proj"],
|
"qkv_proj": ["q_proj", "k_proj", "v_proj"],
|
||||||
"gate_up_proj": ["gate_proj", "up_proj"],
|
"gate_up_proj": ["gate_proj", "up_proj"],
|
||||||
|
"qkv": ["qkv"], # For vision tower's already-packed QKV
|
||||||
}
|
}
|
||||||
|
|
||||||
# To ensure correct weight loading and mapping.
|
# To ensure correct weight loading and mapping.
|
||||||
|
|||||||
@ -1201,6 +1201,7 @@ class Qwen3VLForConditionalGeneration(
|
|||||||
"gate_proj",
|
"gate_proj",
|
||||||
"up_proj",
|
"up_proj",
|
||||||
],
|
],
|
||||||
|
"qkv": ["qkv"], # For vision tower's already-packed QKV
|
||||||
}
|
}
|
||||||
|
|
||||||
supports_encoder_tp_data = True
|
supports_encoder_tp_data = True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user