Add customized sampler registration (#15423)

This commit is contained in:
Qiaolin Yu
2025-12-18 23:10:23 -08:00
committed by GitHub
parent f228b662a7
commit 173940927f
6 changed files with 60 additions and 11 deletions
+2 -1
View File
@@ -70,6 +70,7 @@ logger = logging.getLogger(__name__)
# Define constants
SAMPLING_BACKEND_CHOICES = {"flashinfer", "pytorch", "ascend"}
LOAD_FORMAT_CHOICES = [
"auto",
"pt",
@@ -3220,7 +3221,7 @@ class ServerArgs:
parser.add_argument(
"--sampling-backend",
type=str,
choices=["flashinfer", "pytorch", "ascend"],
choices=SAMPLING_BACKEND_CHOICES,
default=ServerArgs.sampling_backend,
help="Choose the kernels for sampling layers.",
)