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

"conf", "logits", and "probs" are all NaN #1

Closed
chrisole opened this issue Mar 5, 2024 · 4 comments
Closed

"conf", "logits", and "probs" are all NaN #1

chrisole opened this issue Mar 5, 2024 · 4 comments

Comments

@chrisole
Copy link

chrisole commented Mar 5, 2024

Hi! Thanks for your work.
I try to reproduce 'run_gpt.py' on several datasets.
However, the 'eval_res.json' shows: {"index": 0, "true": 0, "pred": 0, "conf": NaN, "logits": [NaN, NaN], "probs": [NaN, NaN]} from the first time save the checkpointss. I try different learning rates but the results are the same.
Foundation model is llama2-7b-chat.
Do you know the reason? Thanks!

@adamxyang
Copy link
Owner

Hi, thanks for your interests! It looks like a NaN error occurs during training, could you check if the model's outputs and loss go NaN during training? I have previously experienced similar issues when training reward models with PEFT, there seems to be some issue with PEFT version and weights' precision that can cause NaN during training, you could also try adding torch_dtype=torch.bfloat16 when loading the model.

@chrisole
Copy link
Author

chrisole commented Mar 6, 2024

Many thanks for your reply!
By the way, may I ask if this method also adaptive to auto-regressive languge generation? I noticed that these reasoning datasets are all like classification. I plan to extent your approach to longer sequence generation (e.g., Q&A task), is it feasible?I would appreciate if you give some advice : )

@adamxyang
Copy link
Owner

The current linearised Laplace framework only looks at uncertainty on a single prediction token, this may not translate easily to sentence-level uncertainty, and computing Jacobians could be quite costly. Currently, we're only working on extending the single token uncertainty to other settings, e.g. reward modelling. Also we have released a new more efficient and self-contained library here, that we plan to maintain in the future.

@chrisole
Copy link
Author

chrisole commented Mar 6, 2024

Thanks a lot!

@chrisole chrisole closed this as completed Mar 6, 2024
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

2 participants