Enable Qwen3 and Deepseekv3 mxfp8 Training#134
Merged
Conversation
- Introduced `train_qwen2.sh` and `train_qwen3.sh` scripts for pretraining Qwen2 and Qwen3 models, respectively, with detailed configuration options. - Added `readme.md` files for both Qwen2 and Qwen3, outlining dataset preparation, model training processes, and environment setup. - Included instructions for single-node and multi-node training setups, along with customizable parameters for model size and training iterations.
…node runs - Updated `train_qwen3.sh` to include FP8 recipe options for improved precision handling during training. - Added a new script `1P1G_AAI_proxy_mi355x_qwen3_235B_A22B.sh` for smaller Qwen3-235B-style MoE proxy configurations, allowing for single-node and single-GPU smoke runs. - Improved environment variable handling for model size, layers, and experts in the training scripts to facilitate easier customization. - Adjusted default values and added comments for clarity on tunable parameters.
…ation - Modified `train_deepseekv3.sh` to disable legacy grouped GEMM when using FP8, ensuring compatibility with TE grouped GEMM requirements. - Updated `1P1G_AAI_proxy_mi355x_qwen3_235B_A22B.sh` to set `MOE_USE_LEGACY_GROUPED_GEMM` to false for improved performance. - Enhanced `train_qwen3.sh` to include automatic handling of `--moe-router-padding-for-fp8` for MXFP8 configurations, streamlining the training process for FP8 models. - Added informative logging to clarify changes in grouped GEMM settings based on FP8 configurations.
- Added support for `MOE_PERMUTE_FUSION` in `train_qwen3.sh`, allowing users to disable the fused token permute/unpermute feature. - Updated MoE options to conditionally include `--moe-permute-fusion` based on the new environment variable, improving flexibility in model training configurations.
…MoE options - Added `PROFILE` environment variable to `proxy_mi355x_deepseekv3_671B.sh` and `proxy_mi355x_qwen3_235B_A22B.sh` for enhanced profiling capabilities. - Updated `train_qwen3.sh` to reflect changes in MoE padding options, replacing `--moe-router-padding-for-fp8` with `--moe-router-padding-for-quantization` for better clarity and accuracy in FP8 configurations.
- Introduced `run_deepseekv3_compare_perf.sh` to facilitate performance comparisons across bf16, fp8, and mxfp8 configurations, generating TraceLens reports and comparison files. - Added `run_qwen3_perf_compare.sh` for similar functionality with Qwen3-235B, ensuring compatibility with existing baseline CSV directories and TraceLens tools. - Enhanced user guidance in both scripts with detailed usage instructions and optional overrides for improved flexibility in performance testing.
…g iterations and adjust profiling ranges - Changed `TRAIN_ITERS` from 5 to 20 in both `proxy_mi355x_deepseekv3_671B.sh` and `proxy_mi355x_qwen3_235B_A22B.sh` to enhance training duration. - Updated `PROFILE_START` and `PROFILE_END` values to 12 and 13 respectively, refining the profiling range for better performance analysis.
- Updated `mean_log_value.py` to include options for skipping the first N iterations and specific profile steps, improving flexibility in log analysis. - Adjusted calls to `mean_log_value.py` in both `train_deepseekv3.sh` and `train_qwen3.sh` to utilize the new arguments, ensuring accurate throughput and elapsed time calculations.
…3_deepseekv3_mxfp8
…3_deepseekv3_mxfp8
Collaborator
|
@sudhu2k Please also resolve conflicts |
…3_deepseekv3_mxfp8
Changed the default value of MOE_USE_LEGACY_GROUPED_GEMM from false to true
Collaborator
Author
Resolved it. |
wenchenvincent
approved these changes
Jun 11, 2026
wenchenvincent
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. Is the CI failure flaky?
…3_deepseekv3_mxfp8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds training scripts for Qwen3 and modifies existing Deepseekv3 script to enable mxfp8 training.