-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] RuntimeError: shape '[-1, 0]' is invalid for input of size #405
Comments
Phi-3 4B报这个错是因为transformers版本太新了,好像有什么接口发生了变化,使用transformers 4.37.2是可以正常运行的。我这两天有些比较紧急的工作要处理,可能得过几天才能做这个高版本的兼容(按理说可以直接从transformers里面import Phi3了,我记得是整合进去了,这里可能需要根据版本号做判断) (如果您愿意的话,欢迎给我们提PR) |
好的,非常感谢您! |
any work being done on this issue? |
@maxaitel if inputs_embeds is not None and past_key_values is None:
model_inputs = {"inputs_embeds": inputs_embeds}
else: to if (inputs_embeds is not None and past_key_values is None) or (inputs_embeds is not None and len(past_key_values)==0):
model_inputs = {"inputs_embeds": inputs_embeds}
else: |
Checklist
Describe the bug
使用 https://www.modelscope.cn/models/OpenGVLab/InternVL2-4B 官方 Quick Start demo 进行视频推理时报错,这是代码:
仅仅改了文件路径
Reproduction
出现了下面报错
更换视频还是不行
Environment
The text was updated successfully, but these errors were encountered: