Sumtablets_Merged / README.md
TRACCERR's picture
Update README.md
abd0d0a verified
metadata
license: cc-by-4.0
task_categories:
  - image-to-text
  - text-generation
  - visual-question-answering
language:
  - sux
tags:
  - cuneiform
  - sumerian
  - assyriology
  - transliteration
  - multimodal
  - vlm
  - ancient-languages
  - unsloth
  - qwen3-vl
size_categories:
  - 100K<n<1M
dataset_info:
  features:
    - name: id
      dtype: string
    - name: period
      dtype: string
    - name: genre
      dtype: string
    - name: image_type
      dtype: string
    - name: data_type
      dtype: string
    - name: conversations
      dtype: string
    - name: image
      dtype: image
  splits:
    - name: train
      num_examples: 179799
    - name: validation
      num_examples: 10070
    - name: test
      num_examples: 10095

SumTablets Merged Multimodal Dataset

A merged, deduplicated, quality-filtered training corpus combining cuneiform tablet text records with tablet photography and lineart, structured for vision-language model (VLM) fine-tuning.

Target model: Qwen3-VL-8B-Instruct via Unsloth Studio
Combined license: CC-BY-4.0 (most restrictive of the two source licenses applies)


Quick Start

Load the dataset

from datasets import load_dataset

ds = load_dataset("TRACCERR/Sumtablets_Merged")

print(ds)
# DatasetDict({
#     train:      Dataset({features: [...], num_rows: 179799}),
#     validation: Dataset({features: [...], num_rows: 10070}),
#     test:       Dataset({features: [...], num_rows: 10095})
# })

Filter by training task type

The data_type column lets you select a specific training modality:

# Multimodal only — image + glyph names -> transliteration (48,903 train rows)
multimodal = ds["train"].filter(lambda x: x["data_type"] == "multimodal")

# Text-only — glyph names -> transliteration (82,450 train rows)
text_only = ds["train"].filter(lambda x: x["data_type"] == "text_only")

# Vision-only — image alone -> transliteration (48,446 train rows)
vision_only = ds["train"].filter(lambda x: x["data_type"] == "vision_only")

Parse a conversation

The conversations column is a JSON string. Parse it before use:

import json

sample = ds["train"][0]

turns = json.loads(sample["conversations"])
# [
#   {"role": "system",    "content": "You are an expert Assyriologist...", "has_image": False},
#   {"role": "user",      "content": "Sign sequence:\nDIŠ LU2 ...",        "has_image": True},
#   {"role": "assistant", "content": "1(disz) lu2 ...",                     "has_image": False}
# ]

# The "has_image" field marks which turn the image is injected into.
# For text-only samples, all turns have has_image=False and sample["image"] is None.

Handle null images

Text-only samples (data_type == "text_only") have image=None. Always guard against this in training code:

sample = ds["train"][0]

if sample["image"] is not None:
    img = sample["image"]          # PIL Image, ready to use
else:
    img = None                     # text-only sample — no image available

Inspect a sample end-to-end

import json

sample = ds["train"].filter(lambda x: x["data_type"] == "multimodal")[0]

print("Tablet ID:    ", sample["id"])
print("Period:       ", sample["period"])
print("Genre:        ", sample["genre"])
print("Image type:   ", sample["image_type"])
print("Image size:   ", sample["image"].size)      # e.g. (800, 600)

turns = json.loads(sample["conversations"])
for turn in turns:
    tag = "[+img]" if turn["has_image"] else ""
    print(f"[{turn['role']}]{tag}: {turn['content'][:80]}...")

Contents

File Rows
train.parquet 179,799
validation.parquet 10,070
test.parquet 10,095
Total 199,964

Source Datasets

Dataset A — SumTablets (Text)

  • Source: colesimmons/SumTablets
  • License: CC-BY-4.0
  • Authors: Cole Simmons, Richard Diehl Martinez, Prof. Dan Jurafsky (Stanford NLP)
  • Presented at: ML4AL Workshop, ACL 2024
