01
recipe = DelayedScaling(02
fp8_format=Format.E4M3,03
amax_history_len=0)04
with te.autocast(enabled=True, recipe=recipe):05
loss = transformer(tokens)06
loss.backward()