From 4613728a9c40b0a2b5d354afcc132f931b94abb6 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sat, 14 Feb 2026 08:29:02 +0800 Subject: [PATCH] more custom tokens for mistral tool call --- src/llama-vocab.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/llama-vocab.cpp b/src/llama-vocab.cpp index 3596dcd10..81d1f31fe 100644 --- a/src/llama-vocab.cpp +++ b/src/llama-vocab.cpp @@ -2716,10 +2716,10 @@ void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) { attr = LLAMA_TOKEN_ATTR_USER_DEFINED; } - if(t.first=="[THINK]" || t.first=="[/THINK]" || t.first=="" || t.first=="") - { - LLAMA_LOG_WARN("%s: setting token '%s' (%d) attribute to USER_DEFINED (%u), old attributes: %u\n", - __func__, t.first.c_str(), t.second, LLAMA_TOKEN_ATTR_USER_DEFINED, attr); + if (t.first == "[THINK]" || t.first == "[/THINK]" || t.first == "" || t.first == "" || + t.first == "[CALL_ID]" || t.first == "[TOOL_CONTENT]" || t.first == "[TOOL_CALLS]" || t.first == "[ARGS]") { + LLAMA_LOG_WARN("%s: setting token '%s' (%d) attribute to USER_DEFINED (%u), old attributes: %u\n", + __func__, t.first.c_str(), t.second, LLAMA_TOKEN_ATTR_USER_DEFINED, attr); attr = LLAMA_TOKEN_ATTR_USER_DEFINED; } }