File size: 1,699 Bytes
35adce0 2b1d3c6 35adce0 2b1d3c6 35adce0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | ---
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
```python
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
- mT5: [Xue et al., 2021](https://arxiv.org/abs/2010.11934)
- Training corpus: Roussel, Adam; Klein, Thomas; Dipper, Stefanie; Wegera, Klaus-Peter; Wich-Reif, Claudia (2024). Referenzkorpus Mittelhochdeutsch (1050–1350), Version 2.1, https://www.linguistics.ruhr-uni-bochum.de/rem/. ISLRN 937-948-254-174-0. |