-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: Please specify target_modules
in peft_config
, issue exist with gemma
#2128
Comments
@qgallouedec could you please take a look ? Merci. |
after I upgrade trl to 0.11.1, this error for sft gemma, disappeared. But according to the script, there is no Is there anything I miss ? that set a default Thanks a lot. |
test again for
do not know the reason. in close for now. |
Just to help you understand, if Regarding the |
System Info
peft version: 0.12.0
trl version: 0.9.6
I am following official script from huggingface trl: https://github.com/huggingface/trl/blob/main/examples/scripts/sft.py
with the given demo execution.
it works fine with most models such as llama-3.1, llama-3.2 etc, but not for
gemma
(such asunsloth/gemma-2-9b-it-bnb-4bit
,google/gemma-2-9b-it
)Actually, I do see that
lora_target_modules=None
inmodel_config
, therefore afterpeft_config=get_peft_config(model_config)
the
target_modules
inpeft_config
is None which can cause error.But what confuses me is the for other models, there is no error, under the same circumstances.
May I ask your opinions ?
Thanks.
detailed error message:
Who can help?
@BenjaminBossan @sayakpaul
Information
Tasks
examples
folderReproduction
CUDA_VISIBLE_DEVICES=0 python /home/ubuntu/trl/examples/scripts/sft.py
--model_name_or_path="google/gemma-2-9b-it"
--dataset_text_field="text"
--report_to="none"
--learning_rate=1.41e-5
--per_device_train_batch_size=64
--gradient_accumulation_steps=16
--output_dir="sft_openassistant-guanaco"
--logging_steps=1
--num_train_epochs=3
--max_steps=-1
--push_to_hub
--gradient_checkpointing
--use_peft
--lora_r=64
--lora_alpha=16
Expected behavior
the official script should works for all models, including gemma.
The text was updated successfully, but these errors were encountered: