i am facing the error while i am trying to train the blip2 condition generation for question answer purpose
the error is : TypeError: Blip2ForConditionalGeneration.forward() got an unexpected keyword argument ‘inputs_embeds’
i am passing only input_ids,pixel_value,attention_mask,lables only
1 Like
Hi there!
It looks like Blip2ForConditionalGeneration
doesn’t expect inputs_embeds
as an argument in the forward()
function, which is causing the error. Since you mentioned you’re only passing input_ids
, pixel_values
, attention_mask
, and labels
,
Check the model’s documentation – Some models expect specific arguments. Try running:
from transformers import Blip2ForConditionalGeneration
model = Blip2ForConditionalGeneration.from_pretrained("your_model_name")
print(model.forward.__doc__)
This will show what arguments the forward()
method accepts.
Hope this help!
1 Like