baichuan-inc / Baichuan2

A series of large language models developed by Baichuan Intelligent Technology
https://huggingface.co/baichuan-inc
Apache License 2.0
4.03k stars 289 forks source link

baichuan2-13B-chat,生成速度慢,输出时是乱码,十几个字符后程序就蹦了,求助原因 #361

Closed blueskyban closed 5 months ago

blueskyban commented 5 months ago

欢迎使用百川大模型,输入进行对话,vim 多行输入,clear 清空历史,CTRL+C 中断生成,stream 开关流式生成,exit 结束。

用户:hello

Baichuan 2:珉成都import有人"'"'改编趀券ubbException in thread Thread-2 (generate): Traceback (most recent call last): File "/home/anaconda/envs/baichuan2/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/home/anaconda/envs/baichuan2/lib/python3.10/threading.py", line 953, in run self._target(*self._args, *self._kwargs) File "/home/anaconda/envs/baichuan2/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(args, **kwargs) File "/home/anaconda/envs/baichuan2/lib/python3.10/site-packages/transformers/generation/utils.py", line 1565, in generate return self.sample( File "/home/anaconda/envs/baichuan2/lib/python3.10/site-packages/transformers/generation/utils.py", line 2648, in sample next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1) RuntimeError: probability tensor contains either inf, nan or element < 0