3b-lora模型加载后报错,应该怎么解决

#1
by Azir01 - opened

[[/root/anaconda3/envs/text2sql-lora-py3.8/lib/python3.8/site-packages/transformers/utils/generic.py:311: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
torch.utils._pytree._register_pytree_node(
/root/anaconda3/envs/text2sql-lora-py3.8/lib/python3.8/site-packages/huggingface_hub/file_download.py:1132: FutureWarning: resume_download is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use force_download=True.
warnings.warn(
/root/anaconda3/envs/text2sql-lora-py3.8/lib/python3.8/site-packages/transformers/utils/generic.py:311: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
torch.utils._pytree._register_pytree_node(
You are using config.init_device='cpu', but you can also use config.init_device="meta" with Composer + FSDP for fast initialization.
Traceback (most recent call last):
File "download.py", line 15, in <module>
model = PeftModel.from_pretrained(model, lora_model_path,
File "/root/anaconda3/envs/text2sql-lora-py3.8/lib/python3.8/site-packages/peft/peft_model.py", line 429, in from_pretrained
model = MODEL_TYPE_TO_PEFT_MODEL_MAPPING[config.task_type](model, config, adapter_name)
File "/root/anaconda3/envs/text2sql-lora-py3.8/lib/python3.8/site-packages/peft/peft_model.py", line 1395, in init
super().init(model, peft_config, adapter_name)
File "/root/anaconda3/envs/text2sql-lora-py3.8/lib/python3.8/site-packages/peft/peft_model.py", line 138, in init
self.base_model = cls(model, {adapter_name: peft_config}, adapter_name)
File "/root/anaconda3/envs/text2sql-lora-py3.8/lib/python3.8/site-packages/peft/tuners/lora/model.py", line 139, in init
super().init(model, config, adapter_name)
File "/root/anaconda3/envs/text2sql-lora-py3.8/lib/python3.8/site-](ValueError: Target modules {'v', 'q'} not found in the base model. Please check the target modules and try again.)](ValueError: Target modules {'v', 'q'} not found in the base model. Please check the target modules and try again.)

Sign up or log in to comment