Instructions to use kesha-humonen/runic-reader-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use kesha-humonen/runic-reader-2 with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Runic Reader 2: data, code and adapters
Release accompanying the paper From Photograph to Translation: An End-to-End Pipeline for Runic
Inscriptions with Open Vision-Language Models (IEEE Access, under review). The pipeline locates the
inscription in a photograph with the base model Qwen/Qwen3.5-4B (revision 851bf6e), reads it into a
Rundata-style transliteration with a LoRA recognizer, and translates the transliteration into English or
Swedish with a LoRA translator.
Contents
| Path | Content |
|---|---|
adapters/ocr4b_crop |
recognizer: LoRA on Qwen3.5-4B, trained on crops of real photographs and procedural synthetic images |
adapters/mt4b |
translator: LoRA on Qwen3.5-4B, trained on the parallel corpus |
adapters/mt4b_noise |
translator trained with recognition-like character noise on the input |
splits/pairs.jsonl |
all 12,496 transliteration–translation pairs with source, record identifier, signum, language, inscription cluster and split (train 10,640, validation 592, test 1,264) |
splits/images.jsonl |
all 4,949 real images with record, split, cluster, source URL, visual domain and the localization box (0–1000 coordinates) |
preds/ |
test-set predictions of the recognizers, translators, end-to-end pipeline and retrieval baseline |
code/ |
corpus construction, normalization, splitting, synthetic image generation, localization, training, inference and evaluation; code/jobs/ holds the exact training and evaluation commands |
gamla_runor/fetch_gamla_runor.py |
retrieves the Gamla runor records from the public website and checks them against the hashes |
Splits are inscription-disjoint: pairs and images of one inscription cluster are always in the same split. Evaluation in the paper uses only validation and test pairs that are not linked to any training pair; the released splits already exclude the others.
Sources and restrictions
Rundata: the rows with source
rundatainsplits/pairs.jsonlare a modified database based on the Scandinavian Runic-text Database (Samnordisk runtextdatabas, Uppsala University, http://www.nordiska.uu.se/forskn/samnord.htm). They are released under the Open Database License (ODbL 1.0); their individual contents are under the Database Contents License (DbCL 1.0). This release is not the Scandinavian Runic-text Database itself.RuneS-DB (Göttingen Academy of Sciences and Humanities, https://www.runesdb.de/): the rows with source
runesare released under CC BY-SA 4.0, the licence of the RuneS data. RuneS photographs are linked, not copied; each is under the licence stated on its find page.Gamla runor (christerhamp.se, Christer Hamp): texts and photographs are protected by copyright and are not redistributed. Their rows in
splits/pairs.jsonlgive the record identifier, page and image links and SHA-1 hashes of the normalized transliteration and of the translation. Predictions that would reproduce these texts are given as SHA-1 hashes. To rebuild the full corpus for research use:python gamla_runor/fetch_gamla_runor.py --pairs splits/pairs.jsonl --out gamla_runor_local [--images]
Usage
from peft import PeftModel
from transformers import AutoModelForImageTextToText, AutoProcessor
base = AutoModelForImageTextToText.from_pretrained("Qwen/Qwen3.5-4B", revision="851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a")
model = PeftModel.from_pretrained(base, "kesha-humonen/runic-reader-2", subfolder="adapters/ocr4b_crop")
Prompts, decoding settings (greedy; 320 new tokens for recognition, 200 for translation) and the
repetition truncation of recognizer output are in code/qwen_common.py, code/generate.py and
code/loopcut.py.
Licence
Code, adapters, predictions and the RuneS rows are released under CC BY-SA 4.0. The Rundata rows are under
ODbL 1.0 / DbCL 1.0 (see above); reference texts in preds/ follow the licence of their source. The base model is under its own licence.
- Downloads last month
- -