mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-03-24 00:35:51 +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,
|
||||
model_config: PretrainedConfig | None = None,
|
||||
) -> bool:
|
||||
# Vision tower QKV has packed_modules_list=[] (already packed in checkpoint)
|
||||
# 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
|
||||
)
|
||||
return type(source_layer) is QKVParallelLinear and len(packed_modules_list) == 1
|
||||
|
||||
|
||||
class MergedQKVParallelLinearWithLoRA(MergedColumnParallelLinearWithLoRA):
|
||||
|
||||
@ -1061,6 +1061,7 @@ class Qwen2_5_VLForConditionalGeneration(
|
||||
packed_modules_mapping = {
|
||||
"qkv_proj": ["q_proj", "k_proj", "v_proj"],
|
||||
"gate_up_proj": ["gate_proj", "up_proj"],
|
||||
"qkv": ["qkv"], # For vision tower's already-packed QKV
|
||||
}
|
||||
|
||||
# To ensure correct weight loading and mapping.
|
||||
|
||||
@ -1201,6 +1201,7 @@ class Qwen3VLForConditionalGeneration(
|
||||
"gate_proj",
|
||||
"up_proj",
|
||||
],
|
||||
"qkv": ["qkv"], # For vision tower's already-packed QKV
|
||||
}
|
||||
|
||||
supports_encoder_tp_data = True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user