mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-05 06:35:15 +00:00
llama.cpp: Add top_n_sigma, fix typical_p in sampler priority
This commit is contained in:
parent
cbef35054c
commit
d1c0154d66
2 changed files with 5 additions and 2 deletions
|
|
@ -66,6 +66,7 @@ class LlamaServer:
|
|||
"top_k": state["top_k"],
|
||||
"top_p": state["top_p"],
|
||||
"min_p": state["min_p"],
|
||||
"top_n_sigma": state["top_n_sigma"] if state["top_n_sigma"] > 0 else -1,
|
||||
"tfs_z": state["tfs"],
|
||||
"typical_p": state["typical_p"],
|
||||
"repeat_penalty": state["repetition_penalty"],
|
||||
|
|
@ -102,8 +103,10 @@ class LlamaServer:
|
|||
|
||||
penalty_found = False
|
||||
for s in samplers:
|
||||
if s.strip() in ["dry", "top_k", "typ_p", "top_p", "min_p", "xtc", "temperature"]:
|
||||
if s.strip() in ["dry", "top_k", "top_p", "top_n_sigma", "min_p", "temperature", "xtc"]:
|
||||
filtered_samplers.append(s.strip())
|
||||
elif s.strip() == "typical_p":
|
||||
filtered_samplers.append("typ_p")
|
||||
elif not penalty_found and s.strip() == "repetition_penalty":
|
||||
filtered_samplers.append("penalties")
|
||||
penalty_found = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue