fix #2282 and update tool prompt

Former-commit-id: 1c412f803866bde32b76f7c26c7b464b6b3651f3
This commit is contained in:
hiyouga
2024-01-22 22:27:30 +08:00
parent 1fe1ca1c8b
commit 75be329994
5 changed files with 25 additions and 20 deletions

View File

@@ -60,7 +60,7 @@ def _verify_model_args(model_args: "ModelArguments", finetuning_args: "Finetunin
if finetuning_args.finetuning_type != "lora":
raise ValueError("Quantization is only compatible with the LoRA method.")
if finetuning_args.create_new_adapter:
if model_args.adapter_name_or_path is not None and finetuning_args.create_new_adapter:
raise ValueError("Cannot create new adapter upon a quantized model.")
if model_args.adapter_name_or_path is not None and len(model_args.adapter_name_or_path) != 1: