Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5672ed7

Browse filesBrowse files
authored
Merge branch 'abetlen:main' into th-neu-dockerfile-slim
2 parents 5013218 + cabd8b8 commit 5672ed7
Copy full SHA for 5672ed7

File tree

Expand file treeCollapse file tree

4 files changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+6
-6
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def _create_completion(
639639
self.detokenize([token]).decode("utf-8", errors="ignore")
640640
for token in all_tokens
641641
]
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]
643643
for token, token_str, logprobs_token in zip(
644644
all_tokens, all_token_strs, all_logprobs
645645
):
@@ -985,7 +985,7 @@ def token_bos() -> llama_cpp.llama_token:
985985
return llama_cpp.llama_token_bos()
986986

987987
@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]:
989989
exps = [math.exp(float(x)) for x in logits]
990990
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]

‎pyproject.toml

Copy file name to clipboardExpand all lines: pyproject.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "llama_cpp_python"
3-
version = "0.1.41"
3+
version = "0.1.42"
44
description = "Python bindings for the llama.cpp library"
55
authors = ["Andrei Betlen <abetlen@gmail.com>"]
66
license = "MIT"

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
description="A Python wrapper for llama.cpp",
1111
long_description=long_description,
1212
long_description_content_type="text/markdown",
13-
version="0.1.41",
13+
version="0.1.42",
1414
author="Andrei Betlen",
1515
author_email="abetlen@gmail.com",
1616
license="MIT",

‎vendor/llama.cpp

Copy file name to clipboard

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.