From a65125c0bd28ee2b787a3d53688fb67b0f871b9e Mon Sep 17 00:00:00 2001 From: Andrei Betlen Date: Tue, 16 May 2023 09:35:50 -0400 Subject: [PATCH] Add sampling defaults for generate --- llama_cpp/llama.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llama_cpp/llama.py b/llama_cpp/llama.py index 362ebd9..6c4e153 100644 --- a/llama_cpp/llama.py +++ b/llama_cpp/llama.py @@ -446,10 +446,10 @@ class Llama: def generate( self, tokens: Sequence[llama_cpp.llama_token], - top_k: int, - top_p: float, - temp: float, - repeat_penalty: float, + top_k: int = 40, + top_p: float = 0.95, + temp: float = 0.80, + repeat_penalty: float = 1.1, reset: bool = True, frequency_penalty: float = 0.0, presence_penalty: float = 0.0,