Split Rows
Train 82,452
Validation 4,577
Test 4,577
Total 91,606

Schema:

Column Type Description
id string (7 chars) CDLI/ePSD2 tablet identifier. P-numbers (e.g. P119622) are physical tablets in the CDLI catalogue. Q-numbers are composite texts.
period string (11 classes) Historical period of the tablet
genre string (9 classes) Text category
transliteration string Latin-script rendering of the cuneiform signs, following standard Assyriological conventions
glyph_names string Space-separated sequence of cuneiform sign names in ASCII (e.g. DIŠ LU2 ŠE)
glyphs string Unicode cuneiform characters corresponding to the sign sequence

Upstream data provenance: Transliterations were sourced from the Electronic Pennsylvania Sumerian Dictionary (ePSD2), which aggregates data from the Cuneiform Digital Library Initiative (CDLI), the Open Richly Annotated Cuneiform Corpus (Oracc), and the Electronic Text Corpus of Sumerian Literature (ETCSL). These projects represent approximately thirty years of manual digitisation by Assyriologists worldwide.


Dataset B — SumTablets Photos (Images)

Split Photo images Lineart images Combined (pre-dedup)
Train 38,430 33,101 71,531
Validation 2,147 1,895 4,042
Test 2,165 1,895 4,060
Total 42,742 36,891 79,633

Schema:

Column Type Description
id string (7 chars) Same CDLI/ePSD2 tablet identifier as Dataset A
image image PIL image of the physical tablet
image_type string "photo" (photographic image) or "lineart" (traced line drawing)

Image types explained:

  • Photo: Photographic image of the physical clay tablet. Includes lighting variation, surface damage, colour, and photographic noise.
  • Lineart: Traced line drawing of the tablet's cuneiform impressions. Removes photographic noise; sign boundaries are cleaner and more consistent. Preferred for sign identification tasks.

Merge Methodology

Join Key

The two datasets were joined exclusively on the id field. Both datasets share the CDLI/ePSD2 tablet ID as a primary key. No other fields were used for matching.

Deduplication

Dataset B contains both photo and lineart images for many tablets. Before joining, duplicate entries were resolved:

  • Priority: lineart over photo. When a tablet has both image types, only the lineart entry is retained.
  • Rationale: Lineart provides cleaner sign boundaries, less photographic noise, and a more consistent visual signal for training the vision encoder to identify cuneiform signs.
  • After deduplication: 48,905 unique tablet IDs in train (down from 71,531 combined).

Join Type and Unmatched Rows

An inner join was performed to produce the matched (multimodal) corpus — rows where both a text record and an image exist for the same tablet ID.

Dataset A contains more tablets than Dataset B. Tablets in Dataset A with no corresponding image were retained rather than discarded, and used to generate text-only training samples. These represent real tablets with verified transliterations.

Split Matched (has image) Text-only (no image)
Train 48,903 33,547
Validation 2,760 1,817
Test 2,767 1,810

Quality Filter

Applied to matched rows only. A row was removed if any of the following were true:

  1. transliteration was empty or whitespace-only
  2. glyph_names was empty or whitespace-only
  3. image was null after join
  4. id was not exactly 7 characters
  5. transliteration contained only structural markers (e.g. <SURFACE>) with no actual sign content

Rows dropped: 2 (train only). Text-only rows were exempt from this filter.

Conversation Construction

Each row was transformed into the Unsloth/Qwen3-VL conversation format. Three training sample types were generated:

Type 1 — Multimodal (data_type: "multimodal")

Generated for every matched row (image present).

  • Input: tablet image + cuneiform sign name sequence
  • Output: transliteration
  • Purpose: Primary VLM training signal. Teaches the model to combine visual tablet content with sign sequence context to produce an accurate transliteration.

Type 2 — Text-only (data_type: "text_only")

Generated for every row (matched and unmatched).

  • Input: cuneiform sign name sequence only (no image)
  • Output: transliteration
  • Purpose: Reinforces the text pathway. Prevents the model from becoming over-reliant on visual input. Also doubles the training density for all text records regardless of image availability.

