normaere-model / README.md
JonasHermann's picture
Upload README.md with huggingface_hub
2b1d3c6 verified
|
Raw
History Blame Contribute Delete
1.7 kB
metadata
language:
  - de
  - gmh
library_tags:
  - transformers
  - torch
tags:
  - text-generation
  - mt5
  - middle-high-german
  - normalization
pipeline_tag: text-generation
base_model: google/mt5-base

normaere-model

Transformer-based seq2seq normalizer for Middle High German (MHG) text, fine-tuned from google/mt5-base.

Model Details

  • Base Model: google/mt5-base (580M parameters)
  • Architecture: MT5ForConditionalGeneration (encoder-decoder)
  • Precision: FP16
  • Max Sequence Length: 512 tokens
  • Vocabulary Size: 250,117 (augmented with medieval abbreviation characters)

Intended Uses

Normalizes Middle High German texts (ca. 1050–1500) according to the standards of the Referenzkorpus Mittelhochdeutsch (ReM):

  • Solves common abbreviations
  • Splits off and expands common pro- and enclitics
  • Applies editorial post-processing

Training Data

Fine-tuned on the Referenzkorpus Mittelhochdeutsch (ReM), Version 2.1.

Usage

from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("JonasHermann/normaere-model")
model = AutoModelForSeq2SeqLM.from_pretrained("JonasHermann/normaere-model")

input_text = "die stete wârheit"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)

References