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:
@@ -265,7 +265,6 @@ class ServerArgs:
|
|||||||
context_length: Optional[int] = None
|
context_length: Optional[int] = None
|
||||||
is_embedding: bool = False
|
is_embedding: bool = False
|
||||||
enable_multimodal: Optional[bool] = None
|
enable_multimodal: Optional[bool] = None
|
||||||
limit_mm_data_per_request: Optional[Union[str, Dict[str, int]]] = None
|
|
||||||
revision: Optional[str] = None
|
revision: Optional[str] = None
|
||||||
model_impl: str = "auto"
|
model_impl: str = "auto"
|
||||||
|
|
||||||
@@ -637,6 +636,7 @@ class ServerArgs:
|
|||||||
enable_prefix_mm_cache: bool = False
|
enable_prefix_mm_cache: bool = False
|
||||||
mm_enable_dp_encoder: bool = False
|
mm_enable_dp_encoder: bool = False
|
||||||
mm_process_config: Optional[Dict[str, Any]] = None
|
mm_process_config: Optional[Dict[str, Any]] = None
|
||||||
|
limit_mm_data_per_request: Optional[Union[str, Dict[str, int]]] = None
|
||||||
|
|
||||||
# For checkpoint decryption
|
# For checkpoint decryption
|
||||||
decrypted_config_file: Optional[str] = None
|
decrypted_config_file: Optional[str] = None
|
||||||
@@ -2485,13 +2485,6 @@ class ServerArgs:
|
|||||||
action="store_true",
|
action="store_true",
|
||||||
help="Enable the multimodal functionality for the served model. If the model being served is not multimodal, nothing will happen",
|
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(
|
parser.add_argument(
|
||||||
"--revision",
|
"--revision",
|
||||||
type=str,
|
type=str,
|
||||||
@@ -4403,6 +4396,13 @@ class ServerArgs:
|
|||||||
default=ServerArgs.mm_enable_dp_encoder,
|
default=ServerArgs.mm_enable_dp_encoder,
|
||||||
help="Enabling data parallelism for mm encoder. The dp size will be set to the tp size automatically.",
|
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
|
# For checkpoint decryption
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|||||||
Reference in New Issue
Block a user