AssertionError: Padding_idx must be within num_embeddings

#2
by ZeevRispler - opened

anyone else got this error?
happens in this line:
model = AutoModelForVision2Seq.from_pretrained(
"HuggingFaceM4/Idefics3-8B-Llama3",
torch_dtype=torch.bfloat16,
).to(DEVICE)

i have the updated transformers using the PR.

HuggingFaceM4 org

Hi @ZeevRispler , merve had this issue yesterday and managed to fix it by updating the cache on transformers. Can you try that?

Hey @andito Thanks fo the resopnse! can you maybe send a link? i tried deleiting the cache but it didn't help.

HuggingFaceM4 org

A link to what?

If it's the issue from merve, we talked about it on slack, sorry, no link :sweat_smile:

Let me check this again on a clean repo

HuggingFaceM4 org

I hate to say this but it works on my computer :( Are you following a tutorial or what are you doing exactly?

Same problem here...straight after downloading the model from the repo.

Screenshot 2024-08-11 at 00.46.46.png

In my case all I did was running the line of code in the model card

model = AutoModelForVision2Seq.from_pretrained(
"HuggingFaceM4/Idefics3-8B-Llama3",
).to(DEVICE)

Sign up or log in to comment