From 4187cf5a94c60e2006b720b04cf1af1a47a5b199 Mon Sep 17 00:00:00 2001 From: Ryan Mangeno <160974989+ryan-mangeno@users.noreply.github.com> Date: Fri, 10 Oct 2025 11:47:39 -0400 Subject: [PATCH] Update src/llama-vocab.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sigbjørn Skjæret --- src/llama-vocab.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llama-vocab.cpp b/src/llama-vocab.cpp index 0b84b9eec1..e93cea6053 100644 --- a/src/llama-vocab.cpp +++ b/src/llama-vocab.cpp @@ -2505,8 +2505,8 @@ void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) { for (const auto * token : {"", "", "<|endoftext|>"}) { _set_token_attr(token, LLAMA_TOKEN_ATTR_RSTRIP, false); } - } else if ( _contains_any(model_name, {"modern-bert"})) { - if ( token_to_id.count("MASK") == 0 ) { + } else if (_contains_any(model_name, {"modern-bert"})) { + if (token_to_id.count("[MASK]") == 0 ) { LLAMA_LOG_WARN("%s: Mask token missing in vocab!\n", __func__); } else {