Type 3 — Vision-only (data_type: "vision_only")

Generated for matched rows where len(transliteration) > 50 characters.

  • Input: tablet image only (no sign name hints)
  • Output: transliteration
  • Purpose: Forces the vision encoder to extract sign information directly from the image without textual scaffolding. The 50-character threshold limits this harder task to tablets with enough content to constitute a meaningful training signal.

Shuffle

The training corpus was shuffled using random.seed(42) before saving. Without shuffling, sequence packing during training would group tablets from the same historical period into the same batches, producing period-biased gradient updates. The shuffle ensures mixed-period, mixed-genre, mixed-modality batches throughout training.

Validation and test splits were not shuffled (order is irrelevant for evaluation, and consistency aids debugging).


Dataset Statistics

Sample Counts by Type

Split Multimodal Text-only Vision-only Total
Train 48,903 (27.2%) 82,450 (45.9%) 48,446 (26.9%) 179,799
Validation 2,760 (27.4%) 4,577 (45.5%) 2,733 (27.1%) 10,070
Test 2,767 (27.4%) 4,577 (45.3%) 2,751 (27.3%) 10,095
Total 54,430 91,604 53,930 199,964

Image Type Distribution (Multimodal samples only)

Split Lineart Photo
Train 31,851 (65.1%) 17,052 (34.9%)
Validation 1,822 (66.0%) 938 (34.0%)
Test ~66% ~34%

Period Distribution (Train, all sample types)

Period Samples %
Ur III 153,922 85.6%
Old Akkadian 11,474 6.4%
Early Dynastic IIIb 8,321 4.6%
Old Babylonian 2,523 1.4%
Early Dynastic IIIa 2,004 1.1%
Lagash II ~1,000 <1%
Early Dynastic I-II ~150 <1%
Unknown ~150 <1%
Neo-Assyrian ~50 <1%
Neo-Babylonian ~30 <1%
Middle Babylonian ~20 <1%

Note for historians: The strong Ur III dominance (~85%) reflects the composition of the underlying ePSD2 corpus, which itself reflects the surviving archaeological record — the Ur III period (ca. 2112–2004 BCE) produced an exceptionally large volume of administrative clay tablets, many of which have been excavated and digitised. This dataset is therefore best suited for training on Ur III administrative cuneiform. Performance on minority periods (Neo-Assyrian, Neo-Babylonian, Middle Babylonian) will be limited by sample count.

Genre Distribution (Train, all sample types)

Genre Samples %
Administrative 169,661 94.4%
Royal Inscription 4,117 2.3%
Literary 2,250 1.3%
Letter 1,746 1.0%
Legal 1,430 0.8%
Unknown 373 0.2%
Lexical 104 <0.1%
Liturgy 94 <0.1%
Math/Science 24 <0.1%

Schema (Output Parquet Files)

Column Type Description
id string CDLI/ePSD2 tablet identifier (7 chars)
period string Historical period (from Dataset A)
genre string Text genre (from Dataset A)
image_type string "photo", "lineart", or null for text-only samples
data_type string "multimodal", "text_only", or "vision_only"
conversations string JSON-serialised conversation in Unsloth/Qwen3-VL format (see below)
image image Tablet image (PIL-compatible), or null for text-only samples

Important: The image column is null for all text_only samples (82,450 train rows — 45.9% of the training set). Any training loop, collator, or data loader must handle None images explicitly. Passing a null image to a vision encoder will raise an error.

Conversation Format

Conversations are stored as JSON strings. Each is a list of turn objects:

[
  {"role": "system",    "content": "You are an expert Assyriologist...", "has_image": false},
  {"role": "user",      "content": "Sign sequence:\nDIŠ LU2 ŠE\n\nProvide the transliteration.", "has_image": true},
  {"role": "assistant", "content": "1(disz) lu2 sze",                                             "has_image": false}
]
Field Values Description
role "system", "user", "assistant" Conversation turn role
content string Turn text content
has_image true / false Whether the tablet image is injected into this turn. Always false for text-only samples.

