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 d11afd6 commit 9a79f93Copy full SHA for 9a79f93
llama.cpp
@@ -12292,6 +12292,20 @@ struct llm_tokenizer_bpe {
12292
symbols_final.clear();
12293
12294
for (auto & word : word_collection) {
12295
+ if (vocab.token_to_id.find(word) != vocab.token_to_id.end()) {
12296
+ llm_symbol sym;
12297
+ sym.text = word.c_str();
12298
+ sym.n = word.size();
12299
+ sym.prev = final_prev_index;
12300
+ sym.next = -1;
12301
+ if (final_prev_index != -1) {
12302
+ symbols_final[final_prev_index].next = symbols_final.size();
12303
+ }
12304
+ symbols_final.emplace_back(sym);
12305
+ final_prev_index = symbols_final.size() - 1;
12306
+ continue;
12307
12308
+
12309
work_queue = llm_bigram_bpe::queue();
12310
symbols.clear();
12311
0 commit comments