File size: 3,838 Bytes
f340984
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# 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.