Add traceable mistral and mistral3 classes#1343
Closed
Conversation
|
👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review. Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed. |
dsikka
requested changes
Apr 10, 2025
Collaborator
dsikka
left a comment
There was a problem hiding this comment.
I think if we want to ignore linting/style, we should add lines to skip linting:
e.g:
Collaborator
Author
I wasn't aware this is an option. Done. Thanks |
Collaborator
Author
|
Converted to draft because things are still in flux until we upgrade transformers support |
Collaborator
kylesayrs
added a commit
that referenced
this pull request
Jun 3, 2025
## Purpose ## * Add support for mistral3 * Related: #1343 ## Prerequisites ## * #1479 ## Changes ## * Added mistral3 example * This model does not automatically change the dtype of pixel_values to match the dtype of the model, so I had to do so manually in the collator and sample generation * This model has a [very verbose chat template by default](https://huggingface.co/mistralai/Mistral-Small-3.1-24B-Instruct-2503/blob/main/chat_template.json), which may be less conducive to calibration, so I added a custom shortened version ## Testing ## * Ran example to completion: [nm-testing/Mistral-Small-3.1-24B-Instruct-2503-W4A16-G128](https://huggingface.co/nm-testing/Mistral-Small-3.1-24B-Instruct-2503-W4A16-G128) --------- Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
aireilly
pushed a commit
to aireilly/llm-compressor
that referenced
this pull request
Jul 30, 2025
## Purpose ## * Add support for mistral3 * Related: vllm-project#1343 ## Prerequisites ## * vllm-project#1479 ## Changes ## * Added mistral3 example * This model does not automatically change the dtype of pixel_values to match the dtype of the model, so I had to do so manually in the collator and sample generation * This model has a [very verbose chat template by default](https://huggingface.co/mistralai/Mistral-Small-3.1-24B-Instruct-2503/blob/main/chat_template.json), which may be less conducive to calibration, so I added a custom shortened version ## Testing ## * Ran example to completion: [nm-testing/Mistral-Small-3.1-24B-Instruct-2503-W4A16-G128](https://huggingface.co/nm-testing/Mistral-Small-3.1-24B-Instruct-2503-W4A16-G128) --------- Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY:
This PR adds traceable versions of Mistral and Mistral3.
NOTE:
The code fails quality and style tests, but I think we should ignore them. The failures occur at the model definitions ported from transformers and keeping the changes to a minimal would help to maintain these. I added ignore commands to the headers to automatically skip linting.
TEST PLAN: