Skip to content

Commit d40a250

Browse files
committed
feat: Use new llama_token_is_eog in create_completions
1 parent b21ba0e commit d40a250

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llama_cpp/llama.py

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy