Skip to content

feat(maxtext): add fp8 and nanoo_fp8 pretrain configs for MI300X/MI355X - #925

Open
yeandy wants to merge 4 commits into
mainfrom
jax-maxtext-v26.6
Open

feat(maxtext): add fp8 and nanoo_fp8 pretrain configs for MI300X/MI355X#925
yeandy wants to merge 4 commits into
mainfrom
jax-maxtext-v26.6

Conversation

@yeandy

@yeandy yeandy commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Adds per-precision MaxText experiment configs (fp8, nanoo_fp8) derived from the existing bf16 configs by setting quantization in overrides, for 9 models across MI300X and MI355X. Upstream MaxText previously shipped only bf16 (<model>-pretrain.yaml); this fills the fp8/nanoo_fp8 gap so quantized runs can be launched by config path.

Adds per-precision MaxText experiment configs (fp8, nanoo_fp8) derived from the
existing bf16 configs by setting `quantization` in overrides, for 9 models across
MI300X and MI355X. Upstream MaxText previously shipped only bf16 (`<model>-pretrain.yaml`);
this fills the fp8/nanoo_fp8 gap so quantized runs can be launched by config path.
yeandy added 3 commits July 27, 2026 17:23
…MI355X fp8)

MI300X uses NANOO FP8 and MI355X uses FP8, so drop the unused plain-fp8 configs on
MI300X and the unused nanoo_fp8 configs on MI355X. Each device keeps bf16 plus its
supported quantization.
Adds the fp8 quantized variant for Llama 3.1 405B on MI355X (bf16 already existed);
MI355X uses FP8.
…mem_fraction 0.96

Add a single, launcher-agnostic hook for per-config environment overrides:
TrainRuntime._apply_config_env() reads a top-level `env:` mapping from the
experiment YAML and exports it to os.environ right after config load, before
runtime env / distributed init / any `import jax`. The block lives outside
`modules:`, so it is never swept into module params nor forwarded to MaxText.
Per-config `env:` wins over image-baked defaults.

MaxTextAdapter.prepare_backend() applies arch defaults via os.environ.setdefault
(gfx950 -> RCCL_WARP_SPEED_AUTO=0) so they never override a per-config `env:`.

Precedence (highest wins): per-config env: > arch defaults > image bake.

Use it to run mixtral_8x7B at per_device_batch_size=11 on a single MI355X:
set XLA_PYTHON_CLIENT_MEM_FRACTION=0.96 (image default 0.9 is too low; bs11
peaks ~270-274 GB / 288 GB) and moe_dispatch_no_expert_sharding=true. Applied
to both the bf16 (mixtral_8x7B-pretrain) and fp8 (mixtral_8x7B-fp8-pretrain)
MI355X configs.
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.

1 participant