8000 Add sampling defaults for generate · HardSoft2023/llama-cpp-python@a65125c · GitHub
[go: up one dir, main page]

Skip to content

Commit a65125c

Browse files
committed
Add sampling defaults for generate
1 parent 341c50b commit a65125c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llama_cpp/llama.py

Lines 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