Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Bug fixes (#3335)
Daniel Han5d6fbda29a40
diff --git a/pyproject.toml b/pyproject.tomlindex 70fc3bdedc2..4f9c308b325 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -37,7 +37,7 @@ triton = []huggingface = [- "unsloth_zoo>=2025.9.7",+ "unsloth_zoo>=2025.9.9","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.55.4",@@ -453,7 +453,7 @@ colab-ampere-torch220 = ["flash-attn>=2.6.3",]colab-new = [- "unsloth_zoo>=2025.9.7",+ "unsloth_zoo>=2025.9.9","packaging","tyro","transformers>=4.51.3,!=4.47.0,!=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.55.4",diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.pyindex 857c4902d2c..79134005dca 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.6"+__version__ = "2025.9.7"__all__ = ["SUPPORTS_BFLOAT16",diff --git a/unsloth/models/llama.py b/unsloth/models/llama.pyindex 7414c073269..6326f519f1b 100644--- a/unsloth/models/llama.py+++ b/unsloth/models/llama.py@@ -25,7 +25,7 @@ from ._utils import _prepare_model_for_qatfrom torch.nn.functional import scaled_dot_product_attentionfrom transformers import __version__ as transformers_versionfrom unsloth_zoo.utils import Version, _get_dtype-from unsloth_zoo.hf_utils import dtype_from_config, add_dtype_kwargs+from unsloth_zoo.hf_utils import dtype_from_config, add_dtype_kwargs, fix_lora_auto_mappingfrom unsloth_zoo.peft_utils import SKIP_QUANTIZATION_MODULESfrom unsloth import DEVICE_TYPE, DEVICE_COUNT@@ -2632,6 +2632,8 @@ class FastLlamaModel:passmodel = _get_peft_model(model, lora_config)+ # Fix LoraConfig.auto_mapping is None+ fix_lora_auto_mapping(model)# Apply QAT + LoRA if specifiedif qat_scheme is not None:diff --git a/unsloth/models/mapper.py b/unsloth/models/mapper.pyindex be269316fed..eb9119b681f 100644--- a/unsloth/models/mapper.py+++ b/unsloth/models/mapper.py@@ -956,6 +956,16 @@ __INT_TO_FLOAT_MAPPER = \"google/gemma-3-270m","unsloth/gemma-3-270m-bnb-4bit",),+ "unsloth/Magistral-Small-2507-unsloth-bnb-4bit" : (+ "unsloth/Magistral-Small-2507",+ "mistralai/Magistral-Small-2507",+ "unsloth/Magistral-Small-2507-bnb-4bit",+ ),+ "unsloth/Magistral-Small-2509-unsloth-bnb-4bit" : (+ "unsloth/Magistral-Small-2509",+ "mistralai/Magistral-Small-2509",+ "unsloth/Magistral-Small-2509-bnb-4bit",+ ),}INT_TO_FLOAT_MAPPER = {}diff --git a/unsloth/models/rl.py b/unsloth/models/rl.pyindex 6f1f000e68d..3d5f6d084ba 100644--- a/unsloth/models/rl.py+++ b/unsloth/models/rl.py@@ -259,7 +259,8 @@ def _patch_trl_rl_trainers(trainer_file = "grpo_trainer"):"use_fp16 = getattr(args, 'fp16', False)\n"\"if type(use_fp16) is not bool: use_fp16 = False\n"\"force_float32 = False\n"\- "if os.environ.get('UNSLOTH_FORCE_FLOAT32', '0') == '1':\n"\+ "full_finetuning = os.environ.get('UNSLOTH_ENABLE_FULL_FINETUNING', '0') == '1'\n"\+ "if not full_finetuning and (os.environ.get('UNSLOTH_FORCE_FLOAT32', '0') == '1'):\n"\" print('Unsloth: Switching to float32 training since model cannot work with float16')\n"\" force_float32 = True\n"\"mixed_precision_dtype = os.environ.get('UNSLOTH_MIXED_PRECISION', 'float32')\n"\diff --git a/unsloth/models/vision.py b/unsloth/models/vision.pyindex d6c710c281e..d03ffb45a94 100644--- a/unsloth/models/vision.py+++ b/unsloth/models/vision.py@@ -43,7 +43,7 @@ from transformers.models.llama.modeling_llama import loggerfrom transformers import __version__ as transformers_versionfrom triton import __version__ as triton_versionfrom unsloth_zoo.utils import _get_dtype-from unsloth_zoo.hf_utils import dtype_from_config, add_dtype_kwargs+from unsloth_zoo.hf_utils import dtype_from_config, add_dtype_kwargs, fix_lora_auto_mappingfrom unsloth_zoo.patching_utils import patch_model_and_tokenizerfrom unsloth_zoo.training_utils import prepare_model_for_training@@ -758,6 +758,8 @@ class FastBaseModel:use_gradient_checkpointing = use_gradient_checkpointing,)model = _get_peft_model(model, lora_config)+ # Fix LoraConfig.auto_mapping is None+ fix_lora_auto_mapping(model)# Enable gradients on modules which are trainablerequires_grad_for_gradient_checkpointing(model)trust_remote_code = getattr(model, "_unsloth_trust_remote_code", False)