add arg check

This commit is contained in:
hiyouga 2024-03-25 22:42:58 +08:00
parent 6f2b563f12
commit 1484f76a95
1 changed files with 3 additions and 0 deletions

View File

@ -149,6 +149,9 @@ def get_train_args(args: Optional[Dict[str, Any]] = None) -> _TRAIN_CLS:
):
raise ValueError("Distributed training does not support layer-wise GaLore.")
if finetuning_args.use_galore and training_args.deepspeed is not None:
raise ValueError("GaLore is incompatible with DeepSpeed.")
if model_args.infer_backend == "vllm":
raise ValueError("vLLM backend is only available for API, CLI and Web.")