Set the default backward-gradient `amax_epsilon` in `Float8BlockScaling` to
`1e-12`. This gives zero-amax E5M2 gradient blocks a nonzero floor in the
recipe, instead of requiring downstream projects to override the recipe
instance. Forward input and weight quantization defaults remain unchanged.
- Use `amax_epsilon=1e-12` for the default blockwise FP8 backward-gradient
quantizer.
- Document the backward-only default.
- Test zero-gradient quantization and Linear backward, and compare ordinary
nonzero-block quantization bitwise with the previous epsilon-zero setting.
- The focused TE GPU test passed on each of four H20 nodes using the patched
installed Python recipe.
- Both power-of-two and FP32 scale modes passed focused tests.
- Megatron-LM's TP=2 blockwise FP8 determinism test passed after removing its
recipe override.
Signed-off-by: Hollow Man <hollowman@opensuse.org>
Description
Set the default backward-gradient
amax_epsiloninFloat8BlockScalingto1e-12. This gives zero-amax E5M2 gradient blocks a nonzero floor in the recipe, instead of requiring downstream projects to override the recipe instance. Forward input and weight quantization defaults remain unchanged.Fixes https://github.com/NVIDIA/Megatron-LM/pull/7523/changes#r4211643974
Type of change
Changes
amax_epsilon=1e-12for the default blockwise FP8 backward-gradient quantizer.Checklist: