From aeeb8ef00a86494a38dde2a7e8264678321b45d5 Mon Sep 17 00:00:00 2001 From: db0 Date: Fri, 9 Aug 2024 11:23:16 +0200 Subject: [PATCH] fix: min context length for uptime --- CHANGELOG.md | 4 ++++ horde/classes/kobold/worker.py | 2 +- horde/consts.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f45f9b3..8a5caa03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +# 4.40.2 + +* Prevents too high max context from being used for rewards + # 4.40.1 * Prevents mistral models from being considered suspiciously fast. diff --git a/horde/classes/kobold/worker.py b/horde/classes/kobold/worker.py index d6d94e1b..f8ea7906 100644 --- a/horde/classes/kobold/worker.py +++ b/horde/classes/kobold/worker.py @@ -103,7 +103,7 @@ def set_softprompts(self, softprompts): def calculate_uptime_reward(self): model = self.get_model_names()[0] # The base amount of kudos one gets is based on the max context length they've loaded - base_kudos = 25 + (15 * self.max_context_length / 1024) + base_kudos = 25 + (15 * min(self.max_context_length,16384) / 1024) if not model_reference.is_known_text_model(model): return base_kudos * 0.5 # We consider the 7B models the baseline here diff --git a/horde/consts.py b/horde/consts.py index 49174a00..0bc0695f 100644 --- a/horde/consts.py +++ b/horde/consts.py @@ -1,4 +1,4 @@ -HORDE_VERSION = "4.40.1" +HORDE_VERSION = "4.40.2" WHITELISTED_SERVICE_IPS = { "212.227.227.178", # Turing Bot