diff --git a/unsloth/tokenizer_utils.py b/unsloth/tokenizer_utils.py index 0136e3498e..087a9a7f8a 100644 --- a/unsloth/tokenizer_utils.py +++ b/unsloth/tokenizer_utils.py @@ -602,7 +602,10 @@ def load_correct_tokenizer( old_chat_template = getattr(tokenizer, "chat_template", None) # Ignore mistral type models since they don't have an add_generation_prompt - if "mistral" in str(getattr(tokenizer, "name_or_path", "")).lower(): + if any( + s in str(getattr(tokenizer, "name_or_path", "")).lower() + for s in ["mistral", "qwen3guard"] + ): chat_template = old_chat_template # Also check Llama-2 old style models