Former-commit-id: dd81ce8ce5fdf450027c5f9634abb6ac2cd52128
This commit is contained in:
hiyouga 2024-08-29 20:37:47 +08:00
parent 7c6785d3df
commit d677fe053d

View File

@ -221,6 +221,9 @@ def get_train_args(args: Optional[Dict[str, Any]] = None) -> _TRAIN_CLS:
if training_args.predict_with_generate and finetuning_args.compute_accuracy:
raise ValueError("Cannot use `predict_with_generate` and `compute_accuracy` together.")
if training_args.predict_with_generate and is_deepspeed_zero3_enabled():
raise ValueError("`predict_with_generate` is incompatible with DeepSpeed ZeRO-3.")
if training_args.do_train and model_args.quantization_device_map == "auto":
raise ValueError("Cannot use device map for quantized models in training.")