Skip to content

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.

Bug Fixes (#1774)

Daniel Han4570c8b41e5c
diff --git a/pyproject.toml b/pyproject.toml
index 96aa0696fb4..14797c8fa7f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -39,7 +39,7 @@ triton = [
"triton @ https://github.com/woct0rdho/triton-windows/releases/download/v3.1.0-windows.post5/triton-3.1.0-cp312-cp312-win_amd64.whl ; python_version=='3.12' and platform_system == 'Windows'",
]
huggingface = [
- "unsloth_zoo>=2025.2.6",
+ "unsloth_zoo>=2025.2.7",
"packaging",
"tyro",
"transformers>=4.46.1,!=4.47.0",
@@ -50,7 +50,7 @@ huggingface = [
"wheel>=0.42.0",
"numpy",
"accelerate>=0.34.1",
- "trl>=0.7.9,!=0.9.0,!=0.9.1,!=0.9.2,!=0.9.3",
+ "trl>=0.7.9,!=0.9.0,!=0.9.1,!=0.9.2,!=0.9.3,!=0.15.0",
"peft>=0.7.1,!=0.11.0",
"protobuf<4.0.0",
"huggingface_hub",
@@ -348,7 +348,7 @@ colab-ampere-torch220 = [
"flash-attn>=2.6.3",
]
colab-new = [
- "unsloth_zoo>=2025.2.6",
+ "unsloth_zoo>=2025.2.7",
"packaging",
"tyro",
"transformers>=4.46.1,!=4.47.0",
@@ -366,7 +366,7 @@ colab-new = [
]
colab-no-deps = [
"accelerate>=0.34.1",
- "trl>=0.7.9,!=0.9.0,!=0.9.1,!=0.9.2,!=0.9.3",
+ "trl>=0.7.9,!=0.9.0,!=0.9.1,!=0.9.2,!=0.9.3,!=0.15.0",
"peft>=0.7.1",
"xformers",
"bitsandbytes>=0.46.1",
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py
index 382024512de..e1259af3ae4 100644
--- a/unsloth/models/_utils.py
+++ b/unsloth/models/_utils.py
@@ -143,6 +143,11 @@ transformers_training_args_logger.addFilter(HideLoggingMessage("The speedups"))
transformers_training_args_logger.addFilter(HideLoggingMessage("torch.distributed"))
del transformers_training_args_logger
+# No label_names provided for model class
+from transformers.trainer import logger as transformers_trainer_logger
+transformers_trainer_logger.addFilter(HideLoggingMessage("No label_names"))
+del transformers_trainer_logger
+
# Using the default loss: `ForCausalLMLoss`.
try:
from transformers.modeling_utils import logger as transformers_modeling_utils_logger
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py
index 909dfc339bf..3e0717a872a 100644
--- a/unsloth/models/llama.py
+++ b/unsloth/models/llama.py
@@ -725,8 +725,9 @@ def LlamaModel_fast_forward(
past_key_values_length,
sliding_window = getattr(self.config, "sliding_window", None),
)
- if attention_mask is not None:
- attention_mask = attention_mask.to(torch.bool)
+ # Must NOT convert to bool - weirdly this causes stuff to error out!
+ # if attention_mask is not None:
+ # attention_mask = attention_mask.to(torch.bool)
pass
hidden_states = inputs_embeds
diff --git a/unsloth/models/rl_replacements.py b/unsloth/models/rl_replacements.py
index 23b31172fd5..06ae82140b5 100644
--- a/unsloth/models/rl_replacements.py
+++ b/unsloth/models/rl_replacements.py
@@ -164,10 +164,11 @@ RL_FUNCTIONS["grpo_trainer"].append(grpo_trainer__prepare_inputs)
# Remove _move_model_to_vllm
def grpo_trainer__move_model_to_vllm(function_name, function):
if function_name != "_move_model_to_vllm": return function
+
+ def _move_model_to_vllm(self, *args, **kwargs): return None
- # .*? matches first match. .+? matches final match.
- replacement = "def _move_model_to_vllm(self, *args, **kwargs): return None\n"
- return " "*function.find("def") + replacement
+ function = inspect.getsource(_move_model_to_vllm)
+ return function
pass
RL_FUNCTIONS["grpo_trainer"].append(grpo_trainer__move_model_to_vllm)