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

RuntimeError: probability tensor contains either inf, nan or element < 0 #467

Open
AI-Zebra opened this issue Nov 2, 2023 · 0 comments
Open

Comments

@AI-Zebra
Copy link

AI-Zebra commented Nov 2, 2023

I have fine tuned a llama 7b model and when I try to run the fine tuned model I get below error:

python generate/lora.py
16-true
Loading model ...
Time to load model: 8.74 seconds.
Traceback (most recent call last):
File "/home/azureuser/lit-llama/generate/lora.py", line 129, in
CLI(main)
File "/usr/local/lib/python3.10/dist-packages/jsonargparse/_cli.py", line 96, in CLI
return _run_component(components, cfg_init)
File "/usr/local/lib/python3.10/dist-packages/jsonargparse/_cli.py", line 181, in _run_component
return component(**cfg)
File "/home/azureuser/lit-llama/generate/lora.py", line 101, in main
output = generate(
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/azureuser/lit-llama/generate.py", line 74, in generate
idx_next = torch.multinomial(probs, num_samples=1).to(dtype=dtype)
RuntimeError: probability tensor contains either inf, nan or element < 0

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