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 a65125c

Browse filesBrowse files
committed
Add sampling defaults for generate
1 parent 341c50b commit a65125c
Copy full SHA for a65125c

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+4
-4
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,10 @@ def sample(
446446
def generate(
447447
self,
448448
tokens: Sequence[llama_cpp.llama_token],
449-
top_k: int,
450-
top_p: float,
451-
temp: float,
452-
repeat_penalty: float,
449+
top_k: int = 40,
450+
top_p: float = 0.95,
451+
temp: float = 0.80,
452+
repeat_penalty: float = 1.1,
453453
reset: bool = True,
454454
frequency_penalty: float = 0.0,
455455
presence_penalty: float = 0.0,

0 commit comments

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