File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -5152,10 +5152,10 @@ static void llm_load_vocab(
5152
5152
if (gen_name.find("code") != std::string::npos) {
5153
5153
if (model.arch == LLM_ARCH_LLAMA
5154
5154
&& 32010 < vocab.id_to_token.size()
5155
- && vocab.id_to_token[32007].text == "<PRE>"
5156
- && vocab.id_to_token[32008].text == "<SUF>"
5157
- && vocab.id_to_token[32009].text == "<MID>"
5158
- && vocab.id_to_token[32010].text == "<EOT>") {
5155
+ && vocab.id_to_token[32007].text.ends_with( "<PRE>")
5156
+ && vocab.id_to_token[32008].text.ends_with( "<SUF>")
5157
+ && vocab.id_to_token[32009].text.ends_with( "<MID>")
5158
+ && vocab.id_to_token[32010].text.ends_with( "<EOT>") ) {
5159
5159
vocab.special_prefix_id = 32007;
5160
5160
vocab.special_suffix_id = 32008;
5161
5161
vocab.special_middle_id = 32009;
You can’t perform that action at this time.
0 commit comments