diff --git a/pyproject.toml b/pyproject.toml index 6c0b7f8ca1..1bbb9c657a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ triton = [ ] huggingface = [ - "unsloth_zoo>=2025.9.14", + "unsloth_zoo>=2025.10.1", "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.56.2", @@ -453,7 +453,7 @@ colab-ampere-torch220 = [ "flash-attn>=2.6.3", ] colab-new = [ - "unsloth_zoo>=2025.9.14", + "unsloth_zoo>=2025.10.1", "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.56.2", diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 3079196e68..8650e21438 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.9.11" +__version__ = "2025.10.1" __all__ = [ "SUPPORTS_BFLOAT16", diff --git a/unsloth/models/mapper.py b/unsloth/models/mapper.py index eb9119b681..600396ed46 100644 --- a/unsloth/models/mapper.py +++ b/unsloth/models/mapper.py @@ -966,6 +966,52 @@ __INT_TO_FLOAT_MAPPER = \ "mistralai/Magistral-Small-2509", "unsloth/Magistral-Small-2509-bnb-4bit", ), + "unsloth/Apertus-70B-Instruct-2509-unsloth-bnb-4bit" : ( + "unsloth/Apertus-70B-Instruct-2509", + "swiss-ai/Apertus-70B-2509", + "unsloth/Apertus-70B-Instruct-2509-unsloth-bnb-4bit", + ), + "unsloth/Apertus-8B-Instruct-2509-unsloth-bnb-4bit" : ( + "unsloth/Apertus-8B-Instruct-2509", + "swiss-ai/Apertus-8B-2509", + "unsloth/Apertus-8B-Instruct-2509-unsloth-bnb-4bit", + ), + "unsloth/granite-4.0-micro-unsloth-bnb-4bit" : ( + "unsloth/granite-4.0-micro", + "ibm-granite/granite-4.0-micro", + "unsloth/granite-4.0-micro-bnb-4bit", + ), + "unsloth/granite-4.0-h-micro-unsloth-bnb-4bit" : ( + "unsloth/granite-4.0-h-micro", + "ibm-granite/granite-4.0-h-micro", + "unsloth/granite-4.0-h-micro-bnb-4bit", + ), + "unsloth/granite-4.0-micro-base-unsloth-bnb-4bit" : ( + "unsloth/granite-4.0-micro-base", + "ibm-granite/granite-4.0-micro-base", + "unsloth/granite-4.0-micro-base-bnb-4bit", + ), + "unsloth/granite-4.0-h-micro-base-unsloth-bnb-4bit" : ( + "unsloth/granite-4.0-h-micro-base", + "ibm-granite/granite-4.0-h-micro-base", + "unsloth/granite-4.0-h-micro-base-bnb-4bit", + ), + "unsloth/granite-4.0-h-tiny" : ( + "unsloth/granite-4.0-h-tiny", + "ibm-granite/granite-4.0-h-tiny", + ), + "unsloth/granite-4.0-h-small" : ( + "unsloth/granite-4.0-h-small", + "ibm-granite/granite-4.0-h-small", + ), + "unsloth/granite-4.0-h-tiny-base" : ( + "unsloth/granite-4.0-h-tiny-base", + "ibm-granite/granite-4.0-h-tiny-base", + ), + "unsloth/granite-4.0-h-small-base" : ( + "unsloth/granite-4.0-h-small-base", + "ibm-granite/granite-4.0-h-small-base", + ), } INT_TO_FLOAT_MAPPER = {} diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py index fbe3c832c2..a7c12e9644 100644 --- a/unsloth/models/vision.py +++ b/unsloth/models/vision.py @@ -636,7 +636,9 @@ class FastBaseModel: # Check float32 norm weights if os.environ.get("UNSLOTH_HIGH_PRECISION_LAYERNORM", "0") == "1": for jj, (name, module) in enumerate(model.named_modules()): - if name.endswith("norm") and hasattr(module, "weight"): + if (name.endswith(("norm", "norm1", "norm2", "norm3", "norm4")) \ + or "layernorm" in name or "layer_norm" in name) \ + and hasattr(module, "weight"): module._pre_set_compute_dtype = torch.float32 pass # Edit data-types