Minor fixes for server_args, parallel_state, and test_deterministic.py (#11159)
This commit is contained in:
@@ -116,6 +116,8 @@ GRAMMAR_BACKEND_CHOICES = ["xgrammar", "outlines", "llguidance", "none"]
|
||||
|
||||
DETERMINISTIC_ATTENTION_BACKEND_CHOICES = ["flashinfer", "fa3", "triton"]
|
||||
|
||||
RADIX_EVICTION_POLICY_CHOICES = ["lru", "lfu"]
|
||||
|
||||
|
||||
# Allow external code to add more choices
|
||||
def add_load_format_choices(choices):
|
||||
@@ -138,6 +140,14 @@ def add_grammar_backend_choices(choices):
|
||||
GRAMMAR_BACKEND_CHOICES.extend(choices)
|
||||
|
||||
|
||||
def add_deterministic_attention_backend_choices(choices):
|
||||
DETERMINISTIC_ATTENTION_BACKEND_CHOICES.extend(choices)
|
||||
|
||||
|
||||
def add_radix_eviction_policy_choices(choices):
|
||||
RADIX_EVICTION_POLICY_CHOICES.extend(choices)
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class ServerArgs:
|
||||
# Model and tokenizer
|
||||
@@ -2243,7 +2253,7 @@ class ServerArgs:
|
||||
parser.add_argument(
|
||||
"--radix-eviction-policy",
|
||||
type=str,
|
||||
choices=["lru", "lfu"],
|
||||
choices=RADIX_EVICTION_POLICY_CHOICES,
|
||||
default=ServerArgs.radix_eviction_policy,
|
||||
help="The eviction policy of radix trees. 'lru' stands for Least Recently Used, 'lfu' stands for Least Frequently Used.",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user