From ec745d8b80a86704f299da68ca385e51228fda80 Mon Sep 17 00:00:00 2001 From: Henk Date: Fri, 21 Jul 2023 16:25:32 +0200 Subject: [PATCH] Dont accidentally block pad tokens --- modeling/inference_models/hf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modeling/inference_models/hf.py b/modeling/inference_models/hf.py index e407f5b4..9e7f2c9c 100644 --- a/modeling/inference_models/hf.py +++ b/modeling/inference_models/hf.py @@ -326,6 +326,8 @@ class HFInferenceModel(InferenceModel): if any(c in str(k) for c in "[]") ] + self.badwordsids.remove([self.tokenizer.pad_token_id]) + if utils.koboldai_vars.newlinemode == "n": self.badwordsids.append([self.tokenizer.eos_token_id])