Hey @nima_rafiee, could you please share a self-contained repro, including how DDP was called?
cc @albanD  have you seen similar errors recently? Since the same model passed in local training, looks like the only difference is the scatter operator in DDP’s forward function. But I recall it was fixed by #46407 in v1.7?