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 e2ab96a

Browse filesBrowse files
committed
Fix for negative temp (sample_softmax)
1 parent 1b1a918 commit e2ab96a
Copy full SHA for e2ab96a

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,8 @@ def sample(
11111111
)
11121112

11131113
if temp < 0.0:
1114-
id = self._ctx.sample_softmax(candidates=self._candidates)
1114+
self._ctx.sample_softmax(candidates=self._candidates)
1115+
id = self._candidates.candidates.data[0].id
11151116
elif temp == 0.0:
11161117
id = self._ctx.sample_token_greedy(candidates=self._candidates)
11171118
elif mirostat_mode == 1:

0 commit comments

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