Skip to content

Commit 582dc36

Browse files
committed
Review changes
Signed-off-by: Xin Yang <[email protected]>
1 parent ffca12d commit 582dc36

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

vllm/model_executor/models/deepseek_eagle.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ def load_weights(self, weights: Iterable[tuple[str,
103103
# (param_name, shard_name, shard_id)
104104
("gate_up_proj", "gate_proj", 0),
105105
("gate_up_proj", "up_proj", 1),
106+
("fused_qkv_a_proj", "q_a_proj", 0),
107+
("fused_qkv_a_proj", "kv_a_proj_with_mqa", 1),
106108
]
107109

108110
# Params for weights, fp8 weight scales, fp8 activation scales
@@ -131,7 +133,17 @@ def load_weights(self, weights: Iterable[tuple[str,
131133
# for mlp.experts[0].gate_gate_up_proj, which breaks load.
132134
if ("mlp.experts." in name) and name not in params_dict:
133135
continue
134-
name = name.replace(weight_name, param_name)
136+
name_mapped = name.replace(weight_name, param_name)
137+
138+
# QKV fusion is optional, fall back to normal
139+
# weight loading if it's not enabled
140+
# if go with fusion option, then update name
141+
if ((param_name == "fused_qkv_a_proj")
142+
and name_mapped not in params_dict):
143+
continue
144+
else:
145+
name = name_mapped
146+
135147
# Skip loading extra bias for GPTQ models.
136148
if name.endswith(".bias") and name not in params_dict:
137149
continue

0 commit comments

Comments
 (0)