We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b21ba0e commit d40a250Copy full SHA for d40a250
1 file changed
llama_cpp/llama.py
@@ -1034,7 +1034,8 @@ def logit_bias_processor(
1034
logits_processor=logits_processor,
1035
grammar=grammar,
1036
):
1037
- if token == self._token_eos:
+ assert self._model.model is not None
1038
+ if llama_cpp.llama_token_is_eog(self._model.model, token):
1039
text = self.detokenize(completion_tokens, prev_tokens=prompt_tokens)
1040
finish_reason = "stop"
1041
break
0 commit comments