[Auto Sync] Update server_args.py (20250906) (#10117)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Hanming Lu <69857889+hanming-lu@users.noreply.github.com>
This commit is contained in:
@@ -104,6 +104,8 @@ ATTENTION_BACKEND_CHOICES = [
|
||||
|
||||
DISAGG_TRANSFER_BACKEND_CHOICES = ["mooncake", "nixl", "ascend", "fake"]
|
||||
|
||||
GRAMMAR_BACKEND_CHOICES = ["xgrammar", "outlines", "llguidance", "none"]
|
||||
|
||||
|
||||
# Allow external code to add more choices
|
||||
def add_load_format_choices(choices):
|
||||
@@ -122,6 +124,10 @@ def add_disagg_transfer_backend_choices(choices):
|
||||
DISAGG_TRANSFER_BACKEND_CHOICES.extend(choices)
|
||||
|
||||
|
||||
def add_grammar_backend_choices(choices):
|
||||
GRAMMAR_BACKEND_CHOICES.extend(choices)
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class ServerArgs:
|
||||
# Model and tokenizer
|
||||
@@ -1475,7 +1481,7 @@ class ServerArgs:
|
||||
parser.add_argument(
|
||||
"--grammar-backend",
|
||||
type=str,
|
||||
choices=["xgrammar", "outlines", "llguidance", "none"],
|
||||
choices=GRAMMAR_BACKEND_CHOICES,
|
||||
default=ServerArgs.grammar_backend,
|
||||
help="Choose the backend for grammar-guided decoding.",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user