UPSTREAM PR #17712: fix: convert_hf_to_gguf - map new mistral-common valid_tokenizer_files output to avoid crash with --mistral-format #410
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.
Mirrored from ggml-org/llama.cpp#17712
Fixes #17691
mistral-commonupdated_filter_valid_tokenizer_filesto return additional data we don't need or expect, causing the conversion to crash when--mistral-formatis used.This change just maps the output back into the format originally expected.
Tested on
mistral-common==1.8.3andmistral-common==1.8.6... that said, there's a different issue with the new Ministral models, which is partially related to how
--mistral-formatworks:get_community_chat_templates()is invoked with--mistral-format, and the logic there results in the model getting the"unsloth-mistral-Devstral-Small-2507.jinja"template - not Ministral's localchat_template.jinja- that's only used forSpecialVocabmodels (notMistralVocab).To avoid this, users currently need to manually specify the chat template when running the model on e.g: llama-server with
--jinja --chat-template-file "./chat_template.jinja"This issue is the case regardless of this PR - as long as
--mistral-formatis used I think.