8000 Now the last token sent when `stream=True` · MobinX/llama-cpp-python@0756a2d · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

8000
Appearance settings

Commit 0756a2d

Browse files
committed
Now the last token sent when stream=True
1 parent 3687262 commit 0756a2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama_cpp/llama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ def _create_completion(
953953
token_end_position += len(self.detokenize([token]))
954954
# Check if stop sequence is in the token
955955
if token_end_position >= (
956-
remaining_length - first_stop_position - 1
956+
remaining_length - first_stop_position
957957
):
958958
break
959959
logprobs_or_none: Optional[CompletionLogprobs] = None

0 commit comments

Comments
 (0)
0