[Misc] disable cast_forward_inputs (#460)

This commit is contained in:
William Lin
2025-05-31 22:06:29 -07:00
committed by GitHub
parent b2ebaaf865
commit dcf7738cbc
+3 -1
View File
@@ -102,10 +102,12 @@ def load_fsdp_model(
output_dtype: Optional[torch.dtype] = None,
) -> torch.nn.Module:
# NOTE(will): cast_forward_inputs=True shouldn't be needed as we are
# manually casting the inputs to the model
mp_policy = MixedPrecisionPolicy(param_dtype,
reduce_dtype,
output_dtype,
cast_forward_inputs=True)
cast_forward_inputs=False)
with set_default_dtype(default_dtype), torch.device("meta"):
model = model_cls(**init_params)