Skip to content

Commit

Permalink
Apply todo, initialize detokenizer's cache (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wovchena authored Jul 22, 2024
1 parent 67f0467 commit 1969160
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cpp/src/tokenizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ class Tokenizer::TokenizerImpl {
device).create_infer_request();

// Get special token ids by inference if they are not defined.
// todo: do not call until CVS-143410 is resolved
// infer_special_tokens_if_necessary();
infer_special_tokens_if_necessary();
// Initialize tokenizer's cache to save time later.
// infer_special_tokens_if_necessary() already could do that
// but it didn't run decode() for sure.
decode(encode("").input_ids);
}

// load special tokens ids from config.json
Expand Down

0 comments on commit 1969160

Please sign in to comment.