We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c88b312 + 99138a0 commit 13a3adeCopy full SHA for 13a3ade
examples/models/llama/runner/generation.py
@@ -101,7 +101,8 @@ def generate( # noqa: C901
101
)
102
current_token = next_token(logits, temperature, top_p)
103
if current_token == self.tokenizer.eos_id or (
104
- hasattr(self, "stop_tokens") and current_token in self.stop_tokens
+ hasattr(self.tokenizer, "stop_tokens")
105
+ and current_token in self.tokenizer.stop_tokens
106
):
107
break
108
tokens.append(current_token)
0 commit comments