Image-Text-to-Text
PEFT
Safetensors
qlora
vision-language
insurance
document-qc
policy-issuance
conversational
Instructions to use caiotheodoro/suture-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use caiotheodoro/suture-8b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-VL-8B-Instruct") model = PeftModel.from_pretrained(base_model, "caiotheodoro/suture-8b") - Notebooks
- Google Colab
- Kaggle
sft-dedhi PEFT: 0.959 seed-777 recall, 0.95 rec/prec, HIGH 0.969
Browse files- README.md +12 -14
- adapter_config.json +6 -6
- adapter_model.safetensors +1 -1
README.md
CHANGED
|
@@ -17,8 +17,8 @@ PEFT LoRA adapter for **policy-issuance QC**: two page images in (underwriting b
|
|
| 17 |
|
| 18 |
- **Base:** [`Qwen/Qwen3-VL-8B-Instruct`](https://huggingface.co/Qwen/Qwen3-VL-8B-Instruct) (Apache-2.0)
|
| 19 |
- **Adapter:** QLoRA r=32, α=64, dropout 0.05, 4-bit train, 384px thumbs, thinking off
|
| 20 |
-
- **Checkpoint name in this project:** `/checkpoints/sft-
|
| 21 |
-
- **Code + scorer:** [caiotheodoro/suture](https://github.com/caiotheodoro/suture)
|
| 22 |
- **Do not use this for live carrier documents.** Train and eval data are forge-rendered ACORD-style pages, not real submissions.
|
| 23 |
|
| 24 |
## Held-out result (the number)
|
|
@@ -27,21 +27,19 @@ Seed-777, n=1000, **split-line** limit/deductible render (eval re-renders from s
|
|
| 27 |
|
| 28 |
| Model | Severity-w. recall | HIGH recall | Precision | Parse |
|
| 29 |
|---|---:|---:|---:|---:|
|
| 30 |
-
| **this adapter (`sft-
|
| 31 |
-
| prior published (`sft-
|
| 32 |
| GPT-5.6 Luna zero-shot vision | 0.373 | 0.388 | 0.344 | 0.972 |
|
| 33 |
| 8B base, no adapter | 0.098 | 0.115 | 0.278 | 0.973 |
|
| 34 |
|
| 35 |
-
Contract in `CONTRACTS.md` / README is
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
Older restem 777 **0.622** used a cramped one-line `limit X / ded Y` PNG. Compare restem-on-new-render (0.634), not that row, when judging this adapter.
|
| 40 |
|
| 41 |
## Intended use
|
| 42 |
|
| 43 |
- Research / reproduction of the Suture benchmark (binder vs policy discrepancy listing).
|
| 44 |
-
- Starting point for further SFT on the same forge generator (next:
|
| 45 |
|
| 46 |
Out of scope: production underwriting, real PDFs, OCR pipelines, “beats frontier on insurance” marketing.
|
| 47 |
|
|
@@ -63,18 +61,18 @@ Two images (binder page, then policy page). Output schema is in the repo `CONTRA
|
|
| 63 |
|
| 64 |
## Training data
|
| 65 |
|
| 66 |
-
Synthetic only. Generator + oracle: `suture_forge` in the GitHub repo. Seeds used in the published chain: 7 (train/val), 11 (distill pool), 13 (numeric mix), 17 (LIMIT_HIGHER mix). **Seed 777 is eval-only and was never in train.** JSONL is gitignored on purpose; regenerate from seeds.
|
| 67 |
|
| 68 |
-
Chain: `sft-vl` → `sft-distill` → `sft-restem` → `sft-numeric` → **`sft-
|
| 69 |
|
| 70 |
This Hub repo does **not** include training JSONL or a merged 16-bit 8B.
|
| 71 |
|
| 72 |
## Limitations
|
| 73 |
|
| 74 |
-
- 8B QLoRA at 384px on synthetic pages. HIGH recall is 0.
|
| 75 |
-
-
|
| 76 |
- Luna (0.37) is a weaker *type* teacher than gold JSON; this adapter lists gold types, it does not copy Luna style.
|
| 77 |
|
| 78 |
## Carbon / hardware
|
| 79 |
|
| 80 |
-
Modal L4 24GB, 4-bit QLoRA. This adapter: continue `sft-
|
|
|
|
| 17 |
|
| 18 |
- **Base:** [`Qwen/Qwen3-VL-8B-Instruct`](https://huggingface.co/Qwen/Qwen3-VL-8B-Instruct) (Apache-2.0)
|
| 19 |
- **Adapter:** QLoRA r=32, α=64, dropout 0.05, 4-bit train, 384px thumbs, thinking off
|
| 20 |
+
- **Checkpoint name in this project:** `/checkpoints/sft-dedhi/final` (2026-08-22)
|
| 21 |
+
- **Code + scorer:** [caiotheodoro/suture](https://github.com/caiotheodoro/suture)
|
| 22 |
- **Do not use this for live carrier documents.** Train and eval data are forge-rendered ACORD-style pages, not real submissions.
|
| 23 |
|
| 24 |
## Held-out result (the number)
|
|
|
|
| 27 |
|
| 28 |
| Model | Severity-w. recall | HIGH recall | Precision | Parse |
|
| 29 |
|---|---:|---:|---:|---:|
|
| 30 |
+
| **this adapter (`sft-dedhi`)** | **0.959** | **0.969** | **0.956** | **1.0** |
|
| 31 |
+
| prior published (`sft-limithi`) | 0.839 | 0.893 | 0.870 | 1.0 |
|
| 32 |
| GPT-5.6 Luna zero-shot vision | 0.373 | 0.388 | 0.344 | 0.972 |
|
| 33 |
| 8B base, no adapter | 0.098 | 0.115 | 0.278 | 0.973 |
|
| 34 |
|
| 35 |
+
Contract in `CONTRACTS.md` / README is **>0.95 recall, >0.95 precision, 1.00 HIGH**. This release **clears 0.95 recall and 0.95 precision**. HIGH is **0.969, not 1.00**.
|
| 36 |
|
| 37 |
+
Deductible direction is no longer the hole: `DEDUCTIBLE_HIGHER` 0.957 / 0.846 (was 0.507 / 0.407 on limithi), `DEDUCTIBLE_LOWER` 0.989. Remaining HIGH misses are mostly `AI_MISSING` 0.912 and `FORM_MISSING` 0.944. Citation exact-match ≈ 1.0 is **gold-string cloning**, not a quality win. Full tables: [`docs/BENCHMARK.md`](https://github.com/caiotheodoro/suture/blob/main/docs/BENCHMARK.md).
|
|
|
|
|
|
|
| 38 |
|
| 39 |
## Intended use
|
| 40 |
|
| 41 |
- Research / reproduction of the Suture benchmark (binder vs policy discrepancy listing).
|
| 42 |
+
- Starting point for further SFT on the same forge generator (next: HIGH = 1.00).
|
| 43 |
|
| 44 |
Out of scope: production underwriting, real PDFs, OCR pipelines, “beats frontier on insurance” marketing.
|
| 45 |
|
|
|
|
| 61 |
|
| 62 |
## Training data
|
| 63 |
|
| 64 |
+
Synthetic only. Generator + oracle: `suture_forge` in the GitHub repo. Seeds used in the published chain: 7 (train/val), 11 (distill pool), 13 (numeric mix), 17 (LIMIT_HIGHER mix), 19 (DED contrastive), 23 (DED_HIGHER boost). **Seed 777 is eval-only and was never in train.** JSONL is gitignored on purpose; regenerate from seeds.
|
| 65 |
|
| 66 |
+
Chain: `sft-vl` → `sft-distill` → `sft-restem` → `sft-numeric` → `sft-limithi` → `sft-ded` → **`sft-dedhi`**. Continue-from-adapter SFT, 1 epoch per mix, Modal L4.
|
| 67 |
|
| 68 |
This Hub repo does **not** include training JSONL or a merged 16-bit 8B.
|
| 69 |
|
| 70 |
## Limitations
|
| 71 |
|
| 72 |
+
- 8B QLoRA at 384px on synthetic pages. HIGH recall is 0.969, not 1.00.
|
| 73 |
+
- `AI_MISSING` and `FORM_MISSING` are the remaining HIGH misses.
|
| 74 |
- Luna (0.37) is a weaker *type* teacher than gold JSON; this adapter lists gold types, it does not copy Luna style.
|
| 75 |
|
| 76 |
## Carbon / hardware
|
| 77 |
|
| 78 |
+
Modal L4 24GB, 4-bit QLoRA. This adapter: continue `sft-ded` → `sft-dedhi`, 1280 steps. Earlier chain steps are documented in `docs/DECISIONS.md`.
|
adapter_config.json
CHANGED
|
@@ -31,17 +31,17 @@
|
|
| 31 |
"rank_pattern": {},
|
| 32 |
"revision": null,
|
| 33 |
"target_modules": [
|
|
|
|
| 34 |
"o_proj",
|
| 35 |
-
"linear_fc2",
|
| 36 |
-
"k_proj",
|
| 37 |
"attn.proj",
|
|
|
|
|
|
|
| 38 |
"q_proj",
|
| 39 |
-
"up_proj",
|
| 40 |
"v_proj",
|
| 41 |
-
"linear_fc1",
|
| 42 |
"gate_proj",
|
| 43 |
-
"
|
| 44 |
-
"
|
|
|
|
| 45 |
],
|
| 46 |
"target_parameters": null,
|
| 47 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 31 |
"rank_pattern": {},
|
| 32 |
"revision": null,
|
| 33 |
"target_modules": [
|
| 34 |
+
"down_proj",
|
| 35 |
"o_proj",
|
|
|
|
|
|
|
| 36 |
"attn.proj",
|
| 37 |
+
"qkv",
|
| 38 |
+
"linear_fc1",
|
| 39 |
"q_proj",
|
|
|
|
| 40 |
"v_proj",
|
|
|
|
| 41 |
"gate_proj",
|
| 42 |
+
"k_proj",
|
| 43 |
+
"linear_fc2",
|
| 44 |
+
"up_proj"
|
| 45 |
],
|
| 46 |
"target_parameters": null,
|
| 47 |
"task_type": "CAUSAL_LM",
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 210083584
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4aa5d63c7726f8f213de7343f602efac036881d90fd6a01f083564cdc94fa218
|
| 3 |
size 210083584
|