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 @@ -290,9 +290,13 @@ def get_expert_ranges(fd_config):
290290 no_tp_action_keys = copy .deepcopy (num_local_ffn_keys )
291291 if fd_config .parallel_config .use_sequence_parallel_moe :
292292 for i in range (fd_config .model_config .moe_layer_start_index , fd_config .model_config .num_hidden_layers ):
293- k = f"ernie.{ prefix_layer_name } .{ i } .self_attn.o_proj.weight"
294- if k in weight_list :
295- no_tp_action_keys .append (k )
293+ no_tp_keys = [
294+ f"ernie.{ prefix_layer_name } .{ i } .self_attn.o_proj.weight" ,
295+ f"ernie.{ prefix_layer_name } .{ i } .self_attn.o_proj.bias" ,
296+ ]
297+ for k in no_tp_keys :
298+ if k in weight_list :
299+ no_tp_action_keys .append (k )
296300 tp_actions = cls ._get_tensor_parallel_mappings (fd_config .model_config .pretrained_config )
297301 new_actions = {k : v for k , v in tp_actions .items () if k not in no_tp_action_keys }
298302
You can’t perform that action at this time.
0 commit comments