File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -853,13 +853,9 @@ def save_to_gguf(
853853 model_dtype = "f16" if model_dtype == "float16" else "bf16"
854854
855855 # Convert quantization_method to list
856- if isinstance (quantization_method , list ): pass
857- elif isinstance (quantization_method , str ): quantization_method = [ quantization_method , ]
858- elif isinstance (quantization_method , tuple ): quantization_method = list (quantization_method )
859- else :
860- raise TypeError ("Unsloth: quantization_method can only be a string or a list of strings" )
861- pass
862-
856+ quantization_method = \
857+ quantization_method if type (quantization_method ) is list else list (quantization_method )
858+
863859 # Check if bfloat16 is supported
864860 if model_dtype == "bf16" and not torch .cuda .is_bf16_supported ():
865861 logger .warning (
You can’t perform that action at this time.
0 commit comments