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.
1 parent d28b753 commit f5c2f99Copy full SHA for f5c2f99
llama_cpp/llama.py
@@ -298,7 +298,11 @@ def _sample(
298
n_vocab = int(llama_cpp.llama_n_vocab(self.ctx))
299
n_ctx = int(llama_cpp.llama_n_ctx(self.ctx))
300
top_k = llama_cpp.c_int(n_vocab) if top_k.value <= 0 else top_k
301
- last_n_tokens_size = llama_cpp.c_int(n_ctx) if last_n_tokens_size.value < 0 else last_n_tokens_size
+ last_n_tokens_size = (
302
+ llama_cpp.c_int(n_ctx)
303
+ if last_n_tokens_size.value < 0
304
+ else last_n_tokens_size
305
+ )
306
logits = self.eval_logits[-1]
307
nl_logit = logits[llama_cpp.llama_token_nl().value]
308
data = (llama_cpp.llama_token_data * n_vocab)(
0 commit comments