-
Notifications
You must be signed in to change notification settings - Fork 165
Update PaddleOCR-VL.md for AMD GPU #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
haic0
wants to merge
7
commits into
vllm-project:main
Choose a base branch
from
haic0:patch-14
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
13d4c15
Update PaddleOCR-VL.md for AMD GPU
haic0 05de247
Update PaddlePaddle/PaddleOCR-VL.md
haic0 e187d36
Update PaddleOCR-VL.md for AMD
haic0 0074ae7
Update PaddleOCR-VL.md for AMD
haic0 4993e16
Merge branch 'vllm-project:main' into patch-14
haic0 52afbc1
Update PaddleOCR-VL.md for AMD
haic0 ef0f148
Merge branch 'vllm-project:main' into patch-14
haic0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -101,3 +101,55 @@ for i, res in enumerate(output): | |
| - Unlike multi-turn chat use cases, we do not expect OCR tasks to benefit significantly from prefix caching or image reuse, therefore it's recommended to turn off these features to avoid unnecessary hashing and caching. | ||
| - Depending on your hardware capability, adjust `max_num_batched_tokens` for better throughput performance. | ||
| - Check out the official [PaddleOCR-VL documentation](https://github.com/PaddlePaddle/PaddleOCR) for more details and examples of using the model for various document parsing tasks. | ||
|
|
||
|
|
||
|
|
||
|
|
||
| ## AMD GPU Support | ||
| Recommended approaches by hardware type are: | ||
|
|
||
|
|
||
| MI300X/MI325X/MI355X | ||
|
|
||
| Please follow the steps here to install and run PaddleOCR-VL models on AMD MI300X/MI325X/MI355X GPU. | ||
|
|
||
| ### Step 1: Installing vLLM (AMD ROCm Backend: MI300X, MI325X, MI355X) | ||
| > Note: The vLLM wheel for ROCm requires Python 3.12, ROCm 7.0, and glibc >= 2.35. If your environment does not meet these requirements, please use the Docker-based setup as described in the [documentation](https://docs.vllm.ai/en/latest/getting_started/installation/gpu/#pre-built-images). | ||
| ```bash | ||
| uv venv | ||
| source .venv/bin/activate | ||
| uv pip install vllm --extra-index-url https://wheels.vllm.ai/rocm/0.14.1/rocm700 | ||
| ``` | ||
|
|
||
|
|
||
| ### Step 2: Start the vLLM server | ||
|
|
||
| Run the vllm online serving | ||
| Sample Command | ||
| ```shell | ||
|
|
||
| SAFETENSORS_FAST_GPU=1 \ | ||
| VLLM_USE_V1=1 \ | ||
| VLLM_USE_TRITON_FLASH_ATTN=0 vllm serve PaddlePaddle/PaddleOCR-VL \ | ||
| --max-num-batched-tokens 16384 \ | ||
| --no-enable-prefix-caching \ | ||
| --mm-processor-cache-gb 0 \ | ||
| --trust-remote-code | ||
haic0 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ``` | ||
|
|
||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you address gemini's format comments? |
||
| ### Step 3: Run Benchmark | ||
| Open a new terminal and run the following command to execute the benchmark script inside the container. | ||
| ```shell | ||
| vllm bench serve \ | ||
| --model "PaddlePaddle/PaddleOCR-VL" \ | ||
| --dataset-name random \ | ||
| --random-input-len 8192 \ | ||
| --random-output-len 1024 \ | ||
| --request-rate 10000 \ | ||
| --num-prompts 16 \ | ||
| --ignore-eos \ | ||
| --trust-remote-code | ||
| ``` | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two blank lines are unnecessary. Removing them will improve formatting consistency, leaving two blank lines before the next section, which is sufficient.