Former-commit-id: 2d8d47f6126d68db1701ed18fc31310c6f14dd49
This commit is contained in:
hiyouga
2024-06-20 22:56:05 +08:00
parent f16a4a8264
commit af2cb33bb2
4 changed files with 15 additions and 13 deletions

View File

@@ -199,6 +199,9 @@ def get_train_args(args: Optional[Dict[str, Any]] = None) -> _TRAIN_CLS:
if not is_torch_bf16_gpu_available():
raise ValueError("This device does not support `pure_bf16`.")
if training_args.deepspeed:
raise ValueError("`pure_bf16` is incompatible with DeepSpeed.")
if training_args.fp16 or training_args.bf16:
raise ValueError("Turn off mixed precision training when using `pure_bf16`.")