Skip to content

[float8 moe training] validate float8 moe parallelism config #1360

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

Merged
merged 1 commit into from
Jul 2, 2025
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
12 changes: 12 additions & 0 deletions torchtitan/components/quantization/float8.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ def __init__(self, job_config: JobConfig, parallel_dims: ParallelDims):
self.filter_fqns = float8_config.filter_fqns
self.moe_fqns = float8_config.moe_fqns_prototype

# Validate MoE training prototype limitations.
if self.moe_fqns:
assert (
job_config.parallelism.tensor_parallel_degree == 1
), "Float8 MoE training prototype does not yet support tensor parallelism"
assert (
job_config.parallelism.pipeline_parallel_degree == 1
), "Float8 MoE training prototype does not yet support pipeline parallelism"
assert (
job_config.parallelism.context_parallel_degree == 1
), "Float8 MoE training prototype does not yet support context parallelism"

if float8_config.recipe_name is not None:
assert (
not float8_config.enable_fsdp_float8_all_gather
Expand Down
Loading