Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d60ae5 commit dd9ad1cCopy full SHA for dd9ad1c
llama_cpp/llama.py
@@ -306,7 +306,7 @@ def _sample_top_p_top_k(
306
llama_cpp.llama_sample_typical(
307
ctx=self.ctx,
308
candidates=llama_cpp.ctypes.pointer(candidates),
309
- p=llama_cpp.c_float(1.0)
+ p=llama_cpp.c_float(1.0),
310
)
311
llama_cpp.llama_sample_top_p(
312
@@ -637,10 +637,7 @@ def _create_completion(
637
self.detokenize([token]).decode("utf-8", errors="ignore")
638
for token in all_tokens
639
]
640
- all_logprobs = [
641
- Llama._logits_to_logprobs(row)
642
- for row in self.eval_logits
643
- ]
+ all_logprobs = [Llama._logits_to_logprobs(row) for row in self.eval_logits]
644
for token, token_str, logprobs_token in zip(
645
all_tokens, all_token_strs, all_logprobs
646
):
0 commit comments