Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions colossalai/shardformer/policies/deepseek.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ def module_policy(self) -> Dict[Union[str, nn.Module], ModulePolicyDescription]:
if self.shard_config.enable_sequence_parallelism:
self.shard_config.enable_sequence_parallelism = False
raise NotImplementedError(
"Mixtral dosen't support sequence parallelism now, will ignore the sequence parallelism flag."
"Deepseek dosen't support sequence parallelism now, will ignore the sequence parallelism flag."
)

if self.shard_config.enable_tensor_parallelism:
raise NotImplementedError("Tensor parallelism is not supported for Mixtral model now.")
raise NotImplementedError("Tensor parallelism is not supported for Deepseek model now.")
if getattr(self.shard_config, "ep_group", None) is None:
raise ValueError("You must pass in ep_group via shard_config for expert parallel!")

Expand Down Expand Up @@ -117,7 +117,7 @@ def get_held_layers(self) -> List[Module]:
"""Get pipeline layers for current stage."""
assert self.pipeline_stage_manager is not None

if self.model.__class__.__name__ == "MixtralModel":
if self.model.__class__.__name__ == "DeepseekModel":
module = self.model
else:
module = self.model.model
Expand Down Expand Up @@ -145,7 +145,7 @@ def module_policy(self):
# set None as default
self.set_pipeline_forward(
model_cls=DeepseekModel,
new_forward=DeepseekPipelineForwards.mixtral_model_forward,
new_forward=DeepseekPipelineForwards.deepseek_model_forward,
policy=policy,
)
return policy
Expand Down