thebogko commited on
Commit
a0fa44f
1 Parent(s): 2cd184b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +205 -1
README.md CHANGED
@@ -5,4 +5,208 @@ datasets:
5
  language:
6
  - bg
7
  pipeline_tag: text2text-generation
8
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  language:
6
  - bg
7
  pipeline_tag: text2text-generation
8
+ ---
9
+ # mt5-base finetuned bulgarian-grammar-mistakes
10
+
11
+ <!-- Provide a quick summary of what the model is/does. -->
12
+ This model is a fine-tune checkpoint of mt5-base, fine-tuned on [bulgarian-grammar-mistakes](https://huggingface.co/thebogko/mt5-finetuned-bulgarian-grammar-mistakes) by only taking into account two of the four error types:
13
+ - article_misuse, and
14
+ - pronoun_misuse
15
+ This is done so the model can focus on these mistakes more clearly, as they are more common with native Bulgarian speakers, as opposed to the latter two types which are more common with Bulgarian learners.
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+
21
+ <!-- Provide a longer summary of what this model is.
22
+ - **Developed by:** [More Information Needed]
23
+ - **Funded by [optional]:** [More Information Needed]
24
+ - **Shared by [optional]:** [More Information Needed]-->
25
+ - **Model type:** Sequence2sequence Generation
26
+ - **Language(s) (NLP):** Bulgarian
27
+ - **License:** apache2.0
28
+ - **Finetuned from model:** [google/mt5-base](https://huggingface.co/google/mt5-base)
29
+
30
+ <!--### Model Sources [optional]-->
31
+
32
+ <!-- Provide the basic links for the model. -->
33
+
34
+ <!--- **Paper [optional]:** [More Information Needed]-->
35
+
36
+ ## Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+ Intended use of the model includes but is not limited to:
40
+ - comparison and development of Bulgarian error correction NLP systems by developers
41
+ - incorporation in Bulgarian language learner applications
42
+ - research in the field of Bulgarian NLP grammar error correction
43
+
44
+ ### Direct Use
45
+
46
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
47
+ No need to fine-tuning further, unless needing to add more error types.
48
+
49
+ ### Out-of-Scope Use
50
+
51
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
52
+ The model should not be used to intentionally create hostile or alienating environments for people - especially Bulgarian learners. In addition, the model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model.
53
+
54
+ ## Bias, Risks, and Limitations
55
+
56
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
57
+ The model specialises in identifying and correcting Bulgarian grammar errors that have to do with article and pronoun misuse, so it will likely not perform well on other types of errors. Additionally, the dataset used for fine-tuning does not encompass all possible errors of those types, so use should be with caution of grammatical validity of output.
58
+
59
+ ### Recommendations
60
+
61
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
62
+ Users are strongly advised to double check the validity of the model's outputs and to strive to understand the underlying grammatical rules behind the language, instead of using the model's outputs as given.
63
+
64
+ ## How to Get Started with the Model
65
+
66
+ Use the code below to get started with the model.
67
+
68
+ ```
69
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
70
+
71
+ tokenizer = AutoTokenizer.from_pretrained("thebogko/mt5-finetuned-bulgarian-grammar-mistakes")
72
+ model = AutoModelForSeq2SeqLM.from_pretrained("thebogko/mt5-finetuned-bulgarian-grammar-mistakes")
73
+
74
+
75
+ erroneous_sentence = 'Владетеля умря още млад.'
76
+ encoded_source = tokenizer(erroneous_sentence,
77
+ return_tensors='pt',
78
+ max_length=100,
79
+ padding='max_length')
80
+ encoded_source.to(device)
81
+
82
+ correct_sentence = ft_model.generate(**encoded_source, max_length=100)
83
+ correct_sentence = [tokenizer.decode(t, skip_special_tokens=True) for t in correct_sentence][0]
84
+ print(correct_sentence)
85
+
86
+ "Владетелят умря още млад."
87
+ ```
88
+
89
+ ## Training Details
90
+
91
+ ### Training Data
92
+
93
+ <!-- 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. -->
94
+
95
+ [More Information Needed]
96
+
97
+ ### Training Procedure
98
+
99
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
100
+
101
+ #### Preprocessing [optional]
102
+
103
+ [More Information Needed]
104
+
105
+
106
+ #### Training Hyperparameters
107
+
108
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
109
+
110
+ #### Speeds, Sizes, Times [optional]
111
+
112
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
113
+
114
+ [More Information Needed]
115
+
116
+ ## Evaluation
117
+
118
+ <!-- This section describes the evaluation protocols and provides the results. -->
119
+
120
+ ### Testing Data, Factors & Metrics
121
+
122
+ #### Testing Data
123
+
124
+ <!-- This should link to a Dataset Card if possible. -->
125
+
126
+ [More Information Needed]
127
+
128
+ #### Factors
129
+
130
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
131
+
132
+ [More Information Needed]
133
+
134
+ #### Metrics
135
+
136
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
137
+
138
+ [More Information Needed]
139
+
140
+ ### Results
141
+
142
+ [More Information Needed]
143
+
144
+ #### Summary
145
+
146
+
147
+
148
+ ## Model Examination [optional]
149
+
150
+ <!-- Relevant interpretability work for the model goes here -->
151
+
152
+ [More Information Needed]
153
+
154
+ ## Environmental Impact
155
+
156
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
157
+
158
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
159
+
160
+ - **Hardware Type:** [More Information Needed]
161
+ - **Hours used:** [More Information Needed]
162
+ - **Cloud Provider:** [More Information Needed]
163
+ - **Compute Region:** [More Information Needed]
164
+ - **Carbon Emitted:** [More Information Needed]
165
+
166
+ ## Technical Specifications [optional]
167
+
168
+ ### Model Architecture and Objective
169
+
170
+ [More Information Needed]
171
+
172
+ ### Compute Infrastructure
173
+
174
+ [More Information Needed]
175
+
176
+ #### Hardware
177
+
178
+ [More Information Needed]
179
+
180
+ #### Software
181
+
182
+ [More Information Needed]
183
+
184
+ ## Citation [optional]
185
+
186
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
187
+
188
+ **BibTeX:**
189
+
190
+ [More Information Needed]
191
+
192
+ **APA:**
193
+
194
+ [More Information Needed]
195
+
196
+ ## Glossary [optional]
197
+
198
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
199
+
200
+ [More Information Needed]
201
+
202
+ ## More Information [optional]
203
+
204
+ [More Information Needed]
205
+
206
+ ## Model Card Authors [optional]
207
+
208
+ [More Information Needed]
209
+
210
+ ## Model Card Contact
211
+
212
+ [More Information Needed]