From bcc1a823371a4151084154c73a00f87227245cb2 Mon Sep 17 00:00:00 2001 From: Alexander Abushady <44341163+AAbushady@users.noreply.github.com> Date: Thu, 1 Feb 2024 18:00:54 -0500 Subject: [PATCH] oops missed a spot --- backends/exllamav2/model.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backends/exllamav2/model.py b/backends/exllamav2/model.py index ec2ec619..b786bd3e 100644 --- a/backends/exllamav2/model.py +++ b/backends/exllamav2/model.py @@ -523,6 +523,14 @@ def check_unsupported_settings(self, **kwargs): "installed ExLlamaV2 version." ) + if (unwrap(kwargs.get("smoothing_factor"), 0.0)) > 0.0 and not hasattr( + ExLlamaV2Sampler.Settings, "smoothing_factor" + ): + logger.warning( + "Smoothing factor is not supported by the currently " + "installed ExLlamaV2 version." + ) + def generate(self, prompt: str, **kwargs): """Generate a response to a prompt""" generation = list(self.generate_gen(prompt, **kwargs)) @@ -593,6 +601,7 @@ def generate_gen(self, prompt: str, **kwargs): # Apply settings gen_settings.temperature = unwrap(kwargs.get("temperature"), 1.0) gen_settings.temperature_last = unwrap(kwargs.get("temperature_last"), False) + gen_settings.smoothing_factor = unwrap(kwargs.get("smoothing_factor"), False) gen_settings.top_k = unwrap(kwargs.get("top_k"), 0) gen_settings.top_p = unwrap(kwargs.get("top_p"), 1.0) gen_settings.top_a = unwrap(kwargs.get("top_a"), 0.0)