From 812cee84dcb06cc85c757233dadc1f41f6d53c77 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:25:56 +0800 Subject: [PATCH] Handle Spark X2.5 template --- kcpp_adapters/AutoGuess.json | 12 ++++++++++++ koboldcpp.py | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/kcpp_adapters/AutoGuess.json b/kcpp_adapters/AutoGuess.json index 1c57b3c4a..5514cad9c 100644 --- a/kcpp_adapters/AutoGuess.json +++ b/kcpp_adapters/AutoGuess.json @@ -210,6 +210,18 @@ "assistant_start": "<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>", "assistant_end": "<|END_OF_TURN_TOKEN|>" } +}, { + "search": ["<|start▁of▁sentence|>", "<|end▁of▁sentence|>", "<|System|>", "<|User|>", "<|Bot|>", ""], + "name": "Spark X2.5", + "adapter": { + "system_start": "<|start▁of▁sentence|><|System|>\n", + "system_end": "<|end▁of▁sentence|>", + "user_start": "<|start▁of▁sentence|><|User|>", + "user_end": "<|end▁of▁sentence|>", + "assistant_start": "<|start▁of▁sentence|><|Bot|>", + "assistant_gen": "<|start▁of▁sentence|><|Bot|>", + "assistant_end": "<|end▁of▁sentence|>" + } }, { "search": ["<|User|>"], "name": "DeepSeek V2.5", diff --git a/koboldcpp.py b/koboldcpp.py index 27af57d60..c375ff3e6 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -12992,7 +12992,12 @@ def kcpp_main_process(launch_args, g_memory=None, gui_launcher=False): pass if chatcompl_adapter is None: - print("Chat template heuristics failed to identify chat completions format. Alpaca will be used.") + if cached_chat_template: + args.jinja = True + args.jinja_tools = True + print("Chat template heuristics failed to identify chat completions format. Jinja and Jinja tools will be used.") + else: + print("Chat template heuristics failed to identify chat completions format. Alpaca will be used.") #handle loading image model if args.sdmodel and args.sdmodel!="":