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 llama3-llava-next-8b to convert_llava_next_weights_to_hf.py #31394

Closed
jamt9000 opened this issue Jun 12, 2024 · 0 comments · Fixed by #31395
Closed

Add llama3-llava-next-8b to convert_llava_next_weights_to_hf.py #31394

jamt9000 opened this issue Jun 12, 2024 · 0 comments · Fixed by #31395
Labels
Feature request Request for a new feature

Comments

@jamt9000
Copy link
Contributor

jamt9000 commented Jun 12, 2024

Feature request

The convert_llava_next_weights_to_hf.py script does not support converting the LLaVA-NeXT model based on Llama3-8B, llama3-llava-next-8b (announced here) meaning it is hard to load the weights of this model with LlavaNextForConditionalGeneration from the transformer library.

Motivation

Adding support would allow loading llama3-llava-next-8b, which is a strong multimodal model, with LlavaNextForConditionalGeneration included in the transformers lib, allowing full support for transformers functionality (in particular I'd like to use it with vLLM which only implements support for LlavaNextForConditionalGeneration rather than the model implementation from the LLaVA repo).

Your contribution

I have confirmed that modifying the script to add lmms-lab/llama3-llava-next-8b and setting

        text_model_id = "meta-llama/Meta-Llama-3-8B-Instruct"
        image_token_index = 128256

works and the model output seems sensible (although I'm unsure of the exact subtleties of the conversion and extra tokens). I have made a PR: #31395

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant