Error in fine tuning

#14
by EviIgenius - opened

I used autotrain to load and fine tune the model , but I faced this error "Please specify target_modules in peft_config"
any idea how to relsove it?

ERROR train has failed due to an exception:
ERROR Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/autotrain/utils.py", line 280, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/autotrain/trainers/clm/main.py", line 226, in train
model = get_peft_model(model, peft_config)
File "/usr/local/lib/python3.10/dist-packages/peft/mapping.py", line 106, in get_peft_model
return MODEL_TYPE_TO_PEFT_MODEL_MAPPING[peft_config.task_type](model, peft_config, adapter_name=adapter_name)
File "/usr/local/lib/python3.10/dist-packages/peft/peft_model.py", line 889, in init
super().init(model, peft_config, adapter_name)
File "/usr/local/lib/python3.10/dist-packages/peft/peft_model.py", line 111, in init
self.base_model = PEFT_TYPE_TO_MODEL_MAPPING[peft_config.peft_type](
File "/usr/local/lib/python3.10/dist-packages/peft/tuners/lora.py", line 274, in __init__
super().init(model, config, adapter_name)
File "/usr/local/lib/python3.10/dist-packages/peft/tuners/tuners_utils.py", line 88, in init
self.inject_adapter(self.model, adapter_name)
File "/usr/local/lib/python3.10/dist-packages/peft/tuners/tuners_utils.py", line 205, in inject_adapter
peft_config = self._prepare_adapter_config(peft_config, model_config)
File "/usr/local/lib/python3.10/dist-packages/peft/tuners/lora.py", line 550, in _prepare_adapter_config
raise ValueError("Please specify target_modules in peft_config")
ValueError: Please specify target_modules in peft_config

Make sure to add the LoRA Target Modules to be trained --target-modules q_proj, v_proj

Sign up or log in to comment