Nobody05 Manusagents commited on
Commit
ef91d42
·
0 Parent(s):

Duplicate from Manusagents/Sumtables-Cuneiform-Full-Fable5-Remaster

Browse files

Co-authored-by: SHS Lab <Manusagents@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.avro filter=lfs diff=lfs merge=lfs -text
4
+ *.bin filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
7
+ *.ftz filter=lfs diff=lfs merge=lfs -text
8
+ *.gz filter=lfs diff=lfs merge=lfs -text
9
+ *.h5 filter=lfs diff=lfs merge=lfs -text
10
+ *.joblib filter=lfs diff=lfs merge=lfs -text
11
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
12
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
13
+ *.mds filter=lfs diff=lfs merge=lfs -text
14
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
15
+ *.model filter=lfs diff=lfs merge=lfs -text
16
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
17
+ *.npy filter=lfs diff=lfs merge=lfs -text
18
+ *.npz filter=lfs diff=lfs merge=lfs -text
19
+ *.onnx filter=lfs diff=lfs merge=lfs -text
20
+ *.ot filter=lfs diff=lfs merge=lfs -text
21
+ *.parquet filter=lfs diff=lfs merge=lfs -text
22
+ *.pb filter=lfs diff=lfs merge=lfs -text
23
+ *.pickle filter=lfs diff=lfs merge=lfs -text
24
+ *.pkl filter=lfs diff=lfs merge=lfs -text
25
+ *.pt filter=lfs diff=lfs merge=lfs -text
26
+ *.pth filter=lfs diff=lfs merge=lfs -text
27
+ *.rar filter=lfs diff=lfs merge=lfs -text
28
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
29
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
31
+ *.tar filter=lfs diff=lfs merge=lfs -text
32
+ *.tflite filter=lfs diff=lfs merge=lfs -text
33
+ *.tgz filter=lfs diff=lfs merge=lfs -text
34
+ *.wasm filter=lfs diff=lfs merge=lfs -text
35
+ *.xz filter=lfs diff=lfs merge=lfs -text
36
+ *.zip filter=lfs diff=lfs merge=lfs -text
37
+ *.zst filter=lfs diff=lfs merge=lfs -text
38
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
39
+ # Audio files - uncompressed
40
+ *.pcm filter=lfs diff=lfs merge=lfs -text
41
+ *.sam filter=lfs diff=lfs merge=lfs -text
42
+ *.raw filter=lfs diff=lfs merge=lfs -text
43
+ # Audio files - compressed
44
+ *.aac filter=lfs diff=lfs merge=lfs -text
45
+ *.flac filter=lfs diff=lfs merge=lfs -text
46
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
47
+ *.ogg filter=lfs diff=lfs merge=lfs -text
48
+ *.wav filter=lfs diff=lfs merge=lfs -text
49
+ # Image files - uncompressed
50
+ *.bmp filter=lfs diff=lfs merge=lfs -text
51
+ *.gif filter=lfs diff=lfs merge=lfs -text
52
+ *.png filter=lfs diff=lfs merge=lfs -text
53
+ *.tiff filter=lfs diff=lfs merge=lfs -text
54
+ # Image files - compressed
55
+ *.jpg filter=lfs diff=lfs merge=lfs -text
56
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
57
+ *.webp filter=lfs diff=lfs merge=lfs -text
58
+ # Video files - compressed
59
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
60
+ *.webm filter=lfs diff=lfs merge=lfs -text
MANIFEST.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:058e4be709912da8af3c3f401fa3ec8f230816e1eb65715992dbfce35c1dd82a
3
+ size 8126843
README.md ADDED
@@ -0,0 +1,338 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: "Sumtablets-Cuneiform-Full-Fable5-Remaster (Vision-Language Training Dataset)"
3
+ license: other
4
+ license_name: mixed-see-licensing-section
5
+ language:
6
+ - sux
7
+ - akk
8
+ - en
9
+ task_categories:
10
+ - image-to-text
11
+ - translation
12
+ - visual-question-answering
13
+ tags:
14
+ - cuneiform
15
+ - sumerian
16
+ - assyriology
17
+ - ocr
18
+ - sign-detection
19
+ - qwen3-vl
20
+ - lora
21
+ size_categories:
22
+ - 100K<n<1M
23
+ ---
24
+
25
+ # Sumtablets-Cuneiform-Full-Fable5-Remaster — Cuneiform Vision-Language Training Dataset
26
+
27
+ A rebuilt, leakage-proof, multi-task training dataset for teaching
28
+ vision-language models (target: **Qwen3-VL-8B-Instruct** LoRA) to **visually
29
+ read, transliterate, and translate Sumerian cuneiform tablets** from
30
+ photographs. The mission: produce useful first-pass readings for the ~90% of
31
+ excavated tablets that have never been published or translated.
32
+
33
+ Current release: **v1.0.0** — 455,506 records (402,004 train / 24,507
34
+ validation / 24,446 test / 4,549 external grounding), built on **52,602
35
+ tablets with at least one tier-A/B image** and 87,764 aligned surface-text
36
+ pairs. Everything below is reproducible from the public pipeline in this
37
+ repository.
38
+
39
+ > **AI disclosure:** this dataset restructuring was designed, implemented,
40
+ > and executed by **Claude Fable 5** (Anthropic) operating the
41
+ > `Sumtablets_v2` pipeline under human direction, with human review at the
42
+ > quality gates (segmentation review, pollution labeling, Gold-set approval).
43
+ > Every automated decision is recorded in per-phase manifests and reports so
44
+ > third parties can validate or contest it.
45
+
46
+ ---
47
+
48
+ ## 1. What this is (and what it replaces)
49
+
50
+ The starting point was [`TRACCERR/Sumtablets_Merged`](https://huggingface.co/datasets/TRACCERR/Sumtablets_Merged)
51
+ (~200k rows, 53.7 GB, rev `67e3d17`), itself a merge of
52
+ [`colesimmons/SumTablets`](https://huggingface.co/datasets/colesimmons/SumTablets)
53
+ (glyph–transliteration pairs; [paper](https://arxiv.org/abs/2602.22200)) and
54
+ `colesimmons/SumTablets_Photos`. The original improvement plan was a single
55
+ re-split tool to fix suspected train/test tablet leakage.
56
+
57
+ That plan was reviewed and rebuilt into a 7-phase pipeline
58
+ (`Sumtables-Cuneiform-Full-Fable5-Remaster_Dataset_Plan.md`) because split hygiene alone left the
59
+ dataset's real limitations untouched:
60
+
61
+ | Planned originally | Found during rebuild | What shipped instead |
62
+ |---|---|---|
63
+ | Fix same-tablet leakage across splits | **Upstream had zero cross-split tablets** — the feared leak didn't exist | Split rebuilt anyway with stronger guarantees: perceptual-duplicate co-assignment, formula-leakage measurement, minimum-representation stratification |
64
+ | Keep "English translations" grouped | **The dataset contains no translations at all** (and its Unicode glyphs are dictionary-derived, not observed) | A translation layer was built from external sources (Phase 3) |
65
+ | Exact-hash image dedup | Exact hashing misses recompressed/cropped duplicates; naive pHash over-merges | pHash + dHash confirmation; oversized similarity components forced to train |
66
+ | Use images as-is | Mean embedded photo is ~388×731 px; many CDLI images are multi-view composites misaligned with full-tablet text | Full-res re-fetch, composite segmentation, per-surface text alignment, readability tiers |
67
+ | — | ~1.8% of "lineart" images are **scanned publication text pages** (Latin print), found by human review | Calibrated document-scan detector; flagged images excluded from vision tasks |
68
+
69
+ ## 2. Pipeline phases — planned vs. delivered
70
+
71
+ ### Phase 0 — Audit & leakage-proof re-split (`clean_sumtablets.py`) ✅
72
+ Deterministic tablet-grouped 90/5/5 re-split (seed 42) of all 199,964 rows /
73
+ 89,485 canonical `P######` tablets, stratified by period × genre × modality
74
+ with minimum eval representation per stratum.
75
+
76
+ **Results (full corpus, all hard assertions PASS):**
77
+ - train 178,116 / validation 9,864 / test 9,865 / quarantine 2,119 rows;
78
+ tablets 80,567 / 4,459 / 4,459 = 90.03 / 4.98 / 4.98%.
79
+ - 53,926 exact-duplicate image groups (4 spanning different tablet IDs —
80
+ flagged for review); 922,737 pHash near-duplicate pairs → 12,481 tablets
81
+ merged into shared "leak groups" so perceptual twins can never straddle
82
+ splits. dHash confirmation rejects spurious pHash links (hand-drawn lineart
83
+ otherwise over-merges).
84
+ - Two giant Ur III similarity components (8,085 and 4,037 tablets) exist;
85
+ the allocator forces any group larger than the eval quota into train
86
+ (regression-tested) — largest group in val/test is 2 tablets.
87
+ - **Formula leakage measured, not hidden:** 156 near-verbatim text groups
88
+ span tablets; 12 validation and 25 test tablets have a train twin. Tagged
89
+ in `formula_leakage.csv`; the eval harness reports metrics with and
90
+ without them.
91
+ - Quarantine = 2,081 ORACC `Q######` composite-text IDs + 38 `X######` —
92
+ real identifiers of composite editions, not physical tablets; excluded
93
+ from splits by design (re-admission with leak screening is a documented
94
+ future option).
95
+ - Audit columns on every row: `canonical_tablet_id`, `original_tablet_id`,
96
+ `source_split`, `assigned_split`, `modality`, `duplicate_group`,
97
+ `formula_dup_group`, `validation_flags`, `provenance`.
98
+
99
+ ### Phase 1 — Image elevation (`phase1_images.py`) ✅ complete
100
+ - **CDLI full-resolution re-fetch, complete census**: all 178,970
101
+ tablet×kind URL pairs resolved — **71,852 images downloaded (37,810
102
+ photos + 34,042 lineart, 116 GB)**, 106,999 definitive "no image hosted"
103
+ 404s recorded per tablet, 119 corrupt-at-source files logged. Resumable
104
+ manifest survived a disk-full crash and an external process kill with
105
+ zero loss (supervised auto-restart loop; manifest surgery for the ~380
106
+ transient errors — note `--retry-errors` re-attempts 404s too, so
107
+ targeted retries edit the manifest instead).
108
+ *Finding:* re-fetching does **not** upscale existing images (where CDLI
109
+ hosts a file the dataset already embedded it at identical resolution);
110
+ its value is **coverage** — thousands of images for tablets that had
111
+ none of that kind, converting text-only tablets into vision samples.
112
+ - **Composite segmentation** by projection profiling → per-surface panel
113
+ bounding boxes (manifests only; crops materialize at packaging).
114
+ *Adjustment after human review (199/200 correct, gate G1 passed):*
115
+ stacked CDLI layouts needed a relaxed-gap re-split pass, and the dominant
116
+ panel may never be labeled an "edge" (regression test `P201395`).
117
+ - **Surface–text alignment**: transliterations split at `<SURFACE>` markers
118
+ and paired with panels when counts match → **87,764 aligned surface pairs**
119
+ full-corpus (37,410 count-matched + 6,631 trivial images; 34.9% of the
120
+ 126,282 analyzed images fully align, the rest keep whole-image supervision).
121
+ - **Readability tiers** A/B/C from blur, contrast, and estimated sign height;
122
+ tier C never becomes an OCR target. Full-corpus result: **52,602 tablets
123
+ hold at least one tier-A/B image** (47,427 train / 2,598 val / 2,577 test);
124
+ tier A dominates the fetched images (45,286 of 64,157 train fetches).
125
+ - **Document-scan detector** — *entirely human-review-driven addition*: users
126
+ of the G1 review page found publication text pages mislabeled as lineart.
127
+ Detector calibrated on 13 human-labeled images (4 pages / 9 genuine hand
128
+ copies); naive heuristics false-positived at 25–45% (curved hand-drawn
129
+ outlines defeat vertical-run tests; stacked views shrink per-view runs).
130
+ Final rule (band geometry + ink density + dilated vertical-run) flags
131
+ **1,164 images full-corpus (~2.1% of lineart)**, catching all human-found
132
+ pages, clearing all 9 labeled copies; spot-check precision 3/4
133
+ (over-flagging is accepted: a flag only removes an image from vision
134
+ training, never deletes data).
135
+
136
+ ![Sample-1](https://cdn-uploads.huggingface.co/production/uploads/67ef1e6e48c8e7f1061c6c95/zkpU3W6QkdoUTGOxdr4iB.jpeg)
137
+
138
+ ### Phase 2 — Task architecture (`phase2_tasks.py` + `mixer_config.yaml`) ✅
139
+ Task-tagged records with 25 deterministic prompt paraphrases per task,
140
+ canonical output formats validated on every record, per-tablet caps, and a
141
+ train-only mixture spec.
142
+
143
+ *Adjustment (bug found in v1 mixer):* scarce tasks throttled the whole
144
+ mixture (T8's 5.5k records nearly cut train from ~105k to 12.7k). Fixed
145
+ semantics: the most-available task anchors totals, scarce tasks underfill
146
+ with reported deviations, and **exact mixture shares are enforced at training
147
+ time via sampling weights** using the shipped `mixer_config.yaml`.
148
+
149
+ v1.0.0 totals: 402,004 train records (259,457 vision / 142,547 text) plus
150
+ 4,549 external T5 grounding records; 24,507 validation and 24,446 test
151
+ records (~15.4k vision each). Per-task counts live in the release's
152
+ `build_report.json` and `MANIFEST.parquet`. A curated 4,850-record
153
+ **starter pack** (`starter_train.parquet`, vision-first mixture, tier-A/B
154
+ only for OCR, refusal-capped abstention) ships for quick fine-tune runs.
155
+
156
+ ### Phase 3 — Translation layer (`phase3_translations.py`) ✅
157
+ - **CDLI ATF harvest**: 5,357 tablets with line-aligned `#tr.en` translations
158
+ (2,094 train / 124 val / 121 test in-corpus; 3,018 external tablets
159
+ admitted to train only after screening their text against every eval
160
+ tablet's normalized transliteration).
161
+ - **Templated Ur III renderer**: precision-first CFG rules (only tablets with
162
+ ≥80% of lines fully parsed) → 409 tablets, `source=templated`, train-only,
163
+ 7% of T8 (cap: 40%). *Adjustment:* rules had to be rewritten in the
164
+ corpus's Unicode orthography (`š`, subscript numerals) — the CDLI ASCII
165
+ convention (`sz`, plain digits) matches zero corpus lines.
166
+ - **Gold-997**: stratified test-pool benchmark selection (856 with images,
167
+ 43 with harvested translations), human-approved selection, per-item
168
+ `verification_status` tracking (verification pending).
169
+ - Dead end documented: ORACC `etcsri` JSON exposes word glosses only —
170
+ sentence translations are HTML-only (future scrape).
171
+
172
+ ### Phase 4 — External sign grounding (`phase4_grounding.py`) ✅
173
+ eBL cuneiform-OCR `coco-recognition` set ([Zenodo 10693601](https://zenodo.org/records/10693601)):
174
+ 654 tablet photographs, 46k+ sign boxes, 120 sign classes → **4,549
175
+ T5 records** (dense detection, locate-sign, read-region; 0–1000 normalized
176
+ boxes; valid-JSON targets). This file is 100% vision by construction —
177
+ grounding has no text-only variant — and stays a separate parquet so the
178
+ unlicensed images can be excluded from redistribution by omitting one file. Leak-guarded against eval P-numbers (0 overlaps
179
+ found). Largely Akkadian — intended cross-script sign-shape transfer, tagged
180
+ `origin=ebl`. **License not stated upstream → `train_local_only`: these
181
+ images must not be redistributed with the dataset.**
182
+
183
+ ### Phase 5 — Packaging (`phase5_package.py`) ✅
184
+ `releases/Sumtables-Cuneiform-Full-Fable5-Remaster-v1.0.0`: **455,506 records** across
185
+ `train.parquet` (402,004; 259,457 vision, images at a 2048px training
186
+ budget — full-resolution originals preserved in `Phase1/fetched`),
187
+ `validation.parquet` (24,507), `test.parquet` (24,446), and the train-local
188
+ `t5_train.parquet` (4,549). Ships `MANIFEST.parquet` (per-sample provenance
189
+ for re-weighting without touching image bytes), phase reports, mixer
190
+ config, dataset card — with **every conversation validated against the
191
+ actual Qwen3-VL chat template** (zero flags) and eval↔train tablet
192
+ disjointness re-verified from the written files at package time.
193
+ The earlier v0.9.0 pre-release (149,489 records, text-only train) is
194
+ superseded but retained for provenance.
195
+
196
+ ### Phase 6 — Evaluation harness (`phase6_eval.py`) ✅
197
+ Resumable predictions (mock + any OpenAI-compatible server), CER, sign-level
198
+ F1, chrF, metadata accuracy, abstention precision/recall, insertion-rate
199
+ honesty proxy; strata by task × period × genre × tier; **dual reporting with
200
+ and without formula-leaked tablets**. Validated end-to-end with a floor
201
+ baseline (all metrics at expected floor over 16,463 real test items).
202
+
203
+ ## 3. Measured baseline (zero-shot Qwen3-VL-8B-Instruct)
204
+
205
+ 2,000-item random sample, locally served model, pre-v1.0 test parquet
206
+ (definitive run re-executes on v1.0):
207
+
208
+ | Task | Zero-shot result |
209
+ |---|---|
210
+ | T1/T2/T3 image reading | **Refuses 93–99% of images**; attempted readings ≈ 0 sign-F1 |
211
+ | T10 abstention | recall 0.97 / precision **0.44** — the base model *over*-refuses |
212
+ | T11 metadata | genre 94.6% (majority-class artifact); **period 0.9%** (never predicts Ur III) |
213
+ | T6 signs→translit | CER 0.83, sign-F1 0.042 |
214
+ | T7 translit→signs | CER 0.86, sign-F1 0.004 |
215
+ | T8 translation | chrF 0.149 |
216
+
217
+ Interpretation: the pretrained model can neither read cuneiform images nor
218
+ map signs to readings — and it already knows to refuse. Post-training gains
219
+ on sign-F1/CER are therefore attributable to this dataset, and the training
220
+ risk to manage is *residual over-refusal*, not hallucination alone.
221
+
222
+ ## 4. Training path (first fine-tune: Qwen3-VL-4B)
223
+
224
+ Two equivalent routes onto the same Unsloth engine — both consume the
225
+ curated **starter pack** (4,850 records: 1,500 surface OCR / 1,000 lineart /
226
+ 500 full-tablet / 400 sign grounding / 250 photo-lineart pairs / 250
227
+ metadata / 100 refusal-capped abstention / 850 text tasks; tier-A/B only
228
+ for OCR; one record per tablet per task):
229
+
230
+ - **Unsloth Studio (GUI):** load the exported dataset directory
231
+ `unsloth_starter/` (`export_unsloth.py` converts our parquet into the
232
+ documented Studio format — a `messages` column with typed content parts
233
+ and an `images` column; 4,850 samples, 4,000 with images). Studio's
234
+ dataset preview should auto-map both columns.
235
+ - **Script (`train_lora.py`):** the same Unsloth `FastVisionModel` workflow
236
+ headless, with the capability guardrails executed automatically —
237
+ vision-native loader asserted at load, adapter-only artifact, stray-config
238
+ removal, and `verify_model_capabilities.py` run on the output (non-zero
239
+ exit on any regression).
240
+
241
+ Either way, **acceptance is gated** (see `TRAINING_GUARDRAILS.md`, written
242
+ after a prior non-pipeline fine-tune silently lost vision and clamped
243
+ context 256k→64k): the served result must pass the live vision probe and
244
+ the ~70k-token needle probe, then `phase6_eval.py` on validation against
245
+ the zero-shot reference (sign-F1 ≈ 0, 93–99% refusal). The 4B run
246
+ validates the data recipe cheaply; the identical recipe scales to
247
+ Qwen3-VL-8B-Instruct (`--model Qwen/Qwen3-VL-8B-Instruct`).
248
+
249
+ ## 5. Engineering log (what broke and what it taught)
250
+
251
+ | Incident / discovery | Consequence baked into the pipeline |
252
+ |---|---|
253
+ | Upstream had zero cross-split tablets — but 922,737 pHash near-dup pairs and 156 cross-tablet formula groups | Leak groups + formula tagging replaced the original "fix the split" premise |
254
+ | Naive pHash merging false-positived 25–45% on hand-drawn lineart | dHash confirmation; oversized similarity groups forced to train |
255
+ | Human review found publication text pages inside "lineart" (~2.1%) | Calibrated document-scan detector; review page now shows flag status |
256
+ | CDLI re-fetch upscaled nothing (uplift = 1.0) | Reframed as coverage acquisition; 404s recorded as a permanent census |
257
+ | Scarce T8 throttled the mixer to 12% of available data | Backbone-anchored mixer; exact shares enforced at training time via sampling weights |
258
+ | Template renderer matched zero lines | Corpus uses Unicode orthography (š, subscripts), not CDLI ASCII — rules rewritten, 409 tablets rendered at ≥80% line coverage |
259
+ | Disk-full crash + external process kill mid-fetch | Supervised auto-restart, append-safe manifest with surgery tooling, everything resumable |
260
+ | Zero-shot model *over*-refuses (precision 0.44) | Starter pack caps refusal examples at 40% of the abstention slice |
261
+ | Prior fine-tune lost vision & context silently | `verify_model_capabilities.py` + guardrails doc gate every artifact |
262
+
263
+ ## 6. Dataset structure
264
+
265
+ Each record: `task`, `tablet` (canonical P-number or `ebl:` namespace),
266
+ `split`, `tier`, `conversations` (system/user/assistant JSON, image flag on
267
+ the user turn, canonical output format per task), `image`
268
+ (struct{bytes,path} or null), `provenance` (JSON: image key, bbox, prompt id,
269
+ origin, license posture).
270
+
271
+ Output conventions: transliterations preserve `<SURFACE>` / `<COLUMN>` /
272
+ `<RULING>` / `<BLANK_SPACE>`, subscript numerals, damage tokens (`<unk>`,
273
+ `...`); refusals are exactly `<ILLEGIBLE_IMAGE> …`; T11 targets are
274
+ `{"period": ..., "genre": ...}`; T5 targets are JSON with 0–1000 boxes.
275
+
276
+ ## 7. Validate it yourself
277
+
278
+ ```powershell
279
+ pip install -r requirements.txt
280
+ python -m pytest tests -q # 65 tests: split integrity, segmentation,
281
+ # grading, alignment, mixer, metrics, leak guards
282
+ ```
283
+
284
+ - **Split integrity**: re-run `clean_sumtablets.py --dry-run` and diff
285
+ `split_manifest.csv`; every hard assertion is recomputed from the written
286
+ parquet, not trusted from memory.
287
+ - **Segmentation quality**: open `Phase1/review_sample.html` — 200 seeded
288
+ images with detected boxes drawn; document-flagged cards are marked.
289
+ - **Mixture & provenance**: `MANIFEST.parquet` + `build_report.json` expose
290
+ every record's task, source, prompt id, and the mixer's target-vs-achieved
291
+ shares including underfills.
292
+ - **Metrics**: `phase6_eval.py` is deterministic given a predictions file;
293
+ floor and oracle mock modes bound every metric.
294
+ - **Capability preservation** (lessons learned from a prior training attempt
295
+ that silently lost vision and clamped context 256k→64k): every training
296
+ artifact must pass `verify_model_capabilities.py` — static checks on
297
+ architecture, `max_position_embeddings=262144`, mRoPE, vision tower
298
+ tensors, processor files, GGUF mmproj, plus live vision and ~70k-token
299
+ needle probes. Rules and acceptance checklist: `TRAINING_GUARDRAILS.md`.
300
+
301
+ ## 8. Status & roadmap
302
+
303
+ - ✅ **v1.0.0 released**: CDLI fetch complete (all 178,970 pairs resolved;
304
+ 71,852 full-res images), full-corpus Phase 1 manifests (126,282 images,
305
+ 87,764 surface pairs), train vision tasks materialized at a 2048px
306
+ training budget, floor baseline recorded on the v1.0 test split, tablet
307
+ disjointness re-verified across all release files.
308
+ - ▶ Next: first fine-tune (Qwen3-VL-4B on the starter pack via
309
+ `train_lora.py`), gated by `verify_model_capabilities.py`.
310
+ - ⏳ Gold-997 per-item expert verification.
311
+ - Future: ORACC etcsri HTML translation scrape; ETCSL; Q-composite
312
+ re-admission with leak screening; DeepScribe/MaiCuBeDa ingestion;
313
+ synthetic font renders (T12).
314
+
315
+ ## 9. Licensing
316
+
317
+ | Component | License |
318
+ |---|---|
319
+ | SumTablets text (upstream) | CC BY 4.0 |
320
+ | SumTablets photos (upstream) | Apache 2.0 |
321
+ | CDLI ATF transliterations/translations | CDLI terms — attribution (cdli.earth) |
322
+ | ORACC etcsri (consulted) | CC0 |
323
+ | eBL sign-grounding images (T5) | **Unstated — train-local only, excluded from redistribution** |
324
+ | Pipeline code (`*.py`, this repo) | MIT |
325
+
326
+ ## 10. Acknowledgements
327
+
328
+ Built on the work of the CDLI, ORACC/ePSD2, ETCSL, and eBL projects and the
329
+ SumTablets authors ([Simmons et al. 2024](https://aclanthology.org/2024.ml4al-1.20/)),
330
+ representing decades of Assyriological digitization. Dataset restructuring
331
+ executed with **Claude Fable 5** (Anthropic); human direction, review
332
+ labels, and gate approvals by the project owner.
333
+
334
+ ## 11. Why Qwen3-VL?
335
+
336
+ Because the model family is specifically positioned around stronger OCR, rare/ancient character handling, blur/tilt robustness, and long-document structure parsing. That matters for cuneiform because the problem is not only “read image text”; it is damaged visual signs, surface structure, line order, uncertain readings, and translation context.
337
+
338
+ ![Sample-2](https://cdn-uploads.huggingface.co/production/uploads/67ef1e6e48c8e7f1061c6c95/bmWKhvriK1sYcFzkLes-y.jpeg)
t5_train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8cee61643281438548f33fe66a2ea6c75ac7678e2d40db1ae76fc7341aa2b6e
3
+ size 902906923
t5_train_small.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:621d3255ee7f7666be94aa32f3e4343cca7e02979ac2ae0cf94aaa0d920525a2
3
+ size 170087136
test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c47ece7455130f59227d746111326d26ead227c39ca926dbac6b70417043790f
3
+ size 7713161387
train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:450167f4b673abf624e3c6df951b4770c0a5fce2a263bb707f322214bf436926
3
+ size 54104113583
validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6625498e8e38dc5051c339356ffbf21739b2e71409a0f32cbecbe8bf53b368c3
3
+ size 7612000803