Auto pick num nodes in preparing megatron ckpt#607
Auto pick num nodes in preparing megatron ckpt#607fzyzcjy wants to merge 3 commits intofeat/verify_donefrom
Conversation
The converter asserts world_size <= num_layers, which fails when using all 8 nodes (64 GPUs) for a 20-layer model. Add num_nodes parameter to exec_command_all_ray_node and convert_checkpoint so callers can limit the number of nodes used. For DeepSeek-V3-0324-20layer, use only 2 nodes (16 GPUs) for conversion.
# Conflicts: # scripts/run_deepseek.py
Summary of ChangesHello @fzyzcjy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the infrastructure for distributed model training and checkpoint preparation by introducing a robust Ray-based utility for executing commands across multiple nodes. This change streamlines multinode operations and enables dynamic configuration of distributed tasks. Furthermore, it standardizes file paths across various training scripts, improving configurability and maintainability. The checkpoint conversion process has also been made more reliable through better synchronization mechanisms. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a feature to automatically select the number of nodes for preparing Megatron checkpoints. The changes add a num_nodes parameter to exec_command_all_ray_node and convert_checkpoint functions, and run_deepseek.py is updated to use this for specific models. The implementation looks good. I've added one comment regarding an edge case where num_nodes could be zero, which would cause a crash.
No description provided.