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 Han3ded920491a4
diff --git a/unsloth/tokenizer_utils.py b/unsloth/tokenizer_utils.py
index e2ba5fab7e9..7e4baa60e59 100644
--- a/unsloth/tokenizer_utils.py
+++ b/unsloth/tokenizer_utils.py
@@ -946,7 +946,7 @@ def patch_sft_trainer_tokenizer():
" tokenizer = partial(tokenizer, add_special_tokens = False)\n"\
" processing_class = tokenizer\n"\
"else:\n"\
- " add_special_tokens = False if has_bos_token_already else add_special_tokens\n\n"
+ " add_special_tokens = False if has_bos_token_already else add_special_tokens"
check_text = check_text.split("\n")
check_text = "\n".join(" "*where + x for x in check_text)