You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you very much for open-sourcing this project!
I found in your be_great/great.py, self.efficient_finetuning support lora. I've come across a few bugs that I may need help with.
[1] GReaT.load_from_dir() will lead to the state dict mismatch.
Missing key(s) in state_dict: "transformer.wte.weight" ...
Unexpected key(s) in state_dict: "base_model.model.transformer.wte.weight" ...
[2] net.sample(n_samples, k=50) returns
AttributeError: 'GPT2LMHeadModel' object has no attribute 'generation_config'
Thanks
The text was updated successfully, but these errors were encountered:
I just faced the same problem. The problem is that the load_from_dir() method does not create the correct model.
This is a workaround:
frombe_greatimportGReaTgreat=GReaT('distilgpt2')
# Define LoRA Configlora_config=LoraConfig(
r=16, # only training 0.16% of the parameters of the modellora_alpha=32,
target_modules=[
"c_attn"
], # this is specific for gpt2 model, to be adaptedlora_dropout=0.05,
bias="none",
task_type=TaskType.CAUSAL_LM, # this is specific for gpt2 model, to be adapted
)
# add LoRA adaptorgreat.model=get_peft_model(great.model, lora_config)
great.model.print_trainable_parameters()
great.model.load_state_dict(torch.load("model.pt"))
importjson# Load attributeswithopen("config.json", "r") asf:
attributes=json.load(f)
# Set all attributesfork, vinattributes.items():
setattr(great, k, v)
Hi:
Thank you very much for open-sourcing this project!
I found in your
be_great/great.py
,self.efficient_finetuning
support lora. I've come across a few bugs that I may need help with.[1] GReaT.load_from_dir() will lead to the state dict mismatch.
[2] net.sample(n_samples, k=50) returns
Thanks
The text was updated successfully, but these errors were encountered: