lit-llama icon indicating copy to clipboard operation
lit-llama copied to clipboard

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

Open AI-Zebra opened this issue 1 year ago • 0 comments

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

AI-Zebra avatar Nov 02 '23 18:11 AI-Zebra