模型推理时始终出现错误
htesd opened this issue · 1 comments
htesd commented
System Info / 系統信息
系统:ubuntu22.04
设备 A100*8
推理的时候cli_demo cli_demo_muti_gpus web_demo 在模型推理时都会出现:
File "/home/iiap/.cache/huggingface/modules/transformers_modules/cogvlm2-llama3-chinese-chat-19B/modeling_cogvlm.py", line 403, in forward
return self.llm_forward(
^^^^^^^^^^^^^^^^^
File "/home/iiap/.cache/huggingface/modules/transformers_modules/cogvlm2-llama3-chinese-chat-19B/modeling_cogvlm.py", line 453, in llm_forward
past_key_values_length = past_key_values[0][0].shape[2]
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'shape'
Who can help? / 谁可以帮助到您?
No response
Information / 问题信息
- The official example scripts / 官方的示例脚本
- My own modified scripts / 我自己修改的脚本和任务
Reproduction / 复现过程
clone 模型和代码,更改代码路径为本地后按照readme运行报错
Expected behavior / 期待表现
希望能够正常推理
zRzRzRzRzRzRzR commented
依赖没装对,transformer装4.40版本