Skip to content

Commit

Permalink
Update tensorrtllm.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
tikikun authored and hiento09 committed Mar 15, 2024
1 parent 1c435dc commit 9db2a5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp/tensorrt_llm/nitro/controllers/tensorrtllm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ void inferenceThread(std::shared_ptr<inferenceState> inferState, std::vector<int
// Find the last non-zero value in the output IDs starting from the end of the input sequence
std::vector<int> outputIdsHostDecode(outputIdsHost.begin() + inputLen, outputIdsHost.end());
removeId(outputIdsHostDecode, 0);
removeId(outputIdsHostDecode, 32000);
removeId(outputIdsHostDecode, 32001);
std::string text = self->nitro_tokenizer->decode(outputIdsHostDecode);

if (inferState->prevPos >= 0 && inferState->prevPos < text.size())
Expand Down

0 comments on commit 9db2a5e

Please sign in to comment.