Skip to content

Fix loftq None config for FastBaseModel - #2848

Merged
danielhanchen merged 1 commit into
unslothai:mainfrom
mmathew23:loftq_fix
Jun 30, 2025
Merged

danielhanchen merged 1 commit into
unslothai:mainfrom
mmathew23:loftq_fix

Conversation

@mmathew23

Copy link
Copy Markdown
Contributor

Many notebooks explicitly pass None into loftq where the default is set to {}. When we passed the loftq_config to FastBaseModel.get_peft_model those notebooks would fail becuase peft expects a dict or LoftQConfig. To fix I used the same loftq logic from llama.py and set a default loftq_config for FastBaseModel.

#2845

Tested that the notebook in question now works.

https://colab.research.google.com/drive/1rl30wn1VRI1HQ20rdhRr0YF0zMxhwUYb?usp=sharing

add new validate_loftq_config to __all__
@danielhanchen
danielhanchen merged commit 8e6ec3b into unslothai:main Jun 30, 2025
abiswas-realadvice pushed a commit to abiswas-realadvice/unsloth that referenced this pull request May 14, 2026
add new validate_loftq_config to __all__
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