Open godcmappalling opened 1 year ago
你好,欢迎支持聚宝盆! 你的问题我试了一下,我这边跑infer.sh 没问题。 我的运行环境及包版本: python=3.9.16 (推荐使用 python3.9) peft==0.5.0.dev0 transformers==4.31.0
你好,欢迎支持聚宝盆! 你的问题我试了一下,我这边跑infer.sh 没问题。 我的运行环境及包版本: python=3.9.16 (推荐使用 python3.9) peft==0.5.0.dev0 transformers==4.31.0
可以提供一下其他包的版本,以及CUDA版本吗?改成python3.9还是有报错
运行报错代码如下:
infering
((), (), (), ()) tensor([0, 0, 0, 0], device='cuda:0') Traceback (most recent call last): File "/home/pxc/Cornucopia-LLaMA-Fin-Chinese/infer.py", line 168, in
main()
File "/home/pxc/Cornucopia-LLaMA-Fin-Chinese/infer.py", line 154, in main
infer_from_json(args.instruct_dir)
File "/home/pxc/Cornucopia-LLaMA-Fin-Chinese/infer.py", line 145, in infer_from_json
model_output = evaluate(instruction)
File "/home/pxc/Cornucopia-LLaMA-Fin-Chinese/infer.py", line 120, in evaluate
generation_output = model.generate(
File "/home/zengbo/anaconda3/envs/Cornucopia/lib/python3.10/site-packages/peft-0.5.0.dev0-py3.10.egg/peft/peft_model.py", line 1002, in generate
File "/home/zengbo/anaconda3/envs/Cornucopia/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/zengbo/anaconda3/envs/Cornucopia/lib/python3.10/site-packages/transformers/generation/utils.py", line 1628, in generate
return self.beam_search(
File "/home/zengbo/anaconda3/envs/Cornucopia/lib/python3.10/site-packages/transformers/generation/utils.py", line 3010, in beam_search
beam_indices = tuple((beam_indices[beam_idx[i]] + (beam_idx[i],) for i in range(len(beam_indices))))
File "/home/zengbo/anaconda3/envs/Cornucopia/lib/python3.10/site-packages/transformers/generation/utils.py", line 3010, in
beam_indices = tuple((beam_indices[beam_idx[i]] + (beam_idx[i],) for i in range(len(beam_indices))))
IndexError: tuple index out of range
============================= 若不进行生成model.generate,直接输出模型推理结果,返回值有大量nan