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.

[pre-commit.ci] auto fixes from pre-commit.com hooks

pre-commit-ci[bot]c8e7bd9f0983
diff --git a/unsloth/models/rl_replacements.py b/unsloth/models/rl_replacements.py
index 248c5aab85c..e13e5e6d784 100644
--- a/unsloth/models/rl_replacements.py
+++ b/unsloth/models/rl_replacements.py
@@ -388,12 +388,12 @@ def grpo_trainer__generate_and_score_completions(function_name, function):
patched = patched[: match.start()] + wrapped + patched[match.end() :]
function = patched
-
+
function = function.replace(
- " return output",
- """ if not _was_training:
+ " return output",
+ """ if not _was_training:
self.model.for_inference()
- return output"""
+ return output""",
)
return function