llama : std::move llm_bigram_bpe from work_queue
This commit updates the retrieval of llm_bigram_bpe objects from work_queue.top() by using std::move. The motivation for this is to avoid the copying of the std::string `text` member of the llm_bigram_bpe struct.
This commit is contained in:
parent
8b3befc0e2
commit
6c6db7bcc5
1 changed files with 1 additions and 1 deletions
|
@ -520,7 +520,7 @@ struct llm_tokenizer_bpe {
|
|||
|
||||
// build token(s)
|
||||
while (!work_queue.empty()) {
|
||||
auto bigram = work_queue.top();
|
||||
auto bigram = std::move(const_cast<llm_bigram_bpe&>(work_queue.top()));
|
||||
work_queue.pop();
|
||||
|
||||
auto & left_symbol = symbols[bigram.left];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue