mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-14 15:57:27 +00:00
Warning if unsupported samplers are used
This commit is contained in:
17
model.py
17
model.py
@@ -270,6 +270,23 @@ class ModelContainer:
|
||||
# Sampler settings
|
||||
|
||||
gen_settings = ExLlamaV2Sampler.Settings()
|
||||
|
||||
# Warn if unsupported settings supplied
|
||||
|
||||
if "mirostat" in kwargs and not hasattr(gen_settings, "mirostat"):
|
||||
print(" !! Warning: Currently installed ExLlamaV2 does not support Mirostat sampling")
|
||||
|
||||
if kwargs.get("min_p", 0.0) not in [0.0, 1.0] and not hasattr(gen_settings, "min_p"):
|
||||
print(" !! Warning: Currently installed ExLlamaV2 does not support min-P sampling")
|
||||
|
||||
if kwargs.get("tfs", 0.0) not in [0.0, 1.0] and not hasattr(gen_settings, "tfs"):
|
||||
print(" !! Warning: Currently installed ExLlamaV2 does not support tail-free sampling (TFS)")
|
||||
|
||||
if "temperature_last" in kwargs and not hasattr(gen_settings, "temperature_last"):
|
||||
print(" !! Warning: Currently installed ExLlamaV2 does not support temperature_last")
|
||||
|
||||
#Apply settings
|
||||
|
||||
gen_settings.temperature = kwargs.get("temperature", 1.0)
|
||||
gen_settings.temperature_last = kwargs.get("temperature_last", False)
|
||||
gen_settings.top_k = kwargs.get("top_k", 1)
|
||||
|
||||
Reference in New Issue
Block a user