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 tokenizer_utils.py

Daniel Han3c9e9b4a44c9
diff --git a/unsloth/tokenizer_utils.py b/unsloth/tokenizer_utils.py
index 7967676d80f..a9b635203e9 100644
--- a/unsloth/tokenizer_utils.py
+++ b/unsloth/tokenizer_utils.py
@@ -1015,6 +1015,8 @@ def patch_sft_trainer_tokenizer():
check_text = "\n".join(" "*where + x for x in check_text)
function = function.replace(replacer, check_text + replacer)
+ print(function)
+ raise
exec(function, globals())
exec(f"trl.trainer.{path_to_trainer}.{function_name} = {function_name}", globals())