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.

Update rl_replacements.py

Daniel Han8d983b01ff98
diff --git a/unsloth/models/rl_replacements.py b/unsloth/models/rl_replacements.py
index 6987b2321ad..e3831d3980c 100644
--- a/unsloth/models/rl_replacements.py
+++ b/unsloth/models/rl_replacements.py
@@ -256,6 +256,8 @@ def grpo_trainer__generate_and_score_completions(function_name, function):
replace_part, spacing = found[0]
removed_comments = re.sub(r"\#[^\n]{1,}", "", replace_part)
splits = removed_comments.split("\n")
+ print(splits)
+ print(len(spacing))
print(sum(re.match(rf"{spacing}[^\s]", x) is not None for x in splits))
if sum(re.match(rf"{spacing}[^\s]", x) is not None for x in splits) == 2 and len(spacing) == 8: