From 59e65cd7b2b7cb04f0ca2f114bfee7980aac8383 Mon Sep 17 00:00:00 2001 From: randaller Date: Sat, 11 Mar 2023 14:12:22 +0300 Subject: [PATCH] shawn sampler --- example-chat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example-chat.py b/example-chat.py index f5fc02e..62f9732 100644 --- a/example-chat.py +++ b/example-chat.py @@ -83,10 +83,10 @@ def main( ckpt_dir: str, tokenizer_path: str, temperature: float = 0.8, - top_p: float = 0.0, # use 0.95 or so for top_p sampler, and 0.0 for top_k sampler + top_p: float = 0.95, # use 0.95 or so for top_p sampler, and 0.0 for top_k sampler top_k: int = 40, repetition_penalty: float = (1.0 / 0.85), # 1.0 to disable repetition_penalty - sampler: str = 'top_k', # top_k or top_p + sampler: str = 'top_p', # top_p or top_k max_seq_len: int = 2048, max_batch_size: int = 1, ):