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

Appearance settings

Commit 11d9562

Browse filesBrowse files
xu-songabetlen
andauthored
misc: Rename all_text to remaining_text (abetlen#1658)
Co-authored-by: Andrei <abetlen@gmail.com>
1 parent 9992c50 commit 11d9562
Copy full SHA for 11d9562

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,15 +1519,15 @@ def logit_bias_processor(
15191519

15201520
if stream:
15211521
remaining_tokens = completion_tokens[returned_tokens:]
1522-
all_text = self.detokenize(
1522+
remaining_text = self.detokenize(
15231523
remaining_tokens,
15241524
prev_tokens=prompt_tokens + completion_tokens[:returned_tokens],
15251525
)
1526-
any_stop = [s for s in stop_sequences if s in all_text]
1526+
any_stop = [s for s in stop_sequences if s in remaining_text]
15271527
if len(any_stop) > 0:
1528-
end = min(all_text.index(stop) for stop in any_stop)
1528+
end = min(remaining_text.index(stop) for stop in any_stop)
15291529
else:
1530-
end = len(all_text)
1530+
end = len(remaining_text)
15311531

15321532
token_end_position = 0
15331533
for token in remaining_tokens:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.