Repository navigation
Fix vision model GGUF quantization_method error type - #3173
Merged
danielhanchen merged 1 commit intoAug 18, 2025
Merged
danielhanchen merged 1 commit into
danielhanchen merged 1 commit into
Conversation
abiswas-realadvice
pushed a commit
to abiswas-realadvice/unsloth
that referenced
this pull request
May 14, 2026
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.
RELATED ISSUES/PRs
194d237
#3050
#1504 (comment)
https://discord.com/channels/1179035537009545276/1400212019482722384/1400212767440633979
#2209
PROBLEM
Quantization_method function argument was recently introduced to
save_to_gguf_genericmethod in order to resolve an issue users were previously having when callingsave_to_gguf_genericdirectly. However this fix caused a typeError for vision models.When calling
model.save_pretrained_gguf("dir", tokenizer, quantization_method="q4_k_m")on vision models, users encounter aTypeError: Unsloth: quantization_method can only be a string or a list of strings.This happens because:
save_to_gguf_genericfor GGUF savingsave_to_gguf_genericdoesn't accept atokenizerparameter in its signaturePixtralProcessor) gets passed as thequantization_methodparameter due to positional argument shiftingSOLUTION
tokenizerparameter tosave_to_gguf_genericfunction signatureTESTS