"git@developer.sourcefind.cn:OpenDAS/apex.git" did not exist on "57f890a70c7cf7d22b8e7349d577e4d5e9c3ba19"
Unverified Commit f3b67602 authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

[Auto Sync] Update server_args.py (20250906) (#10117)


Co-authored-by: default avatargithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: default avatarHanming Lu <69857889+hanming-lu@users.noreply.github.com>
parent 9eb50ecc
...@@ -104,6 +104,8 @@ ATTENTION_BACKEND_CHOICES = [ ...@@ -104,6 +104,8 @@ ATTENTION_BACKEND_CHOICES = [
DISAGG_TRANSFER_BACKEND_CHOICES = ["mooncake", "nixl", "ascend", "fake"] DISAGG_TRANSFER_BACKEND_CHOICES = ["mooncake", "nixl", "ascend", "fake"]
GRAMMAR_BACKEND_CHOICES = ["xgrammar", "outlines", "llguidance", "none"]
# Allow external code to add more choices # Allow external code to add more choices
def add_load_format_choices(choices): def add_load_format_choices(choices):
...@@ -122,6 +124,10 @@ def add_disagg_transfer_backend_choices(choices): ...@@ -122,6 +124,10 @@ def add_disagg_transfer_backend_choices(choices):
DISAGG_TRANSFER_BACKEND_CHOICES.extend(choices) DISAGG_TRANSFER_BACKEND_CHOICES.extend(choices)
def add_grammar_backend_choices(choices):
GRAMMAR_BACKEND_CHOICES.extend(choices)
@dataclasses.dataclass @dataclasses.dataclass
class ServerArgs: class ServerArgs:
# Model and tokenizer # Model and tokenizer
...@@ -1475,7 +1481,7 @@ class ServerArgs: ...@@ -1475,7 +1481,7 @@ class ServerArgs:
parser.add_argument( parser.add_argument(
"--grammar-backend", "--grammar-backend",
type=str, type=str,
choices=["xgrammar", "outlines", "llguidance", "none"], choices=GRAMMAR_BACKEND_CHOICES,
default=ServerArgs.grammar_backend, default=ServerArgs.grammar_backend,
help="Choose the backend for grammar-guided decoding.", help="Choose the backend for grammar-guided decoding.",
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment