You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/InternLM/hf_test.py", line 15, in <module>
output = model.generate(**inputs, **gen_kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/transformers/generation/utils.py", line 1592, in generate
return self.sample(
File "/opt/conda/lib/python3.10/site-packages/transformers/generation/utils.py", line 2734, in sample
next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1)
RuntimeError: probability tensor contains either `inf`, `nan` or element < 0
Describe the bug
使用internevo训练,转换成hf模型用opencompass测试ppl的时候有一定概率会nan,opencompass默认是用fp16测试的,是因为这个原因导致的嘛?切换成bf16后这个问题能够解决,但是其他的hf模型并没有这个问题,请问和use_fp32_norm有关嘛,训练用的bf16
Environment
官方镜像
Other information
No response
The text was updated successfully, but these errors were encountered: