Skip to content

Conversation

@rabintiwari45
Copy link
Contributor

This PR adds a check to safely skip vision models that do not have the quant_state attribute, such as:

unsloth/Llama-3.2-11B-Vision-Instruct-bnb-4bit

unsloth/granite-vision-3.2-2b

Without this check, attempting to access quant_state on these models results in an AttributeError. This update ensures robustness when loading or iterating over models in the unsloth_zoo package by printing a warning and continuing gracefully.

This pr is linked to #2701 pr in unsloth.

@danielhanchen
Copy link
Contributor

Thanks @rabintiwari45 - wait bitsandbytes 4bit layers should always have quant_state - weird some dont?

@rabintiwari45
Copy link
Contributor Author

Yep, in the model from the PR mentioned above, quant_state was missing

@danielhanchen danielhanchen merged commit 9d26a3c into unslothai:main Jun 19, 2025
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.

2 participants