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

Loss is "nan" while training gpt2 #238

Closed
sankethgadadinni opened this issue Jul 27, 2023 · 2 comments
Closed

Loss is "nan" while training gpt2 #238

sankethgadadinni opened this issue Jul 27, 2023 · 2 comments

Comments

@sankethgadadinni
Copy link

sankethgadadinni commented Jul 27, 2023

model = BaseModel.create("gpt2")
instruction_dataset = InstructionDataset("/content/alpaca_data")
model.finetune(dataset=instruction_dataset)

Am I doing something wrong?

image

@tushar2407
Copy link
Contributor

Hi @sankethgadadinni , No you are not doing anything wrong, it's just that may be the loss is so high or so low in your case that it cannot be handled and hence you are getting NAN. It's normal to get that in many cases.

@tushar2407
Copy link
Contributor

@sankethgadadinni were you able to load the model after fine-tuning? Does the model work after fine-tuning?
I can help you with walking through the process, I am hold an all-hands session coming Friday, you are welcome to join!!
For more details please head to discord channel: https://discord.gg/xj5j3VJC

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

3 participants