Skip to content

Commit 4a27c63

Browse files
committed
Reuse -e option to set --mm-processor-kwargs
Signed-off-by: Chen, Wenbin <[email protected]>
1 parent 7b9daa0 commit 4a27c63

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

scripts/start_gaudi_vllm_server.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,17 @@ while getopts hw:t:m:a:d:q:i:p:o:b:g:u:e:l:c:sf flag; do
9696
u) # gpu-memory-utilization
9797
gpu_memory_utilization=$OPTARG ;;
9898
e) # extra vLLM server parameters
99-
IFS=" " read -r -a extra_params <<< "$OPTARG" ;;
99+
IFS=" " read -r -a extra_params <<< "$OPTARG"
100+
for ((i=0; i<${#extra_params[@]}; i++)); do
101+
if [[ "${extra_params[$i]}" == "--mm-processor-kwargs" ]]; then
102+
found_mm_processor_kwargs=true
103+
break
104+
fi
105+
done
106+
if [ "$found_mm_processor_kwargs" != true ]; then
107+
extra_params+=("--mm-processor-kwargs" "max_pixels=1003520")
108+
fi
109+
;;
100110
l) # limit of the padding ratio
101111
max_padding_ratio=$OPTARG
102112
# make sure max_padding_ratio is a float and in [0.0, 0.5]
@@ -189,7 +199,6 @@ python3 -m vllm.entrypoints.openai.api_server \
189199
--trust-remote-code \
190200
--seed 2025 \
191201
--distributed_executor_backend "${dist_backend}" \
192-
--mm_processor_kwargs "max_pixels=1003520" \
193202
"${extra_params[@]}")
194203

195204
echo "Start a vLLM server for ${model_name} on Gaudi $DEVICE_NAME with command:" |& tee -a "${log_file}"

0 commit comments

Comments
 (0)