Skip to content

Finetune LLaVaNeXT -> ValueError: Image features and image tokens do not match #492

@benjwolff

Description

@benjwolff

Hi everyone,

I tried running the notebook provided here for finetuning LLaVaNeXT:
https://github.com/NielsRogge/Transformers-Tutorials/blob/master/LLaVa-NeXT/Fine_tune_LLaVaNeXT_on_a_custom_dataset_(with_PyTorch_Lightning).ipynb

However, during training, I encountered the following error:
ValueError: Image features and image tokens do not match: tokens: 251, features 2160

Im using transformers==4.51.3 and did not modify the notebook. I attempted to debug this by reviewing the code around the collate function, but couldn’t find the issue. Has anyone else run into this error or might have ideas on what’s going wrong?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions