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

Update Mistral conversion script #34829

Merged
merged 3 commits into from
Dec 5, 2024
Merged

Update Mistral conversion script #34829

merged 3 commits into from
Dec 5, 2024

Conversation

Cyrilvallez
Copy link
Member

@Cyrilvallez Cyrilvallez commented Nov 20, 2024

What does this PR do?

Update/refactor Mistral conversion script to work with latest models.

cc @ArthurZucker

@Cyrilvallez Cyrilvallez marked this pull request as ready for review November 20, 2024 15:24
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice thanks! Would be great to keep the is-v3 to not have a breaking change!

parser.add_argument(
"--is_v3", action="store_true", help="Whether the checkpoints correspond to the 3rd version or not."
"--modules_are_split",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

equivalent to is v3 no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but it's actually the opposite (is_v3 = not modules_are_split) because this corresponds to an old case, so I switched the default which makes much more sense now. But I can revert if needed

@Cyrilvallez
Copy link
Member Author

IMO it makes more sense now (the keyword is more descriptive, and this case is very unlikely to reappear in future conversions), but I can revert if you think it can break some backward stuff! 🤗

@Cyrilvallez Cyrilvallez merged commit 3544705 into main Dec 5, 2024
10 checks passed
@Cyrilvallez Cyrilvallez deleted the mistral-converter branch December 5, 2024 14:47
BernardZach pushed a commit to innovationcore/transformers that referenced this pull request Dec 6, 2024
* Update convert_mistral_weights_to_hf.py

* Update convert_mistral_weights_to_hf.py

* Update convert_mistral_weights_to_hf.py
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