Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 2981f81

Browse files
tikikunjan-service-account
authored andcommitted
fix missing starting token
1 parent 8e33246 commit 2981f81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/tensorrt_llm/nitro/controllers/tensorrtllm.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ void inferenceThread(std::shared_ptr<inferenceState> inferState, std::vector<int
184184
removeId(outputIdsHostDecode, 0);
185185
std::string text = self->nitro_tokenizer->decode(outputIdsHostDecode);
186186

187-
if (inferState->prevPos > 0 && inferState->prevPos < text.size())
187+
if (inferState->prevPos >= 0 && inferState->prevPos < text.size())
188188
{
189189
// Valid prevPos, proceed with slicing the string from prevPos to the end
190190
std::string stringTok(text.begin() + inferState->prevPos, text.end());

0 commit comments

Comments
 (0)