Update vision.py
This commit is contained in:
parent
7d115b6269
commit
5eebb206ae
1 changed files with 4 additions and 0 deletions
|
|
@ -423,6 +423,10 @@ class FastBaseModel:
|
|||
os.environ["UNSLOTH_ENABLE_FULL_FINETUNING"] = "0"
|
||||
pass
|
||||
|
||||
# Fix AttributeError: 'BitsAndBytesConfig' object has no attribute 'get_loading_attributes'
|
||||
if not hasattr(bnb_config, "get_loading_attributes"):
|
||||
bnb_config.get_loading_attributes = lambda *args, **kwargs: {}
|
||||
|
||||
# Cannot be None, since HF now checks for the config
|
||||
if load_in_4bit: kwargs["quantization_config"] = bnb_config
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue