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 d40a250

Browse filesBrowse files
committed
feat: Use new llama_token_is_eog in create_completions
1 parent b21ba0e commit d40a250
Copy full SHA for d40a250

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-1
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,8 @@ def logit_bias_processor(
10341034
logits_processor=logits_processor,
10351035
grammar=grammar,
10361036
):
1037-
if token == self._token_eos:
1037+
assert self._model.model is not None
1038+
if llama_cpp.llama_token_is_eog(self._model.model, token):
10381039
text = self.detokenize(completion_tokens, prev_tokens=prompt_tokens)
10391040
finish_reason = "stop"
10401041
break

0 commit comments

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