-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
LLaVa_mistral models are unrecognized #37087
Comments
@darshpatel1052 hey! Yes, the model is not supported by transformers, but you can still use LLaVa Med repo for inference. It seems to me that LLaVA Med has same arch as the llava model we have in transformers, so supporting it might be easy by converting the weights. I do not have much bandwidth to work on adding more models, but if you or anyone else wants to work on, feel free. To add the model, you can start on spotting the diffs between Llava-Med and simple Llava model, as I'd prefer to re-use existing |
Yes see my comment here on how to convert it to the Transformers format. |
@zucchini-nlp Thank you for your response, |
Great, thanks! From what I see in LLaVa-Med repo, they do not match. LLaVa config should consist of a separate text and vision configs, and the model will load the corresponding backbones with config. The conversion script handles adapting configs, but afair it is only for LLaVA. So if LLaVA-Med has different text/vision backbones, you'll need to adapt. Same for checkpoint key conversion Also, please make sure if it is simple llava or llava-next with patches style model. We'll need to use a different class if the model does patching for images |
System Info
Issue Title: Support for
llava_mistral
Model ArchitectureEnvironment Information
<4.51.0dev0>
2.5.1
11.8
A4000
Describe the Bug
Reference Code:
I am trying to load the
microsoft/llava-med-v1.5-mistral-7b
model usingAutoModelForCausalLM.from_pretrained
, but I encounter the following error:Expected Behavior
The model should load successfully using
AutoModelForCausalLM.from_pretrained
.Additional Context
I have tried upgrading
transformers
to the latest version using:I also tried installing the development version of
transformers
from the source:However, the issue persists.
The model type
llava_mistral
seems to be unsupported by the current version oftransformers
. If this architecture is not yet supported, could you provide guidance on when it might be added or how I can manually add support for this model?Request
Please add support for the
llava_mistral
model architecture in thetransformers
library or provide instructions on how to proceed with loading this model.Links
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Expected behavior
The model should load successfully using
AutoModelForCausalLM.from_pretrained
.The text was updated successfully, but these errors were encountered: