File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,8 @@ def from_pretrained(
202202 pass
203203 # Check if 4bit is allowed specifically for AMD
204204 if not ALLOW_BITSANDBYTES and not use_exact_model_name :
205- print ("Unsloth: AMD currently is not stable with 4bit bitsandbytes. Disabling for now." )
205+ if load_in_4bit or load_in_8bit or model_name .lower ().endswith ("-bnb-4bit" ):
206+ print ("Unsloth: AMD currently is not stable with 4bit bitsandbytes. Disabling for now." )
206207 load_in_4bit = False
207208
208209 old_model_name = model_name
@@ -650,7 +651,8 @@ def from_pretrained(
650651 )
651652 # Check if 4bit is allowed specifically for AMD
652653 if not ALLOW_BITSANDBYTES and not use_exact_model_name :
653- print ("Unsloth: AMD currently is not stable with 4bit bitsandbytes. Disabling for now." )
654+ if load_in_4bit or load_in_8bit or model_name .lower ().endswith ("-bnb-4bit" ):
655+ print ("Unsloth: AMD currently is not stable with 4bit bitsandbytes. Disabling for now." )
654656 load_in_4bit = False
655657
656658 old_model_name = model_name
You can’t perform that action at this time.
0 commit comments