Skip to content

[Feature]support trainer_degree in name_mapping #2922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

gzy19990617
Copy link
Collaborator

Copy link

paddle-bot bot commented Jul 18, 2025

Thanks for your contribution!

@gzy19990617 gzy19990617 force-pushed the fix_vl_namemapping branch 2 times, most recently from b4f20cf to 7e92f13 Compare July 21, 2025 03:39
@@ -192,7 +192,7 @@ def name(self) -> str:
"""name"""
return "Ernie4_5_VLMoeForConditionalGenerationRL"

def get_name_mappings_to_training(self) -> Dict[str, str]:
def get_name_mappings_to_training(self, trainer_degree=2) -> Dict[str, str]:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个值也默认 None 吧

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

rollout_model_degree = self.fd_config.parallel_config.tensor_parallel_size
expert_num_per_rank = self.fd_config.model_config.moe_num_experts[0] // rollout_model_degree

expert_num_per_rank = self.fd_config.model_config.moe_num_experts[0] // trainer_degree
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None 的情况下,trainer_degree = rollout_model_degree = self.fd_config.parallel_config.tensor_parallel_size 。 做一手兼容

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants