owinton commited on
Commit
9569e4e
1 Parent(s): cf4c7bb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +33 -124
README.md CHANGED
@@ -3,97 +3,43 @@ language:
3
  - 'da'
4
  - 'no'
5
  library_name: transformers
 
6
  ---
7
- # Model Card for A-og-ttack2
8
 
9
  Text classification model that determines whether a not a short text contains an attack.
10
 
11
- # Model Details
12
 
13
- ## Model Description
14
 
15
- The model is based on the T5 architecture, and is trained on a large Danish and Norwegian corpus of text. The model is further fine-tuned on ~70.000
16
 
17
 
18
- - **Developed by:** [More Information Needed]
19
- - **Shared by [optional]:** [More Information Needed]
20
- - **Model type:** [More Information Needed]
21
- - **Language(s) (NLP):** [More Information Needed]
22
  - **License:** [More Information Needed]
23
- - **Finetuned from model [optional]:** [More Information Needed]
24
 
25
- ## Model Sources [optional]
26
 
27
- <!-- Provide the basic links for the model. -->
 
28
 
29
- - **Repository:** [More Information Needed]
30
- - **Paper [optional]:** [More Information Needed]
31
- - **Demo [optional]:** [More Information Needed]
32
-
33
- # Uses
34
-
35
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
36
-
37
- ## Direct Use
38
-
39
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
40
-
41
- [More Information Needed]
42
-
43
- ## Downstream Use [optional]
44
-
45
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
46
-
47
- [More Information Needed]
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
-
53
- [More Information Needed]
54
 
55
  # Bias, Risks, and Limitations
56
-
57
  <!-- This section is meant to convey both technical and sociotechnical limitations. -->
58
-
59
- [More Information Needed]
60
-
61
- ## Recommendations
62
-
63
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
64
-
65
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
66
-
67
- # Training Details
68
-
69
- ## Training Data
70
-
71
- <!-- This should link to a Data 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. -->
72
-
73
- [More Information Needed]
74
-
75
- ## Training Procedure [optional]
76
-
77
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
78
-
79
- ### Preprocessing
80
-
81
  [More Information Needed]
82
 
83
- ### Speeds, Sizes, Times
 
84
 
85
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
86
-
87
- [More Information Needed]
88
 
89
  # Evaluation
90
-
91
  <!-- This section describes the evaluation protocols and provides the results. -->
92
-
93
  ## Testing Data, Factors & Metrics
94
 
95
  ### Testing Data
96
-
97
  <!-- This should link to a Data Card if possible. -->
98
 
99
  [More Information Needed]
@@ -106,7 +52,7 @@ Users (both direct and downstream) should be made aware of the risks, biases and
106
 
107
  ### Metrics
108
 
109
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
110
 
111
  [More Information Needed]
112
 
@@ -118,11 +64,6 @@ Users (both direct and downstream) should be made aware of the risks, biases and
118
 
119
 
120
 
121
- # Model Examination [optional]
122
-
123
- <!-- Relevant interpretability work for the model goes here -->
124
-
125
- [More Information Needed]
126
 
127
  # Environmental Impact
128
 
@@ -132,65 +73,33 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
132
 
133
  - **Hardware Type:** [More Information Needed]
134
  - **Hours used:** [More Information Needed]
135
- - **Cloud Provider:** [More Information Needed]
136
- - **Compute Region:** [More Information Needed]
137
  - **Carbon Emitted:** [More Information Needed]
138
 
139
- # Technical Specifications [optional]
140
-
141
- ## Model Architecture and Objective
142
-
143
- [More Information Needed]
144
-
145
- ## Compute Infrastructure
146
-
147
- [More Information Needed]
148
-
149
- ### Hardware
150
-
151
- [More Information Needed]
152
-
153
- ### Software
154
-
155
- [More Information Needed]
156
-
157
- # Citation [optional]
158
-
159
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
160
-
161
- **BibTeX:**
162
-
163
- [More Information Needed]
164
 
165
- **APA:**
 
166
 
167
- [More Information Needed]
168
-
169
- # Glossary [optional]
170
-
171
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
172
-
173
- [More Information Needed]
174
-
175
- # More Information [optional]
176
-
177
- [More Information Needed]
178
-
179
- # Model Card Authors [optional]
180
-
181
- [More Information Needed]
182
 
