Move limit-mm-data-per-request to make code clean (#15775)

Signed-off-by: Xinyuan Tong <xinyuantong.cs@gmail.com>
This commit is contained in:
Xinyuan Tong
2025-12-24 18:59:39 +00:00
committed by GitHub
parent 643aeefe6d
commit ae434f7821

View File

@@ -265,7 +265,6 @@ class ServerArgs:
context_length: Optional[int] = None
is_embedding: bool = False
enable_multimodal: Optional[bool] = None
limit_mm_data_per_request: Optional[Union[str, Dict[str, int]]] = None
revision: Optional[str] = None
model_impl: str = "auto"
@@ -637,6 +636,7 @@ class ServerArgs:
enable_prefix_mm_cache: bool = False
mm_enable_dp_encoder: bool = False
mm_process_config: Optional[Dict[str, Any]] = None
limit_mm_data_per_request: Optional[Union[str, Dict[str, int]]] = None
# For checkpoint decryption
decrypted_config_file: Optional[str] = None
@@ -2485,13 +2485,6 @@ class ServerArgs:
action="store_true",
help="Enable the multimodal functionality for the served model. If the model being served is not multimodal, nothing will happen",
)
parser.add_argument(
"--limit-mm-data-per-request",
type=json.loads,
default=ServerArgs.limit_mm_data_per_request,
help="Limit the number of multimodal inputs per request. "
'e.g. \'{"image": 1, "video": 1, "audio": 1}\'',
)
parser.add_argument(
"--revision",
type=str,
@@ -4403,6 +4396,13 @@ class ServerArgs:
default=ServerArgs.mm_enable_dp_encoder,
help="Enabling data parallelism for mm encoder. The dp size will be set to the tp size automatically.",
)
parser.add_argument(
"--limit-mm-data-per-request",
type=json.loads,
default=ServerArgs.limit_mm_data_per_request,
help="Limit the number of multimodal inputs per request. "
'e.g. \'{"image": 1, "video": 1, "audio": 1}\'',
)
# For checkpoint decryption
parser.add_argument(