[oai serving chat] Add argument --sampling-defaults and fix ChatCompletionRequest defaults (#11304)
This commit is contained in:
@@ -252,6 +252,7 @@ class ServerArgs:
|
||||
reasoning_parser: Optional[str] = None
|
||||
tool_call_parser: Optional[str] = None
|
||||
tool_server: Optional[str] = None
|
||||
sampling_defaults: str = "model"
|
||||
|
||||
# Data parallelism
|
||||
dp_size: int = 1
|
||||
@@ -1872,6 +1873,16 @@ class ServerArgs:
|
||||
default=ServerArgs.tool_call_parser,
|
||||
help=f"Specify the parser for handling tool-call interactions. Options include: {tool_call_parser_choices}.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--sampling-defaults",
|
||||
type=str,
|
||||
choices=["openai", "model"],
|
||||
default=ServerArgs.sampling_defaults,
|
||||
help="Where to get default sampling parameters. "
|
||||
"'openai' uses SGLang/OpenAI defaults (temperature=1.0, top_p=1.0, etc.). "
|
||||
"'model' uses the model's generation_config.json to get the recommended "
|
||||
"sampling parameters if available. Default is 'model'.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--tool-server",
|
||||
type=str,
|
||||
|
||||
Reference in New Issue
Block a user