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 4c1b7f7

Browse filesBrowse files
committed
Bugfix for logits_processor and stopping_criteria
1 parent 433a2e3 commit 4c1b7f7
Copy full SHA for 4c1b7f7

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ def _sample(
358358

359359
if logits_processor is not None:
360360
logits = logits_processor(list(self.eval_tokens), logits)
361+
self.eval_logits[-1] = logits
361362

362363
nl_logit = logits[self._token_nl]
363364
candidates = self._candidates
@@ -855,6 +856,7 @@ def _create_completion(
855856
if stopping_criteria is not None and stopping_criteria(
856857
list(self.eval_tokens), self.eval_logits[-1]
857858
):
859+
text = self.detokenize(completion_tokens)
858860
finish_reason = "stop"
859861

860862
if self.verbose:

0 commit comments

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