mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 08:21:53 +08:00
[TSP] last_norm allgather move to model.py (#5924)
* support_lastnorm_gather_split_dev * support_lastnorm_gather_split_dev1 * support_lastnorm_gather_split_dev3 * support_lastnorm_gather_split_dev4 * support_lastnorm_gather_split_dev5
This commit is contained in:
@@ -592,6 +592,9 @@ class DeepSeekV3Model(nn.Layer):
|
||||
)
|
||||
out = self.norm(hidden_states, residual, forward_meta=forward_meta)[0]
|
||||
|
||||
if self.norm.is_last_norm and self.norm.fd_config.parallel_config.use_sequence_parallel_moe:
|
||||
out = self.norm.allgather(out, forward_meta.ids_remove_padding.shape[0])
|
||||
|
||||
return out
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user