Formatting
This commit is contained in:
parent
9d60ae56f2
commit
dd9ad1c759
1 changed files with 2 additions and 5 deletions
|
@ -306,7 +306,7 @@ class Llama:
|
||||||
llama_cpp.llama_sample_typical(
|
llama_cpp.llama_sample_typical(
|
||||||
ctx=self.ctx,
|
ctx=self.ctx,
|
||||||
candidates=llama_cpp.ctypes.pointer(candidates),
|
candidates=llama_cpp.ctypes.pointer(candidates),
|
||||||
p=llama_cpp.c_float(1.0)
|
p=llama_cpp.c_float(1.0),
|
||||||
)
|
)
|
||||||
llama_cpp.llama_sample_top_p(
|
llama_cpp.llama_sample_top_p(
|
||||||
ctx=self.ctx,
|
ctx=self.ctx,
|
||||||
|
@ -637,10 +637,7 @@ class Llama:
|
||||||
self.detokenize([token]).decode("utf-8", errors="ignore")
|
self.detokenize([token]).decode("utf-8", errors="ignore")
|
||||||
for token in all_tokens
|
for token in all_tokens
|
||||||
]
|
]
|
||||||
all_logprobs = [
|
all_logprobs = [Llama._logits_to_logprobs(row) for row in self.eval_logits]
|
||||||
Llama._logits_to_logprobs(row)
|
|
||||||
for row in self.eval_logits
|
|
||||||
]
|
|
||||||
for token, token_str, logprobs_token in zip(
|
for token, token_str, logprobs_token in zip(
|
||||||
all_tokens, all_token_strs, all_logprobs
|
all_tokens, all_token_strs, all_logprobs
|
||||||
):
|
):
|
||||||
|
|
Loading…
Reference in a new issue