Skip to content

Commit

Permalink
oops missed a spot
Browse files Browse the repository at this point in the history
  • Loading branch information
AAbushady committed Feb 1, 2024
1 parent b756748 commit bcc1a82
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions backends/exllamav2/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit bcc1a82

Please sign in to comment.