File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
Filter options
Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
Original file line number Diff line number Diff line change @@ -639,7 +639,7 @@ def _create_completion(
639
639
self .detokenize ([token ]).decode ("utf-8" , errors = "ignore" )
640
640
for token in all_tokens
641
641
]
642
- all_logprobs = [Llama ._logits_to_logprobs ( row ) for row in self .eval_logits ]
642
+ all_logprobs = [Llama .logits_to_logprobs ( list ( map ( float , row )) ) for row in self .eval_logits ]
643
643
for token , token_str , logprobs_token in zip (
644
644
all_tokens , all_token_strs , all_logprobs
645
645
):
@@ -985,7 +985,7 @@ def token_bos() -> llama_cpp.llama_token:
985
985
return llama_cpp .llama_token_bos ()
986
986
987
987
@staticmethod
988
- def logits_to_logprobs (logits : List [llama_cpp . c_float ]) -> List [llama_cpp . c_float ]:
988
+ def logits_to_logprobs (logits : List [float ]) -> List [float ]:
989
989
exps = [math .exp (float (x )) for x in logits ]
990
990
sum_exps = sum (exps )
991
- return [llama_cpp . c_float ( math .log (x / sum_exps ) ) for x in exps ]
991
+ return [math .log (x / sum_exps ) for x in exps ]
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " llama_cpp_python"
3
- version = " 0.1.41 "
3
+ version = " 0.1.42 "
4
4
description = " Python bindings for the llama.cpp library"
5
5
authors = [" Andrei Betlen <abetlen@gmail.com>" ]
6
6
license = " MIT"
Original file line number Diff line number Diff line change 10
10
description = "A Python wrapper for llama.cpp" ,
11
11
long_description = long_description ,
12
12
long_description_content_type = "text/markdown" ,
13
- version = "0.1.41 " ,
13
+ version = "0.1.42 " ,
14
14
author = "Andrei Betlen" ,
15
15
author_email = "abetlen@gmail.com" ,
16
16
license = "MIT" ,
You can’t perform that action at this time.
0 commit comments