Update llama.cpp
This commit is contained in:
parent
efb5dac337
commit
a8ee520eb8
1 changed files with 2 additions and 0 deletions
|
@ -1924,6 +1924,8 @@ struct llama_tokenizer {
|
||||||
if (token == vocab_.token_to_id.end()) {
|
if (token == vocab_.token_to_id.end()) {
|
||||||
// output any symbols that did not form tokens as bytes.
|
// output any symbols that did not form tokens as bytes.
|
||||||
for (int j = 0; j < (int) symbol.n; ++j) {
|
for (int j = 0; j < (int) symbol.n; ++j) {
|
||||||
|
// NOTE: old version, before #2420 - not sure what are the implications of this
|
||||||
|
//llama_vocab::id token_id = static_cast<uint8_t>(symbol.text[j]) + 3;
|
||||||
llama_vocab::id token_id = vocab_.token_to_id.at(std::string(1, symbol.text[j]));
|
llama_vocab::id token_id = vocab_.token_to_id.at(std::string(1, symbol.text[j]));
|
||||||
output.push_back(token_id);
|
output.push_back(token_id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue