Skip to content
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

'LoraConfig' is not defined #81

Open
EddieEduardo opened this issue Mar 18, 2024 · 3 comments
Open

'LoraConfig' is not defined #81

EddieEduardo opened this issue Mar 18, 2024 · 3 comments

Comments

@EddieEduardo
Copy link

Hi, great work! Thanks for sharing!

When I trained the released codes after feeding the weights and data as provided in readme, I encountered an error as follows:

1710749903540

I did not make any changes on codes, could you please tell me how to fix thix issue?

Thanks a lot!

@EddieEduardo
Copy link
Author

peft_config = LoraConfig(
task_type=TaskType.CAUSAL_LM,
inference_mode=False,
r=self.args['lora_r'],
lora_alpha=self.args['lora_alpha'],
lora_dropout=self.args['lora_dropout'],
target_modules=['q_proj', 'k_proj', 'v_proj', 'o_proj']
)

TaskType is also not defined.

@EddieEduardo
Copy link
Author

Add the following 2 lines at the very beginning of the current file:
from transformers import LlamaTokenizer
from peft import *

@EddieEduardo
Copy link
Author

It is quite time-consuming loading models (almost 6 minutes), any optimizing solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant