Fix PaddleOCR-VL HPS pipeline not using the vLLM server (#18129)

* Fix PaddleOCR-VL HPS pipeline not using the vLLM server

The PaddleOCR-VL-1.6 HPS SDK ships a pipeline_config.yaml with
`genai_config.backend: native`, which makes the pipeline run the VLM
inside the Triton container instead of calling the dedicated vLLM
server deployed by compose.yaml. The vLLM server stays completely idle
while inference runs unbatched in the pipeline container, causing much
higher latency (~10x slower per image in our tests) and ~2 GiB of extra
GPU memory for the duplicated model weights.

Patch the config in prepare.sh to use `backend: vllm-server` with the
compose service URL, matching the configuration shipped with the 1.5
SDK. Also restore batch_size from -1 to 4096 as in 1.5.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Remove explanatory comment per review

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
askxiaozhangandClaude Fable 5 authored and GitHub committed 2026-06-11 18:25:05 +08:00
1 parent 35a3e07f8f
commit b53e29e858
1 file changed
+8
@@ -53,6 +53,14 @@ sed -i.bak \
"${PIPELINE_CONFIG}"
rm -f "${PIPELINE_CONFIG}.bak"
if grep -qE '^\s*backend: native\s*$' "${PIPELINE_CONFIG}"; then
sed -i.bak \
-e 's|^\( *\)batch_size: -1$|\1batch_size: 4096|' \
-e 's|^\( *\)backend: native$|\1backend: vllm-server\n\1server_url: http://paddleocr-vlm-server:8080/v1|' \
"${PIPELINE_CONFIG}"
rm -f "${PIPELINE_CONFIG}.bak"
fi
VLM_NAME="$(_extract_vlm_name "${PIPELINE_CONFIG}")"
if [ -z "${VLM_NAME}" ]; then
echo "Failed to read VLM name from ${PIPELINE_CONFIG}" >&2