03/19/2024 23:11:40 - INFO - llmtuner.model.adapter - Fine-tuning method: LoRA
Traceback (most recent call last):
File "/mnt/sm870/yangqimin/LLaMA-Factory/src/export_model.py", line 9, in <module>
main()
File "/mnt/sm870/yangqimin/LLaMA-Factory/src/export_model.py", line 5, in main
export_model()
File "/mnt/sm870/yangqimin/LLaMA-Factory/src/llmtuner/train/tuner.py", line 52, in export_model
model, tokenizer = load_model_and_tokenizer(model_args, finetuning_args)
File "/mnt/sm870/yangqimin/LLaMA-Factory/src/llmtuner/model/loader.py", line 150, in load_model_and_tokenizer
model = load_model(tokenizer, model_args, finetuning_args, is_trainable, add_valuehead)
File "/mnt/sm870/yangqimin/LLaMA-Factory/src/llmtuner/model/loader.py", line 94, in load_model
model = init_adapter(model, model_args, finetuning_args, is_trainable)
File "/mnt/sm870/yangqimin/LLaMA-Factory/src/llmtuner/model/adapter.py", line 110, in init_adapter
model: "LoraModel" = PeftModel.from_pretrained(model, adapter)
File "/home/sun/anaconda3/envs/jc-train/lib/python3.10/site-packages/peft/peft_model.py", line 324, in from_pretrained
config = PEFT_TYPE_TO_CONFIG_MAPPING[
File "/home/sun/anaconda3/envs/jc-train/lib/python3.10/site-packages/peft/config.py", line 151, in from_pretrained
return cls.from_peft_type(**kwargs)
File "/home/sun/anaconda3/envs/jc-train/lib/python3.10/site-packages/peft/config.py", line 118, in from_peft_type
return config_cls(**kwargs)
TypeError: LoraConfig.__init__() got an unexpected keyword argument 'layer_replication'
Reminder
Reproduction
这是我微调时使用的参数
这是我合并时使用的参数
合并时提示我
我通过删除微调的目标文件夹中adapter_config.json文件中的'layer_replication' 项,能够成功合并权重并使用,我不清楚这是否是一个BUG,以及这样操作是否会带来其他问题。
Expected behavior
我原本希望使用我自己的数据集微调qwen1.5模型并合并权重进行使用
System Info
transformers
version: 4.38.2Others
No response