From 28c8df337bc14a752f66f8ee258b73ee621329b1 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 11 Aug 2023 11:02:56 -0700 Subject: [PATCH] Add repetition_penalty_range to ctransformers --- modules/ctransformers_model.py | 1 + modules/loaders.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ctransformers_model.py b/modules/ctransformers_model.py index b3d001d3..c5bc701a 100644 --- a/modules/ctransformers_model.py +++ b/modules/ctransformers_model.py @@ -56,6 +56,7 @@ class CtransformersModel: top_p=state['top_p'], top_k=state['top_k'], repetition_penalty=state['repetition_penalty'], + last_n_tokens=state['repetition_penalty_range'], threads=shared.args.threads ) diff --git a/modules/loaders.py b/modules/loaders.py index fa5e03c2..21854de7 100644 --- a/modules/loaders.py +++ b/modules/loaders.py @@ -86,7 +86,6 @@ loaders_and_params = OrderedDict({ 'no_mmap', 'low_vram', 'mlock', - 'llama_cpp_seed', 'alpha_value', 'compress_pos_emb', 'cpu', @@ -270,6 +269,7 @@ loaders_samplers = { 'top_p', 'top_k', 'repetition_penalty', + 'repetition_penalty_range', } }