SHI-Labs / CuMo

CuMo: Scaling Multimodal LLM with Co-Upcycled Mixture-of-Experts
Apache License 2.0
132 stars 11 forks source link

NameError: name 'LlavaMixtralForCausalLM' is not defined #8

Closed makemecker closed 4 months ago

makemecker commented 4 months ago

Hello!

I am encountering the same issue described in issue #1, but there was no solution provided in the closed issue.

When running the command to pre-train the MLP connector (getting_started.md):

bash scripts/cumo/mistral_7b/pretrain_mistral_7b.sh

I receive the following error:

NameError: name 'LlavaMixtralForCausalLM' is not defined

I tried adding the line to the script scripts/cumo/mistral_7b/pretrain_mistral_7b.sh:

from llava.model.language_model.llava_mistral import LlavaMistralForCausalLM

However, this led to an error:

ImportError: cannot import name 'LlavaLlamaForCausalLM' from 'llava.model' (/home/tyugunov/modules/llava/llava/model/__init__.py)

I saw that @leoozy encountered the same issue but did not provide a solution before closing the issue. Could anyone please provide guidance on how to resolve this problem?

Thank you!

chrisjuniorli commented 4 months ago

Can you replace the llava.model with cumo.model, it seems the file dir is under llava rather than cumo here

makemecker commented 4 months ago

Can you replace the llava.model with cumo.model, it seems the file dir is under llava rather than cumo here

@chrisjuniorli , Hello!

Thank you so much for your assistance! Replacing llava.model with cumo.model worked like a charm)