update tips

This commit is contained in:
hiyouga 2023-12-15 23:52:50 +08:00
parent 439a26c276
commit 3551171d49
1 changed files with 4 additions and 0 deletions

View File

@ -36,6 +36,10 @@ 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.adapter_name_or_path is not None and finetuning_args.export_quantization_bit is not None:
raise ValueError("Please merge adapters before quantizing the model.")
model, tokenizer = load_model_and_tokenizer(model_args, finetuning_args)
if getattr(model, "quantization_method", None) and model_args.adapter_name_or_path is not None: