File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
fastdeploy/model_executor Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -288,9 +288,13 @@ def get_expert_ranges(fd_config):
288288 no_tp_action_keys = copy .deepcopy (num_local_ffn_keys )
289289 if fd_config .parallel_config .use_sequence_parallel_moe :
290290 for i in range (fd_config .model_config .moe_layer_start_index , fd_config .model_config .num_hidden_layers ):
291- k = f"ernie.{ prefix_layer_name } .{ i } .self_attn.o_proj.weight"
292- if k in weight_list :
293- no_tp_action_keys .append (k )
291+ no_tp_keys = [
292+ f"ernie.{ prefix_layer_name } .{ i } .self_attn.o_proj.weight" ,
293+ f"ernie.{ prefix_layer_name } .{ i } .self_attn.o_proj.bias" ,
294+ ]
295+ for k in no_tp_keys :
296+ if k in weight_list :
297+ no_tp_action_keys .append (k )
294298 tp_actions = cls ._get_tensor_parallel_mappings (fd_config .model_config .pretrained_config )
295299 new_actions = {k : v for k , v in tp_actions .items () if k not in no_tp_action_keys }
296300
You can’t perform that action at this time.
0 commit comments