frhew commited on
Commit
5a1d981
·
verified ·
1 Parent(s): 3cc6bc2

created model card

Browse files
Files changed (1) hide show
  1. README.md +159 -0
README.md ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - de
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - german
8
+ - deutsch
9
+ - simplification
10
+ - vereinfachung
11
+ ---
12
+ # Model Card for Model ID
13
+
14
+ <!-- Provide a quick summary of what the model is/does. -->
15
+
16
+ This model was used in our experiments in our paper: [Elaborative Simplification for German-Language Texts](https://aclanthology.org/2024.sigdial-1.3).
17
+ We have uploaded this model for transparency and replicability of our experiments.
18
+ If however you are interested in German text simplification in general, we recommend [our more recent model](https://huggingface.co/hiig-piai/simba_best_092024).
19
+
20
+ We fine-tuned [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) with a set of ca. 2000 newspaper articles which have been simplified by the Austrian Press Agency.
21
+ This model was trained with the standard and the A2 level texts.
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:** Freya Hewett, Hadi Asghari
32
+ - **Model type:** simplification model, text generation
33
+ - **Language(s) (NLP):** German
34
+ - **License:** Apache 2.0
35
+ - **Finetuned from model:** meta-llama/Meta-Llama-3-8B-Instruct
36
+
37
+ ### Model Sources
38
+
39
+ <!-- Provide the basic links for the model. -->
40
+
41
+ - **Repository:** [GermanElabSimplification](https://github.com/fhewett/GermanElabSimplification/tree/main)
42
+ - **Paper:** [Elaborative Simplification for German-Language Texts](https://aclanthology.org/2024.sigdial-1.3)
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
49
+
50
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
51
+
52
+ This model works best for simplifying German-language newspaper articles (news items, not commentaries or editorials). It may work for other types of texts.
53
+
54
+ ### Downstream Use
55
+
56
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
57
+ We have fine-tuned using only newspaper articles. We have not yet performed extensive out-of-domain testing, but believe that the model's capabilities could be improved by fine-tuning on more diverse data.
58
+
59
+ <!-- ### Out-of-Scope Use -->
60
+
61
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
62
+
63
+ ## Bias, Risks, and Limitations
64
+
65
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
66
+
67
+ As with most text generation models, the model sometimes produces information that is incorrect.
68
+
69
+ ### Recommendations
70
+
71
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
72
+
73
+ Please check manually that your output text corresponds to the input text, as factual inconsistencies may have arisen.
74
+
75
+ ## How to Get Started with the Model
76
+
77
+ To load the model using transformers:
78
+
79
+ ```
80
+ from transformers import AutoTokenizer, AutoModelForCausalLM
81
+ import torch
82
+ device = "cuda"
83
+ tokenizer = AutoTokenizer.from_pretrained("frhew/sigdial_ft_a2")
84
+ model = AutoModelForCausalLM.from_pretrained("frhew/sigdial_ft_a2", torch_dtype=torch.float16).to(device)
85
+ ```
86
+
87
+ We used the following prompt at inference to test our model:
88
+
89
+ ```
90
+ <|begin_of_text|><|start_header_id|>system<|end_header_id|>
91
+ Du bist ein hilfreicher Assistent und hilfst dem User, Texte besser zu verstehen.<|eot_id|><|start_header_id|>user<|end_header_id|>
92
+ Kannst du bitte den folgenden Text zusammenfassen und sprachlich auf ein A2-Niveau in Deutsch vereinfachen? Schreibe maximal 5 Sätze.
93
+ {input_text}<|eot_id|><|start_header_id|>assistant<|end_header_id|>
94
+ ```
95
+
96
+ ## Training Details
97
+
98
+ ### Training Data
99
+
100
+ <!-- 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. -->
101
+
102
+ A sample of the data used to train our model can be found [here](https://github.com/fhewett/apa-rst/tree/main/original_texts).
103
+
104
+ #### Training Hyperparameters
105
+
106
+ <!--- **Training regime:** Our training script can be found [here](https://github.com/fhewett/simba/blob/main/models/train_simba.py). -->
107
+ <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
108
+
109
+ <!-- #### Speeds, Sizes, Times [optional] -->
110
+
111
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
112
+
113
+ ## Evaluation
114
+
115
+ More details on the evaluation can be found in the paper.
116
+
117
+ | \textbf{Model} | \textbf{Prompt} | \textbf{Test set} | \textbf{SARI $\uparrow$} | \textbf{FRE $\uparrow$} | \textbf{M.P. $\uparrow$} | \textbf{S $\uparrow$} | \textbf{C $\uparrow$} | \textbf{F $\uparrow$} | \textbf{Avg. $\uparrow$} |
118
+ |----------------|-----------------|-------------------|--------------------------|-------------------------|--------------------------|-----------------------|-----------------------|-----------------------|--------------------------|
119
+ | Baseline | Basic$^{A2}$ | A2 | 41.2 | 59.4 | \textbf{.89} | .38 | \textbf{.96} | \textbf{.84} | \textbf{.77} |
120
+ | FT-A2 | Basic$^{A2}$ | A2 | \textbf{44.0} | \textbf{70.6} | .49 | \textbf{.82} | .56 | .64 | .63 |
121
+ | Baseline | Basic$^{B1}$ | B1 | 42.3 | 56.8 | \textbf{.85} | .4 | \textbf{.9} | \textbf{.9} | \textbf{.76} |
122
+ | FT-B1 | Basic$^{B1}$ | B1 | \textbf{42.4} | \textbf{60.0} | .75 | \textbf{.55} | .6 | .75 | .66 |
123
+
124
+
125
+ #### Summary
126
+
127
+
128
+ ## Citation [optional]
129
+
130
+ **BibTeX:**
131
+
132
+ @inproceedings{hewett-etal-2024-elaborative,
133
+ title = "Elaborative Simplification for {G}erman-Language Texts",
134
+ author = "Hewett, Freya and
135
+ Asghari, Hadi and
136
+ Stede, Manfred",
137
+ editor = "Kawahara, Tatsuya and
138
+ Demberg, Vera and
139
+ Ultes, Stefan and
140
+ Inoue, Koji and
141
+ Mehri, Shikib and
142
+ Howcroft, David and
143
+ Komatani, Kazunori",
144
+ booktitle = "Proceedings of the 25th Annual Meeting of the Special Interest Group on Discourse and Dialogue",
145
+ month = sep,
146
+ year = "2024",
147
+ address = "Kyoto, Japan",
148
+ publisher = "Association for Computational Linguistics",
149
+ url = "https://aclanthology.org/2024.sigdial-1.3",
150
+ doi = "10.18653/v1/2024.sigdial-1.3",
151
+ pages = "29--39"}
152
+
153
+ **APA:**
154
+
155
+ Freya Hewett, Hadi Asghari, and Manfred Stede. 2024. Elaborative Simplification for German-Language Texts. In Proceedings of the 25th Annual Meeting of the Special Interest Group on Discourse and Dialogue, pages 29–39, Kyoto, Japan. Association for Computational Linguistics.
156
+
157
+ ## Model Card Contact
158
+
159
+ frhew