From 5281ddae644b17151c8c8c276195d20606bc439e Mon Sep 17 00:00:00 2001 From: Br1an67 <932039080@qq.com> Date: Thu, 12 Mar 2026 09:16:07 +0000 Subject: [PATCH] Fix Hermes chat template validation error --- unsloth/tokenizer_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/tokenizer_utils.py b/unsloth/tokenizer_utils.py index c445879df7..03771d1fbe 100644 --- a/unsloth/tokenizer_utils.py +++ b/unsloth/tokenizer_utils.py @@ -604,7 +604,7 @@ def load_correct_tokenizer( # Ignore mistral type models since they don't have an add_generation_prompt if any( s in str(getattr(tokenizer, "name_or_path", "")).lower() - for s in ["mistral", "qwen3guard"] + for s in ["mistral", "qwen3guard", "hermes"] ): chat_template = old_chat_template