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

Fix AttributeError: MixtralModel object has no attribute org_vocab_size. #2875

Closed
wants to merge 1 commit into from

Conversation

Pernekhan
Copy link
Contributor

@Pernekhan Pernekhan commented Feb 14, 2024

Mixtral cannot start because of this error:

  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1695, in __getattr__
    raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'MixtralModel' object has no attribute 'org_vocab_size'. Did you mean: 'vocab_size'?

Related PR: #2831

@pcmoritz
Copy link
Collaborator

You are right, this is indeed broken at the moment!

There seems to be some divergence on how things are working for Mistral vs. Mixtral (Mixtral has self.vocab_size = config.vocab_size whereas Mistral has self.vocab_size = config.vocab_size + lora_vocab and self.org_vocab_size = config.vocab_size) -- any thoughts about this @Yard1 ?

@pcmoritz pcmoritz mentioned this pull request Feb 14, 2024
5 tasks
@Yard1
Copy link
Collaborator

Yard1 commented Feb 14, 2024

For this, Mistral has the correct logic and Mixtral should follow it exactly.

@pcmoritz
Copy link
Collaborator

Let me try to update that @Pernekhan do you mind if I push to your PR to update it?

@pcmoritz
Copy link
Collaborator

Unfortunately I couldn't push to this PR, so made a new one including your commit @Pernekhan :)

#2880

@Yard1 Yard1 closed this in #2880 Feb 15, 2024
Yard1 pushed a commit that referenced this pull request Feb 15, 2024
* Fix AttributeError: MixtralModel object has no attribute org_vocab_size.

* Make LoRA logic for Mistral and Mixtral the same

---------

Co-authored-by: Pernekhan Utemuratov <[email protected]>
xjpang pushed a commit to xjpang/vllm that referenced this pull request Feb 20, 2024
…vllm-project#2880)

* Fix AttributeError: MixtralModel object has no attribute org_vocab_size.

* Make LoRA logic for Mistral and Mixtral the same

---------

Co-authored-by: Pernekhan Utemuratov <[email protected]>
xjpang pushed a commit to xjpang/vllm that referenced this pull request Feb 22, 2024
…vllm-project#2880)

* Fix AttributeError: MixtralModel object has no attribute org_vocab_size.

* Make LoRA logic for Mistral and Mixtral the same

---------

Co-authored-by: Pernekhan Utemuratov <[email protected]>
xjpang pushed a commit to xjpang/vllm that referenced this pull request Mar 4, 2024
…vllm-project#2880)

* Fix AttributeError: MixtralModel object has no attribute org_vocab_size.

* Make LoRA logic for Mistral and Mixtral the same

---------

Co-authored-by: Pernekhan Utemuratov <[email protected]>
Temirulan pushed a commit to Temirulan/vllm-whisper that referenced this pull request Sep 6, 2024
…vllm-project#2880)

* Fix AttributeError: MixtralModel object has no attribute org_vocab_size.

* Make LoRA logic for Mistral and Mixtral the same

---------

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

Successfully merging this pull request may close these issues.

4 participants