|
Download docs/VALIDATION.md from dougvk/Unlimited-OCR-RDNA4: direct link, hf CLI and curl.
- Browser
- Download file 3.84 kB
-
https://huggingface.co/dougvk/Unlimited-OCR-RDNA4/resolve/main/docs/VALIDATION.md
- Command line
-
hf download hf://dougvk/Unlimited-OCR-RDNA4/docs/VALIDATION.md
-
curl -L -o VALIDATION.md https://huggingface.co/dougvk/Unlimited-OCR-RDNA4/resolve/main/docs/VALIDATION.md
3.84 kB
| # RDNA 4 validation | |
| ## Scope | |
| This gate validates a narrow runtime integration: | |
| - original Baidu BF16 checkpoint at one immutable revision; | |
| - direct Hugging Face Transformers inference on one visible AMD GPU; | |
| - no quantization, serving framework, tensor parallelism, custom kernel package, renamed weights, or fine-tuning; | |
| - exact software inventory, model-tree integrity, deterministic output, bounded PDF rendering, and released VRAM. | |
| It is not a new model/checkpoint/kernel port or an OCR-quality benchmark. | |
| ## Verified host | |
| Validated 31 July 2026 on one GPU in a Tinybox Red v2: | |
| - AMD Radeon RX 9070 XT, `gfx1201`, 16 GB; | |
| - Ubuntu 24.04.4, kernel `6.17.0-40-generic`; | |
| - host ROCm 7.2.1 and HIP runtime `7.2.53211-e1a6bc5663`; | |
| - PyTorch `2.9.1+rocm7.2.1.gitff65f5bc`; | |
| - torchvision `0.24.0+rocm7.2.1.gitb919bd0c`; | |
| - Triton `3.5.1+rocm7.2.1.gita272dfa8`; | |
| - Transformers 4.57.1 and pypdfium2 5.12.1; | |
| - model revision `07dea832e22aefee32ad281d4b80551282e1c168`; | |
| - weight SHA-256 `2bc48a7a110061ea58fff65d3169367eebe3aee371ca6968dc2219c1b2855fc6`. | |
| The exact parsed evidence is checked in as [`validation-gfx1201.json`](validation-gfx1201.json). | |
| ## Tracked gate | |
| The repository carries one synthetic 1600×2000 document as PNG and one-page PDF. Their bytes are fixed: | |
| | Fixture | SHA-256 | | |
| |---|---| | |
| | PNG | `f5099e17be868abfb4213dbdab220deac82a2db93ba87ab22f03219178246972` | | |
| | PDF | `cdd2b484d0ac90bd98b489dd97565a65eb17246f713359524cddd41d78cc10cb` | | |
| The gate: | |
| 1. checksum-verifies both fixtures; | |
| 2. parses `doctor --json` and requires exactly one visible `gfx1201`, BF16, the exact package/HIP stack, and the pinned prepared model; | |
| 3. proves the root-created systemd `PrivateNetwork` namespace cannot make an outbound connection; | |
| 4. runs PNG inference twice in fresh processes and PDF inference once; | |
| 5. checks heading/table/reading order, euro amount, formula, checksum text, page counts, revision, architecture, and a sub-16-GiB peak; | |
| 6. requires byte-identical repeated PNG output and the recorded PNG/PDF output hashes; | |
| 7. parses AMD SMI JSON after completion and rejects a remaining Python GPU process. | |
| Final results: | |
| | Test | Model load | Inference | Peak allocated VRAM | Output SHA-256 | | |
| |---|---:|---:|---:|---| | |
| | PNG process 1 | 9.287 s | 15.275 s | 8.253 GiB | `13df4005…cbc01` | | |
| | PNG process 2 | 9.000 s | 14.995 s | 8.253 GiB | `13df4005…cbc01` | | |
| | One-page PDF, 150 DPI | 8.983 s | 15.368 s | 8.253 GiB | `fb17a639…42438` | | |
| AMD SMI reported `No running processes detected` after the final process. The two PNG results were byte-identical. | |
| ## Reproduce | |
| Start with no competing owner of the selected GPU, then run: | |
| ```bash | |
| ./scripts/bootstrap-rocm.sh | |
| .venv/bin/unlimited-ocr-rdna4 prepare | |
| VALIDATION_NETWORK_ISOLATED=1 \ | |
| UNLIMITED_OCR_DEVICE=GPU-0123456789abcdef \ | |
| AMD_SMI_GPU=3 \ | |
| ./scripts/validate-smoke.sh | |
| ``` | |
| `VALIDATION_NETWORK_ISOLATED=1` requires non-interactive permission for the script's narrowly scoped root | |
| `systemd-run` command. Without it, the functional gate still runs but correctly records `network_isolated=false`. | |
| `AMD_SMI_GPU` is the physical AMD SMI index used only for the post-run process check. | |
| Transformers reports `model.vision_model.embeddings.position_ids` as newly initialized. That object is a non-persistent | |
| derived position-index buffer, not a learned checkpoint parameter; the original safetensors file is fully hashed before | |
| every load. | |
| ## Limits | |
| - Only `gfx1201` has passed this exact gate. `gfx1200` is accepted by the architecture guard but reported as not hardware | |
| verified. | |
| - The synthetic fixture demonstrates runtime compatibility, deterministic decoding, basic structure recovery, and the | |
| PDF path. It does not establish real-document accuracy. | |
| - Generative OCR can omit or hallucinate text. Consequential output must be checked against the source. | |