mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
fsdp bf16 enable autocast (#21847)
This commit is contained in:
parent
fb76994c41
commit
b6f47b5393
@ -618,9 +618,6 @@ class Trainer:
|
||||
self.scaler = GradScaler()
|
||||
else:
|
||||
self.scaler = torch.cuda.amp.GradScaler()
|
||||
elif self.fsdp is not None:
|
||||
self.use_cuda_amp = False
|
||||
self.amp_dtype = None
|
||||
elif args.half_precision_backend == "cpu_amp":
|
||||
self.use_cpu_amp = True
|
||||
self.amp_dtype = torch.bfloat16
|
||||
|
Loading…
Reference in New Issue
Block a user