rstodden commited on
Commit
8e9af22
1 Parent(s): dbb0aff

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +192 -0
README.md ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - de
4
+ metrics:
5
+ - sari
6
+ - bleu
7
+ - bertscore
8
+ library_name: transformers
9
+ pipeline_tag: text2text-generation
10
+ tags:
11
+ - text simplification
12
+ - plain language
13
+ - easy-to-read language
14
+ - sentence simplification
15
+ ---
16
+
17
+ # Model Card for mt5-simple-german-corpus
18
+
19
+ <!-- Provide a quick summary of what the model is/does. -->
20
+
21
+ This model aims to simplify German texts into plain German language. It belongs to the experiments done at the work of Stodden (2024, to appear). "Reproduction & Benchmarking of German Text Simplification Systems" In Proceedings of the 1st Workshop on Evaluating Text Difficulty in a Multilingual Context (DeTermIt!), Turin, Italy.
22
+
23
+ ## Model Details
24
+
25
+ ### Model Description
26
+
27
+ <!-- Provide a longer summary of what this model is. -->
28
+
29
+
30
+
31
+ - **Developed by:** Regina Stodden
32
+ - **Model type:** Text2Text Generation
33
+ - **Language(s) (NLP):** German, Plain German, Easy-to-Read German
34
+ - **License:** [More Information Needed]
35
+ - **Finetuned from model [optional]:** [https://huggingface.co/google/mt5-base](https://huggingface.co/google/mt5-base)
36
+
37
+ ### Model Sources [optional]
38
+
39
+ <!-- Provide the basic links for the model. -->
40
+
41
+ - **Repository:** [https://huggingface.co/DEplain/mt5-simple-german-corpus](https://huggingface.co/DEplain/mt5-simple-german-corpus)
42
+ - **Paper [optional]:** Stodden (2024, to appear). "Reproduction & Benchmarking of German Text Simplification Systems" In Proceedings of the 1st Workshop on Evaluating Text Difficulty in a Multilingual Context (DeTermIt!), Turin, Italy.
43
+
44
+ ## Uses
45
+
46
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
47
+
48
+ ### Direct Use & Downstream Use
49
+
50
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
51
+
52
+ mt5-simple-german-corpus is intended to be used to simplify German sentences for people with reading problems of German texts.
53
+ mt5-simple-german-corpus is a fine-tuned version of mT5-base, which is fine-tuned on [simple-german-corpus](https://github.com/buschmo/Simple-German-Corpus), a German text simplification corpus of the web domain. The intended use is sentence simplification of German, where the source language is standard German and the target language is plain or easy-to-read German.
54
+
55
+
56
+ ### Out-of-Scope Use
57
+
58
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
59
+ mt5-simple-german-corpus is fine-tuned on complex-simple pairs of the web domain (including mixed domains) and for different target groups, e.g., German learners, people with cognitive disabilities. Hence, we assume that the model will not work well for other use cases than text simplification, languages other than German, or other target groups than non-native speakers or people with cognitive disabilities.
60
+
61
+
62
+ ## Bias, Risks, and Limitations
63
+
64
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
65
+
66
+ The generated simplifications of the TS model might have some errors, therefore they shouldn’t be shown to a potentially vulnerable target group before manually verifying their quality and possibly fixing them.
67
+ The text simplification system could be provided to human translators who might improve and timely reduce their effort in manually simplifying a text.
68
+
69
+
70
+ ### Recommendations
71
+
72
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
73
+
74
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
75
+
76
+ ## How to Get Started with the Model
77
+
78
+ Use the code below to get started with the model. Please specify the maximum target length of the sequence to 128 to reproduce our results.
79
+
80
+ ```
81
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
82
+
83
+ tokenizer = AutoTokenizer.from_pretrained("DEplain/mt5-simple-german-corpus")
84
+ model = AutoModelForSeq2SeqLM.from_pretrained("DEplain/mt5-simple-german-corpus")
85
+
86
+ prefix = "Simplify to plain German: "
87
+ sent = "Ganz vorne im Gespann zieht er die anderen 13 Hunde mit, führt sie über vereiste Seen oder steile Berge und findet den Weg, wenn ihn selbst der Musher nicht mehr kennt."
88
+ # EN: "At the front of the team, he pulls the other 13 dogs along, leads them over icy lakes or steep mountains and finds the way when even the musher no longer knows it."
89
+
90
+ inputs = tokenizer([prefix+sent], return_tensors="pt")
91
+ outputs = model.generate(**inputs, max_length=128)
92
+ print(tokenizer.batch_decode(outputs, skip_special_tokens=True)[0])
93
+
94
+
95
+ ```
96
+
97
+ ## Training Details
98
+
99
+ ### Training Data
100
+
101
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
102
+
103
+ The model is fine-tuned on simple-german-corpus. simple-german-corpus [(Toborek et al., 2023)](https://aclanthology.org/2023.acl-long.638/) is a dataset for the training and evaluation of sentence simplification in German. The simple-complex sentence pairs are automatically aligned.
104
+
105
+ ### Training Procedure
106
+
107
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
108
+
109
+
110
+
111
+
112
+ #### Training Hyperparameters
113
+
114
+ - **Training regime:** fp32
115
+ - **epochs**: 10
116
+ - **model**: mt5-base
117
+ - **prefix**: "simplify to plain German: "
118
+ - **max length**: 128:128
119
+ - **learning rate**: 0.001
120
+ - **batch size**: 4
121
+ - **metric**: SARI
122
+ - **optimzer**: adafactor
123
+
124
+ ## Evaluation
125
+
126
+ <!-- This section describes the evaluation protocols and provides the results. -->
127
+
128
+ ### Testing Data, Factors & Metrics
129
+
130
+ #### Testing Data
131
+
132
+ <!-- This should link to a Dataset Card if possible. -->
133
+
134
+ We mainly recommend to evaluate mt5-simple-german-corpus on [simple-german-corpus](https://github.com/buschmo/Simple-German-Corpus/tree/main/results/hand_aligned). However, in our paper, we include evaluation on more test sets which can be found here: [https://github.com/rstodden/easse-de](https://github.com/rstodden/easse-de/tree/master/easse/resources/data/test_sets/sentence_level).
135
+
136
+
137
+ #### Metrics
138
+
139
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
140
+ All models are automatically evaluated against one reference and on the same evaluation metrics, i.e., SARI (Xu et al., 2016), BLEU (Papineni et al., 2002), BS_P (Zhang* et al., 2020), and FRE (Amstad, 1978).
141
+ Following the recommendation of Alva-Manchego et al. (2021), we use BS_P as the main evaluation metric, if the score is a high we verify it with other metrics, i.e., SARI, BLEU and FRE.
142
+ In addition, as recommended by Tanprasert and Kauchak (2021) and Alva-Manchego et al. (2019), we also report linguistic features to get more insights into the system-generated simplifications, i.e., compression ratio and sentence splits.
143
+ For the measurement of the metrics and features, we are using the evaluation framework, i.e., EASSE-DE (Stodden, 2024) a multi-lingual adaptation of the EASSE evaluation framework.
144
+
145
+
146
+
147
+ ### Results
148
+ Results of mt5-simple-german-corpus and related models evaluated on simple-german-corpus. For more results on other test data, please have a look at our paper.
149
+
150
+ | | BLEU | SARI | BS_P | FRE | Compr. Ratio | Sent. Splits |
151
+ |-----------------------|--------|--------|------|-------|--------------|--------------|
152
+ | hda\_LS | 6.34 | 20.22 | 0.25 | 41.15 | 1.00 | 1.03 |
153
+ | sockeye-APA-LHA | 0.33 | 35.50 | 0.13 | 63.70 | 0.80 | 0.82 |
154
+ | sockeye-DEplain-APA | 1.35 | 37.86 | 0.18 | 71.05 | 0.79 | 1.01 |
155
+ | mBART-DEplain-APA | 5.70 | 32.77 | 0.31 | 58.15 | 0.97 | 1.00 |
156
+ | mBART-DEplain-APA+web | 6.56 | 29.80 | 0.33 | 44.95 | 1.61 | 1.09 |
157
+ | mT5-DEplain-APA | 2.81 | 35.92 | 0.30 | 51.45 | 0.76 | 0.88 |
158
+ | **mt5-SGC** | 3.30 | 43.62 | 0.37 | 58.55 | 0.61 | 0.85 |
159
+ | BLOOM-zero | 3.76 | 31.95 | 0.25 | 53.55 | 0.81 | 1.07 |
160
+ | BLOOM-10-random | 4.64 | 33.16 | 0.30 | 51.50 | 0.75 | 0.92 |
161
+ | BLOOM-10-similarity | 13.32 | 44.66 | 0.38 | 58.65 | 0.92 | 1.13 |
162
+ | custom-decoder-ats | 0.44 | 36.53 | 0.06 | 32.05 | 8.83 | 3.68 |
163
+ | Identity baseline | 7.46 | 6.51 | 0.29 | 41.15 | 1.00 | 1.00 |
164
+ | Reference baseline | 100.00 | 100.00 | 1.00 | 65.40 | 1.25 | 1.81 |
165
+ | Truncate baseline | 4.66 | 20.12 | 0.28 | 50.50 | 0.81 | 0.87 |
166
+
167
+
168
+
169
+ ## Citation [optional]
170
+
171
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
172
+
173
+ **BibTeX:**
174
+
175
+ ```
176
+ @inproceedings{stodden-2024-reproduction,
177
+ author = {Regina Stodden},
178
+ title = {{Reproduction \& Benchmark of German Text Simplification Systems}},
179
+ booktitle = "Proceedings of the 1st Workshop on Evaluating Text Difficulty in a Multilingual Context (DeTermIt!)",
180
+ year = {2024 (to appear)},
181
+ address = "Turino, Italy"
182
+ }
183
+ ```
184
+
185
+
186
+ **APA:**
187
+
188
+ Regina Stodden. 2024 (to appear). "Reproduction & Benchmarking of German Text Simplification Systems". In Proceedings of the 1st Workshop on Evaluating Text Difficulty in a Multilingual Context (DeTermIt!), Turin, Italy.
189
+
190
+ ## Model Card Contact
191
+
192
+ if you have any question, please contact Regina Stodden (regina.stodden@hhu.de).