Unlimited-OCR AMD Strix Halo

AMD Strix Halo / ROCm packaging for baidu/Unlimited-OCR.

Original model: baidu/Unlimited-OCR.

This repository keeps the Unlimited-OCR model files at the root and adds a small ROCm runner for Ryzen AI Max+ 395 / Radeon 8060S systems. The goal is simple: make Unlimited-OCR practical to run locally on AMD Strix Halo.

This is a community package. It is not an official Baidu release and is not an official Corsair release.

Included

  • Unlimited-OCR config, tokenizer, model code, assets, paper, license, wheel, and safetensors weight file.
  • scripts/run_ocr_rocm.py for image and PDF OCR.
  • scripts/rocm_container.sh for the ROCm PyTorch container.
  • scripts/setup_container_env.sh for OCR dependencies without replacing the ROCm PyTorch build.
  • scripts/smoke_test.sh for a local smoke test.
  • docs/AMD_VALIDATION.md for the validation snapshot from the tested machine.

Tested Machine

  • CPU/APU: AMD Ryzen AI Max+ 395 w/ Radeon 8060S
  • GPU target: gfx1151
  • Container: docker.io/rocm/pytorch:rocm7.2.1_ubuntu24.04_py3.12_pytorch_release_2.9.1
  • PyTorch observed locally: 2.9.1+rocm7.2.1.gitff65f5bc
  • HIP observed locally: 7.2.53211-e1a6bc5663
  • Transformers: 4.57.1

Setup

git clone https://huggingface.co/corsairnui/Unlimited-OCR-AMD-Strix-Halo
cd Unlimited-OCR-AMD-Strix-Halo
bash scripts/rocm_container.sh bash scripts/setup_container_env.sh

Verify device access:

bash scripts/rocm_container.sh bash -lc 'PYTHONPATH=$PWD/.deps:$PYTHONPATH python scripts/verify_rocm.py'

Run OCR

Single image:

bash scripts/rocm_container.sh bash -lc 'PYTHONPATH=$PWD/.deps:$PYTHONPATH python scripts/make_sample_image.py'
bash scripts/rocm_container.sh bash -lc 'PYTHONPATH=$PWD/.deps:$PYTHONPATH python scripts/run_ocr_rocm.py --image samples/strix_halo_ocr_sample.png --output-dir results/my_image --mode base --image-size 512 --max-length 2048'

PDF, practical profile:

bash scripts/rocm_container.sh bash -lc 'PYTHONPATH=$PWD/.deps:$PYTHONPATH python scripts/run_ocr_rocm.py --pdf document.pdf --pdf-strategy pages --quality-profile excellent --quality-target 0.80 --excellent-pdf-dpi 220 --excellent-image-size 1024 --output-dir results/my_pdf --image-size 512 --pdf-dpi 120 --max-length 4096 --retry-image-size 1024 --retry-pdf-dpi 160'

PDF, high-quality profile:

bash scripts/rocm_container.sh bash -lc 'PYTHONPATH=$PWD/.deps:$PYTHONPATH python scripts/run_ocr_rocm.py --pdf document.pdf --pdf-strategy pages --quality-profile high-quality --output-dir results/my_high_quality_pdf --image-size 1024 --pdf-dpi 300 --max-length 32768 --ngram-window 1024 --retry-image-size 1024 --retry-pdf-dpi 300'

Smoke test:

bash scripts/rocm_container.sh bash scripts/smoke_test.sh

Validation Snapshot

Core public PDF benchmark, excellent profile:

Document Pages Word F1 vs embedded PDF text
Unlimited-OCR paper 14/14 0.940
IRS W-4 5/5 0.978
Attention Is All You Need 15/15 0.849

High-quality representative subset:

Metric Result
Completed cases 8/8
Mean word F1 0.886
Mean Unicode char F1 0.886
Throughput 1.53 pages/min
Hard-loop alerts 0
Structure detected 4 tables, 2 equations, 4 images, 2 captions
Non-Latin OCR characters 4495

Notes

This is a community AMD packaging of the upstream MIT-licensed Unlimited-OCR model. Runtime quality depends on document type, scan quality, PDF rendering settings, available memory, and ROCm/PyTorch versions.

Downloads last month
33
Safetensors
Model size
3B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for corsairnui/Unlimited-OCR-AMD-Strix-Halo

Finetuned
(9)
this model