We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c70d117 commit b2b9bd8Copy full SHA for b2b9bd8
src/llama.cpp
@@ -5152,10 +5152,10 @@ static void llm_load_vocab(
5152
if (gen_name.find("code") != std::string::npos) {
5153
if (model.arch == LLM_ARCH_LLAMA
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>") {
+ && vocab.id_to_token[32007].text.ends_with("<PRE>")
+ && vocab.id_to_token[32008].text.ends_with("<SUF>")
+ && vocab.id_to_token[32009].text.ends_with("<MID>")
+ && vocab.id_to_token[32010].text.ends_with("<EOT>")) {
5159
vocab.special_prefix_id = 32007;
5160
vocab.special_suffix_id = 32008;
5161
vocab.special_middle_id = 32009;
0 commit comments