README: OPSD ckpts are fp32 (bf16 erases the tiny delta)
Browse files
README.md
CHANGED
|
@@ -46,11 +46,21 @@ else identical, `rule+GT` becomes the **best** condition (**0.7340**, +0.067 fro
|
|
| 46 |
value is bounded by rule quality, not by the "written-rule channel." Rule banks are in the IRPO repo under
|
| 47 |
`deductive_stage/data/` (`mvtec_rulebank_golden_opus.json`, `_codex`, `_base`).
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
## Usage
|
| 50 |
```python
|
|
|
|
| 51 |
from transformers import AutoModelForImageTextToText, AutoProcessor
|
| 52 |
-
|
|
|
|
|
|
|
| 53 |
p = AutoProcessor.from_pretrained("Qwen/Qwen3-VL-8B-Instruct")
|
| 54 |
```
|
| 55 |
-
|
| 56 |
-
`inductive_stage/eval_variants/direct_eval.py`).
|
|
|
|
| 46 |
value is bounded by rule quality, not by the "written-rule channel." Rule banks are in the IRPO repo under
|
| 47 |
`deductive_stage/data/` (`mvtec_rulebank_golden_opus.json`, `_codex`, `_base`).
|
| 48 |
|
| 49 |
+
## ⚠️ Precision — OPSD checkpoints are fp32 on purpose
|
| 50 |
+
The three `opsd-*` checkpoints are **fp32** (33 GB). This is required to reproduce the reported macro numbers.
|
| 51 |
+
The OPSD students were full-fine-tuned in fp32 at lr 1e-6, so the learned delta is **tiny**: ‖dW‖/‖W‖ ≈ **4e-4**,
|
| 52 |
+
an order of magnitude *below* bf16's ~3.9e-3 relative resolution. Exporting them to bf16 **erases ~36% of that
|
| 53 |
+
delta and reverts ~87% of the changed weights toward base**, which measurably lowers eval. So keep them fp32.
|
| 54 |
+
`sft/` and `rft/` are **bf16** — SFT's delta is large enough to survive (RFT is an untrained no-op anyway).
|
| 55 |
+
|
| 56 |
## Usage
|
| 57 |
```python
|
| 58 |
+
import torch
|
| 59 |
from transformers import AutoModelForImageTextToText, AutoProcessor
|
| 60 |
+
# OPSD -> load fp32 to reproduce the numbers
|
| 61 |
+
m = AutoModelForImageTextToText.from_pretrained("andyqmongo/IRPO-mvtec-checkpoints",
|
| 62 |
+
subfolder="opsd-golden-rule-gt", dtype=torch.float32)
|
| 63 |
p = AutoProcessor.from_pretrained("Qwen/Qwen3-VL-8B-Instruct")
|
| 64 |
```
|
| 65 |
+
Base model + eval protocol: see the IRPO repo (`deductive_stage/opsd_train.py` / `opsd_axis_eval.py`,
|
| 66 |
+
`inductive_stage/eval_variants/direct_eval.py`). OPSD eval is **names-only** (no rule at inference).
|