how to inference with transformers pipeline?

#54
by Zoitd - opened

how to inference with hugging face transformers pipeline? I tried the following code, but encountered an error.
怎么使用hugging face transformers pipeline来运行这个模型,我尝试了下面的这段代码,但是报错了。

from transformers import pipeline
pipe = pipeline("visual-question-answering", model="openbmb/MiniCPM-Llama3-V-2_5", trust_remote_code=True)

I also had an issue with the same code for pipeline. The error message was: ValueError: Unrecognized configuration class <class 'transformers_modules.openbmb.MiniCPM-Llama3-V-2_5.45387f99a455e11801b78a0b24811856688e0c8b.configuration_minicpm.MiniCPMVConfig'> for this kind of AutoModel: AutoModelForVisualQuestionAnswering.
Model type should be one of BlipConfig, Blip2Config, ViltConfig.
Does anyone have any ideia how to fix it?

this model is not implemented in transformers, and also this model should be image-text-to-text and not VQA, I opened a PR

Sign up or log in to comment