From 50d947b9c26fd7ccf9935e6ce18c7cc29dd15b72 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Mon, 8 May 2023 22:00:24 +0200 Subject: [PATCH] adding REPEAT_PENALTY --- default.env | 3 +++ llamabot.js | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/default.env b/default.env index 8858fb8..106f26b 100644 --- a/default.env +++ b/default.env @@ -43,3 +43,6 @@ USE_MMAP=1 # Only use MLOCK if you know what it does! USE_MLOCK=0 + +# The higher the number the more hard core. +REPEAT_PENALTY=1 \ No newline at end of file diff --git a/llamabot.js b/llamabot.js index 22200a5..893d7cb 100644 --- a/llamabot.js +++ b/llamabot.js @@ -316,7 +316,9 @@ async function generateResponse(conversation, message) { }, body: JSON.stringify({ messages: messagesCopy, - max_tokens: Number(process.env.MAX_TOKENS) // add the max_tokens parameter here + max_tokens: Number(process.env.MAX_TOKENS), // add the max_tokens parameter here + repeat_penalty: Number(process.env.REPEAT_PENALTY) + }), signal: controller.signal });