By data_type:

data_type User turn content has_image on user turn image column
multimodal image + sign sequence true PIL image
text_only sign sequence only false null
vision_only image only true PIL image

Important Preservation Notes for Historians

The following tokens appear in transliterations and are preserved verbatim in this dataset. They must not be filtered, replaced, or treated as errors:

Token Meaning
<unk> Damaged, worn, or illegible sign — reading is uncertain or impossible
<SURFACE> Structural marker indicating a new surface of the tablet (obverse, reverse, edge)
<COLUMN> Structural marker indicating a new column of text
<BLANK_SPACE> Intentional blank space in the original inscription
<RULING> Horizontal ruling line drawn by the scribe to separate sections
Subscript numerals Sign index disambiguators (e.g. du₃, du₁₁) — part of standard transliteration conventions

These markers encode structural and palaeographic information about the physical tablet and are part of the training signal, not noise.


Benefits for VLM Training

1. Multimodal integration The source datasets are separate and cannot individually train a VLM. This dataset is the first merged, conversation-formatted combination of both, enabling end-to-end training on the full transliteration task.

2. Three complementary training pathways Training on all three sample types simultaneously teaches the model to handle varying levels of input context gracefully — full multimodal input, text-only input, and vision-only input — rather than becoming brittle to any single modality.

3. Conversation format pre-applied Samples are already formatted in Unsloth/Qwen3-VL conversation format. No preprocessing is required at training time.

4. Deduplication by image quality By preferring lineart over photo where both exist, the training signal for sign identification is maximised. The model still sees photographic images (34.9% of multimodal samples) to generalise across image types.

5. Shuffle prevents period bias The Ur III dominance means an unshuffled corpus would group similar administrative tablets into contiguous batches. The shuffle distributes minority periods, genres, and image types across the full training sequence.

6. Text-only augmentation doubles text coverage Every matched tablet contributes both a multimodal and a text-only sample. This prevents the model from ignoring the text pathway and ensures the glyph-name-to-transliteration mapping is reinforced independently of visual input.

7. Retained unmatched text rows The 33,547 train tablets with no corresponding image are not discarded. They represent real, verified historical records and contribute meaningful text-only training signal.


Known Limitations

  • Ur III dominance (~85%): The model will perform best on Ur III administrative tablets and may underperform on other periods. This reflects the composition of the underlying archaeological and digitisation record, not a flaw in the merge.
  • Administrative genre dominance (~94%): Performance on literary, legal, and epistolary texts will be more limited due to lower sample counts.
  • Image coverage gap: Only ~59% of text records (48,903 of 82,452 train rows) have a corresponding image. The remaining 41% are text-only.
  • Lineart sourcing: Lineart images are traced drawings, not the original tablets. They are accurate representations of sign sequences but abstract away surface texture, colour, and physical damage beyond what is encoded in the <unk> token.
  • No cross-split tablet leakage check: The train/validation/test split was inherited from the source datasets. Split integrity across the two source datasets has not been independently verified.

Reproducibility

The merge was performed by merge_pipeline.py. The pipeline is fully deterministic given the same input files and Python environment:

  • Shuffle seed: random.seed(42)
  • Deduplication strategy: sort by (id, image_type_priority), keep first
  • Quality filter: deterministic rule-based (no sampling)

Environment:

Python       3.14.3
datasets     >= 2.14.0
pandas       (current)
pyarrow      (current)
Pillow       >= 9.0.0

Citation

If you use this dataset, please cite the original source works:

SumTablets (text):

Cole Simmons, Richard Diehl Martinez, Dan Jurafsky. SumTablets: A Transliteration Dataset of Sumerian Tablets. ML4AL Workshop, ACL 2024.

Upstream data sources: CDLI, Oracc, ePSD2, ETCSL — see acknowledgements in the original SumTablets dataset card.

This merged dataset was constructed from the above sources and is released under CC-BY-4.0 (inherited from the SumTablets text dataset, the more restrictive of the two source licenses).