Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add conversion for interleave llava #31858

Merged
merged 5 commits into from
Jul 10, 2024

Conversation

zucchini-nlp
Copy link
Member

What does this PR do?

Adds conversion script for the models proposed in this blog post.

Briefly: Llava-Next_Interleave is a series of models trained with interleaved visual inputs, including video and 3D images. Even though it's a lllava-next series, the authors have hardcoded the inference script to not use anyres technique, so I added it in LLaVa. We will not support video natively as LLaVaNeXTVideo, but user can pass each frame separately as if it's an interleaved image input

The main idea was to support the 0.5B checkpoint, because it has same performance as llava-next-7b in the blog post. Imo it can be a cool addition

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding!

Copy link
Contributor

@NielsRogge NielsRogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding! Pretty cool that the conversion works out-of-the-box with SigLIP instead of CLIP as vision encoder.

@zucchini-nlp zucchini-nlp merged commit 97aa3e2 into huggingface:main Jul 10, 2024
8 checks passed
amyeroberts added a commit to amyeroberts/transformers that referenced this pull request Jul 19, 2024
* add conversion for interleave llava

* remove debug lines

* remove unused imports

* Update src/transformers/models/llava/convert_llava_weights_to_hf.py

Co-authored-by: amyeroberts <[email protected]>

* small changes + docs

---------

Co-authored-by: amyeroberts <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants