[X] An officially supported task in the examples folder
[ ] My own task or dataset (give details below)
Reproduction
from transformers import AutoModelForCausalLM, AutoTokenizer, GPTQConfig
from peft import prepare_model_for_kbit_training
import torch
model_id = "TheBloke/Mistral-7B-Instruct-v0.2-GPTQ"
quantization_config_loading = GPTQConfig(bits=4, disable_exllama=True)
model = AutoModelForCausalLM.from_pretrained(model_id,quantization_config=quantization_config_loading, device_map="auto")
model.gradient_checkpointing_enable()
model = prepare_model_for_kbit_training(model)
from peft import LoraConfig, get_peft_model
config = LoraConfig(
r=8,
lora_alpha=32,
# target_modules=["k_proj","o_proj","q_proj","v_proj"],
target_modules=[
"q_proj",
"v_proj",
"k_proj",
"o_proj",
"down_proj",
"up_proj",
"gate_proj",
],
lora_dropout=0.05,
bias="none",
task_type="CAUSAL_LM"
)
model = get_peft_model(model=model, peft_config=config, adapter_name="trainable")
model.print_trainable_parameters()
Output:
trainable params: 0 || all params: 283,381,760 || trainable%: 0.0
When model = get_peft_model(model=model, peft_config=config, adapter_name="trainable") is changed to model = get_peft_model(model=model, peft_config=config) I get the following output
I would like the custom names to work identically to the default name. This helps when using Option 3 with PEFT as listed in the DPO docs (https://huggingface.co/docs/trl/main/en/dpo_trainer). Many model authors have been merging their adapter weights after SFTing their models, requiring me to create a new adapter to use this option.
System Info
Who can help?
@pacman100 @younesbelkada
Information
Tasks
examples
folderReproduction
When model = get_peft_model(model=model, peft_config=config, adapter_name="trainable") is changed to model = get_peft_model(model=model, peft_config=config) I get the following output
Output: trainable params: 20,971,520 || all params: 283,381,760 || trainable%: 7.400448074004481
Expected behavior
I would like the custom names to work identically to the default name. This helps when using Option 3 with PEFT as listed in the DPO docs (https://huggingface.co/docs/trl/main/en/dpo_trainer). Many model authors have been merging their adapter weights after SFTing their models, requiring me to create a new adapter to use this option.