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 Han-Chena4123e16c757
diff --git a/unsloth/tokenizer_utils.py b/unsloth/tokenizer_utils.py
index edd97175578..fa536ef29a9 100644
--- a/unsloth/tokenizer_utils.py
+++ b/unsloth/tokenizer_utils.py
@@ -299,9 +299,9 @@ def load_correct_tokenizer(
)
if slow_tokenizer is not None:
- if hasattr(fast_tokenizer "add_bos_token") and hasattr(slow_tokenizer "add_bos_token"):
+ if hasattr(fast_tokenizer, "add_bos_token") and hasattr(slow_tokenizer, "add_bos_token"):
fast_tokenizer.add_bos_token = slow_tokenizer.add_bos_token
- if hasattr(fast_tokenizer "add_eos_token") and hasattr(slow_tokenizer "add_eos_token"):
+ if hasattr(fast_tokenizer, "add_eos_token") and hasattr(slow_tokenizer, "add_eos_token"):
fast_tokenizer.add_eos_token = slow_tokenizer.add_eos_token
# Confirm if slow and fast are equivalent!