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 d73b8d4 commit ee1b497Copy full SHA for ee1b497
llama.cpp
@@ -1924,7 +1924,9 @@ struct llama_tokenizer {
1924
if (token == vocab_.token_to_id.end()) {
1925
// output any symbols that did not form tokens as bytes.
1926
for (int j = 0; j < (int) symbol.n; ++j) {
1927
- llama_vocab::id token_id = static_cast<uint8_t>(symbol.text[j]) + 3;
+ // NOTE: old version, before #2420 - not sure what are the implications of this
1928
+ //llama_vocab::id token_id = static_cast<uint8_t>(symbol.text[j]) + 3;
1929
+ llama_vocab::id token_id = vocab_.token_to_id.at(std::string(1, symbol.text[j]));
1930
output.push_back(token_id);
1931
}
1932
} else {
0 commit comments