Views
No views yet
MODEL_CARDS_INDEX.md
for the full list, or jump straight to
Ericu950/Stoicheia-doc_clean
(the flagship backbone) or
Ericu950/Stoicheia-restoration-test3 (or any of the ten digit-rotation checkpoints) /
-tagger-parser for a
ready-to-use downstream model (or -meter for
macronization and scansion). All model repos are public: weights ship as model.safetensors with a config.json,
loadable directly through AutoModel.from_pretrained(..., trust_remote_code=True).Stoicheia_demo.ipynb restores a lacuna of
unknown width, picks the checkpoint that has provably never read your document, tags and parses a
verse of Homer, macronizes and scans a line, and scores the macronizer on the benchmark.1import torch
2from transformers import AutoModel
3from huggingface_hub import hf_hub_download
4
5REPO = "Ericu950/Stoicheia-doc_clean"
6model = AutoModel.from_pretrained(REPO, trust_remote_code=True).eval()
7
8# `trust_remote_code` loads the model classes; the processor is a separate helper, so
9# fetch it into the working directory before importing it.
10hf_hub_download(repo_id=REPO, filename="processing_char_bert.py", local_dir=".")
11from processing_char_bert import CharBertProcessor
12
13processor = CharBertProcessor()
14
15# a lacuna of UNCERTAIN width, in text that's ALSO fully bare scriptio continua (no
16# spaces, no accents) -- the realistic case for damaged, unaccented primary sources.
17# Write "[N±M]" for a best-guess width N and a plausible range N-M..N+M; every
18# candidate width is scored by the model's own confidence, recovering both the
19# width and the text while jointly restoring accents/word-boundaries throughout.
20text = "εναρχηηνο[5±3]καιολογοςηνπροστονθεον"
21best_text, best_width, candidates = processor.restore_elastic(model, text, mask_dia_boundary=True)
22print(best_text) # -> ἐν ἀρχῇ ἦν ὁ λόγος, καὶ ὁ λόγος ἦν πρὸς τὸν θεόν.1print(processor.restore_respaced(model, "ἔδοξεν τηβου-- καὶ τῷ δήμῳ"))
2# -> ἔδοξεν τῇ βουλῇ καὶ τῷ δήμῳmodel/, data/, train/, eval/ — the pretraining architecture (CharBertEncoder,
a five-plane character-level masked-diffusion Transformer) and training loop.insc/ — restoration fine-tuning (inscriptions + papyri) and strict-protocol
evaluation (same-harness comparison against DeepMind's Ithaca).tagger/, parser/ — morphosyntactic tagging (factored XPOS, edit-script lemma,
UPOS) and biaffine dependency parsing, plus a joint multi-task model and a
pluggable HuggingFace-encoder bridge for cross-encoder ablations.meter/ — macronization (vowel length) and metrical scansion, including the
Norma benchmark protocol and rule-based silver-data mining pipeline.tests/ — CPU-only pytest suite.scripts/fetch_dbbe.py — refetches the Database of Byzantine Book Epigrams, which the
released corpus omits: DBBE is CC BY-NC-SA, whose non-commercial clause a CC BY-SA
compilation cannot carry. Run it to reconstruct the pretraining corpus exactly (5,476
records, ~0.2M words, 0.1% of the total); what you build then inherits DBBE's terms.REPRODUCING.md for the full environment setup and end-to-end
reproduction walkthrough.1@misc{stoicheia2026,
2 title = {Stoicheia: Character-Level Masked Diffusion for Ancient Greek Textual
3 Restoration, Parsing, and Metrical Scansion},
4 author = {Cullhed, Eric and Th\"orn Cleland, Albin},
5 year = {2026},
6 eprint = {2608.XXXXX},
7 archivePrefix = {arXiv},
8 primaryClass = {cs.CL}
9}LICENSE). External baselines (DeepMind's Ithaca and predictingthepast releases) are
downloaded separately from their own repositories and retain their own licenses — see
NOTICE and REPRODUCING.md.