diff --git a/pyproject.toml b/pyproject.toml index cb3f8f3fa4..84d6d86d93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ huggingfacenotorch = [ ] huggingface = [ "unsloth[huggingfacenotorch]", - "unsloth_zoo>=2025.12.5", + "unsloth_zoo>=2025.12.6", "torchvision", "unsloth[triton]", ] @@ -523,7 +523,7 @@ colab-ampere-torch220 = [ "flash-attn>=2.6.3 ; ('linux' in sys_platform)", ] colab-new = [ - "unsloth_zoo>=2025.12.5", + "unsloth_zoo>=2025.12.6", "packaging", "tyro", "transformers>=4.51.3,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3,!=4.53.0,!=4.54.0,!=4.55.0,!=4.55.1,!=4.57.0,<=4.57.3", diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 0d0f90cf40..4fed7c8f0a 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2025.12.6" +__version__ = "2025.12.7" __all__ = [ "SUPPORTS_BFLOAT16", diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py index b13775076c..a24a643531 100644 --- a/unsloth/models/loader.py +++ b/unsloth/models/loader.py @@ -280,6 +280,8 @@ class FastLanguageModel(FastLlamaModel): trust_remote_code = trust_remote_code, ) is_model = True + except ImportError: + raise except Exception as error: autoconfig_error = str(error) if "architecture" in autoconfig_error: @@ -296,6 +298,8 @@ class FastLanguageModel(FastLlamaModel): trust_remote_code = trust_remote_code, ) is_peft = True + except ImportError: + raise except Exception as error: peft_error = str(error) if "architecture" in peft_error: @@ -317,7 +321,8 @@ class FastLanguageModel(FastLlamaModel): "Please separate the LoRA and base models to 2 repos." ) model_types = get_transformers_model_type( - peft_config if peft_config is not None else model_config + peft_config if peft_config is not None else model_config, + trust_remote_code = trust_remote_code, ) if len(model_types) == 1: model_type = model_types[0] @@ -809,6 +814,8 @@ class FastModel(FastBaseModel): trust_remote_code = trust_remote_code, ) is_model = True + except ImportError: + raise except Exception as error: autoconfig_error = str(error) if "architecture" in autoconfig_error: @@ -825,6 +832,8 @@ class FastModel(FastBaseModel): trust_remote_code = trust_remote_code, ) is_peft = True + except ImportError: + raise except Exception as error: peft_error = str(error) if "architecture" in peft_error: @@ -844,7 +853,8 @@ class FastModel(FastBaseModel): "Please separate the LoRA and base models to 2 repos." ) model_types = get_transformers_model_type( - peft_config if peft_config is not None else model_config + peft_config if peft_config is not None else model_config, + trust_remote_code = trust_remote_code, ) model_types_all = ",".join(model_types) + "," diff --git a/unsloth/models/mapper.py b/unsloth/models/mapper.py index 7a90c6b358..e7296291f1 100644 --- a/unsloth/models/mapper.py +++ b/unsloth/models/mapper.py @@ -1251,6 +1251,11 @@ __INT_TO_FLOAT_MAPPER = \ "unsloth/gpt-oss-safeguard-120b", "openai/gpt-oss-safeguard-120b", ), + "unsloth/functiongemma-270m-it-unsloth-bnb-4bit" : ( + "unsloth/functiongemma-270m-it", + "google/functiongemma-270m-it", + "unsloth/functiongemma-270m-it-unsloth-bnb-4bit", + ), } INT_TO_FLOAT_MAPPER = {}