Error raised when running the provided official code

#1
by linlinlinlinsdada - opened

Error raised at this line:
r1, scores1 = model.generate_content([
PIL.Image.open(files[0]),
prompt
])

more details:
-> 3249 next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1)
3250 else:
3251 next_tokens = torch.argmax(next_token_scores, dim=-1)
RuntimeError: probability tensor contains either inf, nan or element < 0

Why is this error? Even if I remove the image as:
r1, scores1 = model.generate_content([
prompt
])
It still raises the same error. And it seems to be very sensitive to the prompt. Any previous model can be used as the VLM verifier for best of N selection?

linlinlinlinsdada changed discussion status to closed

Sign up or log in to comment