Skip to content

Commit

Permalink
Fix token count accounting
Browse files Browse the repository at this point in the history
  • Loading branch information
blackhole89 committed Mar 13, 2023
1 parent c80e2a8 commit 460c482
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,8 @@ int main(int argc, char ** argv) {
std::vector<gpt_vocab::id> line_inp = ::llama_tokenize(vocab, buf, false);
embd_inp.insert(embd_inp.end(), line_inp.begin(), line_inp.end());

remaining_tokens -= line_inp.size();

input_noecho = true; // do not echo this again
}

Expand Down

0 comments on commit 460c482

Please sign in to comment.