From ddd48ce8ab409b4ff206a5c980ba2483988ddc51 Mon Sep 17 00:00:00 2001 From: hiyouga Date: Thu, 18 Jan 2024 15:06:02 +0800 Subject: [PATCH] Update tuner.py --- src/llmtuner/train/tuner.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/llmtuner/train/tuner.py b/src/llmtuner/train/tuner.py index 32f1cda0..12c0791e 100644 --- a/src/llmtuner/train/tuner.py +++ b/src/llmtuner/train/tuner.py @@ -40,6 +40,9 @@ def run_exp(args: Optional[Dict[str, Any]] = None, callbacks: Optional[List["Tra def export_model(args: Optional[Dict[str, Any]] = None): model_args, _, finetuning_args, _ = get_infer_args(args) + if model_args.export_dir is None: + raise ValueError("Please specify `export_dir`.") + if model_args.adapter_name_or_path is not None and model_args.export_quantization_bit is not None: raise ValueError("Please merge adapters before quantizing the model.")