183
- # Model Card Contact
184
 
185
- [More Information Needed]
 
186
 
187
- # How to Get Started with the Model
 
 
188
 
189
- Use the code below to get started with the model.
 
 
190
 
191
- <details>
192
- <summary> Click to expand </summary>
 
 
193
 
194
- [More Information Needed]
195
 
196
- </details>
 
3
  - 'da'
4
  - 'no'
5
  library_name: transformers
6
+ f1-score: 0.76
7
  ---
8
+ # Model Card for A&ttack2
9
 
10
  Text classification model that determines whether a not a short text contains an attack.
11
 
 
12
 
13
+ # Model Description
14
 
15
+ The model is based on the [North-T5-NCC Large](https://huggingface.co/north/t5_large_NCC) (developed by Per E. Kummervold) which is a Scandinavian language built upon [T5](https://github.com/google-research/text-to-text-transfer-transformer) and [T5X](https://github.com/google-research/t5x). The model is further trained on ~70k Norwegian and ~67k Danish social media posts which have been classified as either 'attack' or 'not attack', making it a text-to-text model manipulated to do classification. The model is described in Danish in [this report](https://strapi.ogtal.dk/uploads/966f1ebcfa9942d3aef338e9920611f4.pdf).
16
 
17
 
18
+ - **Developed by:** The development team at Analyse & Tal
19
+ - **Model type:** Language model restricted to classification
20
+ - **Language(s) (NLP):** Danish and Norwegian
 
21
  - **License:** [More Information Needed]
22
+ - **Finetuned from model:** [More information needed]
23
 
 
24
 
25
+ # Direct Use
26
+ The model can be used directly to classify Danish and Norwegian social media posts (or similar pieces of text).
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  # Bias, Risks, and Limitations
 
30
  <!-- This section is meant to convey both technical and sociotechnical limitations. -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  [More Information Needed]
32
 
33
+ # Training Data
34
+ A collection of ~70k Norwegian and ~67k Danish social media posts have been manually annotated as 'attack' or 'not attack' by six individual coders. 5% of the posts have been annotated by more then one annotator, with the annotators in agreement for 83% of annotations.
35
 
36
+ *Hvad er data-split metoden? Hvad er training-validation-test split?*
 
 
37
 
38
  # Evaluation
 
39
  <!-- This section describes the evaluation protocols and provides the results. -->
 
40
  ## Testing Data, Factors & Metrics
41
 
42
  ### Testing Data
 
43
  <!-- This should link to a Data Card if possible. -->
44
 
45
  [More Information Needed]
 
52
 
53
  ### Metrics
54
 
55
+ Macro-averaged f1-score: 0.76
56
 
57
  [More Information Needed]
58
 
 
64
 
65
 
66
 
 
 
 
 
 
67
 
68
  # Environmental Impact
69
 
 
73
 
74
  - **Hardware Type:** [More Information Needed]
75
  - **Hours used:** [More Information Needed]
76
+ - **Cloud Provider:** Azure
77
+ - **Compute Region:** North-Europe
78
  - **Carbon Emitted:** [More Information Needed]
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
 
81
+ # Model Card Authors
82
+ This model card was written by the developer team at Analyse & Tal. Contact: oyvind@ogtal.dk.
83
 
84
+ # How to Get Started with the Model
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
+ Use the code below to get started with the model.
87
 
88
+ ```
89
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
90
 
91
+ # Download/load tokenizer and language model
92
+ tokenizer = AutoTokenizer.from_pretrained("ogtal/A-og-ttack2")
93
+ model = AutoModelForSeq2SeqLM.from_pretrained("ogtal/A-og-ttack2")
94
 
95
+ # Give sample text. The example is from a social media comment.
96
+ sample_text = "Velbekomme dit klamme usle løgnersvin!"
97
+ input_ids = tokenizer("Velbekomme", return_tensors="pt").input_ids
98
 
99
+ # Forward pass and print the output
100
+ outputs = model.generate(input_ids)
101
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
102
+ ```
103
 
104
+ Running the above code will print "angreb" (attack in Danish)
105