File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -649,7 +649,10 @@ def _create_completion(
649
649
self .detokenize ([token ]).decode ("utf-8" , errors = "ignore" )
650
650
for token in all_tokens
651
651
]
652
- all_logprobs = [Llama .logits_to_logprobs (list (map (float , row ))) for row in self .eval_logits ]
652
+ all_logprobs = [
653
+ Llama .logits_to_logprobs (list (map (float , row )))
654
+ for row in self .eval_logits
655
+ ]
653
656
for token , token_str , logprobs_token in zip (
654
657
all_tokens , all_token_strs , all_logprobs
655
658
):
@@ -968,7 +971,10 @@ def save_state(self) -> LlamaState:
968
971
llama_state_compact = (llama_cpp .c_uint8 * int (n_bytes ))()
969
972
llama_cpp .ctypes .memmove (llama_state_compact , llama_state , int (n_bytes ))
970
973
if self .verbose :
971
- print (f"Llama.save_state: saving { n_bytes } bytes of llama state" , file = sys .stderr )
974
+ print (
975
+ f"Llama.save_state: saving { n_bytes } bytes of llama state" ,
976
+ file = sys .stderr ,
977
+ )
972
978
return LlamaState (
973
979
eval_tokens = self .eval_tokens .copy (),
974
980
eval_logits = self .eval_logits .copy (),
You can’t perform that action at this time.
0 commit comments