Instructions to use corsairnui/Unlimited-OCR-AMD-Strix-Halo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use corsairnui/Unlimited-OCR-AMD-Strix-Halo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="corsairnui/Unlimited-OCR-AMD-Strix-Halo", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("corsairnui/Unlimited-OCR-AMD-Strix-Halo", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use corsairnui/Unlimited-OCR-AMD-Strix-Halo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "corsairnui/Unlimited-OCR-AMD-Strix-Halo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "corsairnui/Unlimited-OCR-AMD-Strix-Halo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/corsairnui/Unlimited-OCR-AMD-Strix-Halo
- SGLang
How to use corsairnui/Unlimited-OCR-AMD-Strix-Halo with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "corsairnui/Unlimited-OCR-AMD-Strix-Halo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "corsairnui/Unlimited-OCR-AMD-Strix-Halo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "corsairnui/Unlimited-OCR-AMD-Strix-Halo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "corsairnui/Unlimited-OCR-AMD-Strix-Halo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use corsairnui/Unlimited-OCR-AMD-Strix-Halo with Docker Model Runner:
docker model run hf.co/corsairnui/Unlimited-OCR-AMD-Strix-Halo
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.pyfor image and PDF OCR.scripts/rocm_container.shfor the ROCm PyTorch container.scripts/setup_container_env.shfor OCR dependencies without replacing the ROCm PyTorch build.scripts/smoke_test.shfor a local smoke test.docs/AMD_VALIDATION.mdfor 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
Model tree for corsairnui/Unlimited-OCR-AMD-Strix-Halo
Base model
baidu/Unlimited-OCR