mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-20 14:28:54 +00:00
Sampling: Add top-a support
Currently in exllamav2 dev, but will be in the next release. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
9
model.py
9
model.py
@@ -523,11 +523,20 @@ class ModelContainer:
|
||||
"installed ExLlamaV2 version."
|
||||
)
|
||||
|
||||
if (unwrap(kwargs.get("top_a"), False)) and not hasattr (
|
||||
gen_settings, "top_a"
|
||||
):
|
||||
logger.warning(
|
||||
"Top-A is not supported by the currently "
|
||||
"installed ExLlamaV2 version."
|
||||
)
|
||||
|
||||
# Apply settings
|
||||
gen_settings.temperature = unwrap(kwargs.get("temperature"), 1.0)
|
||||
gen_settings.temperature_last = unwrap(kwargs.get("temperature_last"), 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)
|
||||
gen_settings.min_p = unwrap(kwargs.get("min_p"), 0.0)
|
||||
gen_settings.tfs = unwrap(kwargs.get("tfs"), 1.0)
|
||||
gen_settings.typical = unwrap(kwargs.get("typical"), 1.0)
|
||||
|
||||
Reference in New Issue
Block a user