Skip to content

Commit 951a235

Browse files
authored
Update limit_mm_per_prompt format (#2919)
1 parent 1032c47 commit 951a235

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

engines/python/setup/djl_python/tests/test_properties_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ def test_all_vllm_engine_args():
618618
"tokenizer_pool_size": "12",
619619
"tokenizer_pool_type": "mytype",
620620
"tokenizer_pool_extra_config": '{"a": "b"}',
621-
"limit_mm_per_prompt": "image=2",
621+
"limit_mm_per_prompt": '{"image":2}',
622622
"enable_lora": "true",
623623
"max_loras": "5",
624624
"max_lora_rank": "123",

serving/docs/lmi/user_guides/vision_language_models.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ You can read more about the supported format in the [chat completions doc](chat_
2222
Deploying Vision Language Models with LMI is very similar to deploying Text Generation Models.
2323

2424
There are some additional, optional configs that are exposed:
25-
* `option.limit_mm_per_prompt`: For each multimodal plugin, limit how many input instances to allow for each prompt. Expects a comma-separated list of items, e.g.: `image=16,video=2` allows a maximum of 16 images and 2 videos per prompt. Defaults to 1 for each modality.
25+
* `option.limit_mm_per_prompt`: For each multimodal plugin, limit how many input instances to allow for each prompt. Expects a comma-separated list of items, e.g.: `{"image": 16, "video": 2}` allows a maximum of 16 images and 2 videos per prompt. Defaults to 1 for each modality.
2626

2727
Example SageMaker deployment code:
2828

@@ -32,7 +32,7 @@ from sagemaker.djl_inference import DJLModel
3232
model = DJLModel(
3333
model_id="llava-hf/llava-v1.6-mistral-7b-hf",
3434
env={
35-
"OPTION_LIMIT_MM_PER_PROMPT": "image=2",
35+
"OPTION_LIMIT_MM_PER_PROMPT": '{"image":2}',
3636
}
3737
)
3838

0 commit comments

Comments
 (0)