File tree 1 file changed +10
-0
lines changed 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -6399,6 +6399,11 @@ static void llm_load_vocab(
6399
6399
)
6400
6400
) {
6401
6401
vocab.special_eot_id = t.second;
6402
+ if ((vocab.id_to_token[t.second].attr & LLAMA_TOKEN_ATTR_CONTROL) == 0) {
6403
+ LLAMA_LOG_WARN("%s: control-looking token: '%s' was not control-type; this is probably a bug in the model. its type will be overridden\n",
6404
+ __func__, t.first.c_str());
6405
+ vocab.id_to_token[t.second].attr = LLAMA_TOKEN_ATTR_CONTROL;
6406
+ }
6402
6407
break;
6403
6408
}
6404
6409
}
@@ -6412,6 +6417,11 @@ static void llm_load_vocab(
6412
6417
const auto & t = vocab.token_to_id.find("<|eom_id|>");
6413
6418
if (t != vocab.token_to_id.end()) {
6414
6419
vocab.special_eom_id = t->second;
6420
+ if ((vocab.id_to_token[t->second].attr & LLAMA_TOKEN_ATTR_CONTROL) == 0) {
6421
+ LLAMA_LOG_WARN("%s: control-looking token: '%s' was not control-type; this is probably a bug in the model. its type will be overridden\n",
6422
+ __func__, t->first.c_str());
6423
+ vocab.id_to_token[t->second].attr = LLAMA_TOKEN_ATTR_CONTROL;
6424
+ }
6415
6425
}
6416
6426
}
6417
6427
}
You can’t perform that action at this time.
0 commit comments