Skip to content

Update Mixtral modeling#28403

Closed
imoneoi wants to merge 1 commit into
huggingface:mainfrom
imoneoi:patch-1
Closed

Update Mixtral modeling#28403
imoneoi wants to merge 1 commit into
huggingface:mainfrom
imoneoi:patch-1

Conversation

@imoneoi

@imoneoi imoneoi commented Jan 9, 2024

Copy link
Copy Markdown

What does this PR do?

The Mixtral technical report was published recently, showing that Mixtral routing weights are calculated in the top-K before softmax order.

This PR updates the Mixtral model implementation accordingly.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@ArthurZucker @younesbelkada

The [Mixtral technical report](https://arxiv.org/pdf/2401.04088.pdf) was published recently, showing that Mixtral routing weights are calculated in the top-K before softmax order.
@casper-hansen

Copy link
Copy Markdown

It worries me a little bit that Mistral has different implementations for this specific process in the model.

They submitted a PR to vLLM which is aligned with the current Huggingface implementation:

mistralai/vllm-release@3e21dac#diff-74473eb619768ed055303d29d74c47b1753615e8323e69467506b2b42d3f9898R341-R344

@ArthurZucker

Copy link
Copy Markdown
Collaborator

Yep, we tried to follow this instead of the paper as they shared that code. Thanks for submitting a pr anyways 🤗

@github-actions

github-actions Bot commented Feb 8, 2024

Copy link
Copy Markdown
Contributor

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions Bot closed this Feb 16, 2024
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

Successfully merging this pull request may close these issues.

3 participants