File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ def _sample_top_p_top_k(
306
306
llama_cpp .llama_sample_typical (
307
307
ctx = self .ctx ,
308
308
candidates = llama_cpp .ctypes .pointer (candidates ),
309
- p = llama_cpp .c_float (1.0 )
309
+ p = llama_cpp .c_float (1.0 ),
310
310
)
311
311
llama_cpp .llama_sample_top_p (
312
312
ctx = self .ctx ,
@@ -637,10 +637,7 @@ def _create_completion(
637
637
self .detokenize ([token ]).decode ("utf-8" , errors = "ignore" )
638
638
for token in all_tokens
639
639
]
640
- all_logprobs = [
641
- Llama ._logits_to_logprobs (row )
642
- for row in self .eval_logits
643
- ]
640
+ all_logprobs = [Llama ._logits_to_logprobs (row ) for row in self .eval_logits ]
644
641
for token , token_str , logprobs_token in zip (
645
642
all_tokens , all_token_strs , all_logprobs
646
643
):
You can’t perform that action at this time.
0 commit comments