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

load_pretrained_model() missing 1 required positional argument: 'model_name' when evaluating VILA-7b #441

Open
huayicong23 opened this issue Dec 4, 2024 · 3 comments

Comments

@huayicong23
Copy link

huayicong23 commented Dec 4, 2024

Description
running the following command results in a missing 1 required positional argument error,the original code in vila.py is :
self._tokenizer, self._model, self._image_processor, self._max_length = load_pretrained_model(pretrained, self.model_name, device_map=self.device_map, attn_implementation=attn_implementation)
if I modify it like llava_onevision.py:
self._tokenizer, self._model, self._image_processor, self._max_length = load_pretrained_model(pretrained, None, self.model_name, device_map=self.device_map, attn_implementation=attn_implementation)
This will result in following error:
image

Example Command
image

Error message
image

environments
image

@pufanyi
Copy link
Collaborator

pufanyi commented Dec 20, 2024

Hello! I'm not sure but based on my experience, maybe you can check if you have installed deepspeed and flash-attn. It seems that VILA requires these 2 packages, but they need to install separately. If these two packages are not installed, this strange error message will be triggered.

@pufanyi
Copy link
Collaborator

pufanyi commented Dec 20, 2024

Just run

python -m pip install flash-attn --no-build-isolation
python -m pip install deepspeed

@pufanyi
Copy link
Collaborator

pufanyi commented Dec 20, 2024

And as a reminder, when you run VILA, you need to install llava from VILA repo instead of LLaVA repo, which is:

git clone [email protected]:NVlabs/VILA.git
cd VILA
python -m pip install -e .

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

No branches or pull requests

2 participants