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 {