|
| 1 | +--- |
| 2 | +model_id: hunyuan-ocr |
| 3 | +backend: vllm |
| 4 | +hardware: |
| 5 | + gpu: "AMD gfx1100" |
| 6 | + vram_min_gb: 48 |
| 7 | +environment: |
| 8 | + type: docker |
| 9 | + rocm: "7.2" |
| 10 | +command: | |
| 11 | + # 1. Start vLLM server: |
| 12 | + vllm serve tencent/HunyuanOCR --host 0.0.0.0 --port 10000 --max-model-len 32768 |
| 13 | +
|
| 14 | + # 2. Run adapter: |
| 15 | + python adapter/run_adapter.py \ |
| 16 | + --platform linux-rocm --backend vllm \ |
| 17 | + --server-url http://127.0.0.1:10000/v1 \ |
| 18 | + --model tencent/HunyuanOCR \ |
| 19 | + --img-dir /root/datasets/OmniDocBench_data/images \ |
| 20 | + --out-dir /tmp/hunyuanocr-predictions |
| 21 | +
|
| 22 | + # 3. Score + publish (via omnidocbench-rocm): |
| 23 | + omnidocbench-rocm run --stage score --platform linux-rocm --cdm \ |
| 24 | + --predictions-dir /tmp/hunyuanocr-predictions \ |
| 25 | + --run-stats /tmp/hunyuanocr-predictions/_run_stats.json --version v16 |
| 26 | +expected_overall: |
| 27 | + value: 93.64 |
| 28 | + tolerance: 0.5 |
| 29 | +--- |
| 30 | + |
| 31 | +# Reproduce HunyuanOCR 93.64 on AMD ROCm |
| 32 | + |
| 33 | +## Prerequisites |
| 34 | + |
| 35 | +```bash |
| 36 | +rocminfo | grep -E "Name:|VRAM" # must show gfx1100 + ≥48 GB |
| 37 | +ls -la /dev/kfd # must exist |
| 38 | +``` |
| 39 | + |
| 40 | +## Quickstart |
| 41 | + |
| 42 | +Full 1,651-page evaluation with CDM formula scoring. |
| 43 | + |
| 44 | +```bash |
| 45 | +# Start vLLM server on AMD GPU |
| 46 | +vllm serve tencent/HunyuanOCR --host 0.0.0.0 --port 10000 --max-model-len 32768 |
| 47 | + |
| 48 | +# In another terminal, run adapter |
| 49 | +cd /path/to/HunyuanOCR-ROCm |
| 50 | +python adapter/run_adapter.py \ |
| 51 | + --platform linux-rocm --backend vllm \ |
| 52 | + --server-url http://127.0.0.1:10000/v1 \ |
| 53 | + --model tencent/HunyuanOCR \ |
| 54 | + --img-dir /root/datasets/OmniDocBench_data/images \ |
| 55 | + --out-dir /tmp/hunyuanocr-predictions |
| 56 | + |
| 57 | +# Score |
| 58 | +omnidocbench-rocm run --stage score --platform linux-rocm --cdm \ |
| 59 | + --predictions-dir /tmp/hunyuanocr-predictions \ |
| 60 | + --run-stats /tmp/hunyuanocr-predictions/_run_stats.json --version v16 |
| 61 | +``` |
| 62 | + |
| 63 | +## Expected output |
| 64 | + |
| 65 | +Overall **93.64** (±0.5). Text 95.48, Table TEDS 92.97%, Formula CDM 92.46%. |
| 66 | + |
| 67 | +## If it fails |
| 68 | + |
| 69 | +See [OmniDocBench-ROCm pitfalls](https://github.com/AIwork4me/OmniDocBench-ROCm/docs/pitfalls.md). |
0 commit comments