From 4696bc09311217ac5280e15cf58a5819efc041d6 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Tue, 11 Mar 2025 22:55:34 -0700 Subject: [PATCH] Update vision.py --- unsloth/models/vision.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py index 77774393c9..fa5547ec55 100644 --- a/unsloth/models/vision.py +++ b/unsloth/models/vision.py @@ -181,6 +181,13 @@ class FastBaseModel: elif not load_in_4bit and not load_in_8bit and not full_finetuning: print("Unsloth: LoRA, QLoRA and full finetuning all not selected. Switching to QLoRA.") load_in_4bit = True + bnb_config = BitsAndBytesConfig( + load_in_4bit = True, + bnb_4bit_use_double_quant = True, + bnb_4bit_quant_type = "nf4", + bnb_4bit_compute_dtype = dtype, + llm_int8_skip_modules = SKIP_QUANTIZATION_MODULES, + ) pass if full_finetuning: