Update README.md
Browse files
README.md
CHANGED
@@ -1,202 +1,87 @@
|
|
1 |
---
|
2 |
base_model: INSAIT-Institute/BgGPT-7B-Instruct-v0.2
|
3 |
library_name: peft
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
-
# Model Card for
|
7 |
|
8 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
|
10 |
|
11 |
|
12 |
-
## Model
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
15 |
|
16 |
-
|
17 |
|
|
|
|
|
18 |
|
19 |
|
20 |
-
|
21 |
-
- **Funded by [optional]:** [More Information Needed]
|
22 |
-
- **Shared by [optional]:** [More Information Needed]
|
23 |
-
- **Model type:** [More Information Needed]
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
|
28 |
-
|
29 |
|
30 |
-
|
|
|
31 |
|
32 |
-
- **Repository:** [More Information Needed]
|
33 |
-
- **Paper [optional]:** [More Information Needed]
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
|
36 |
-
|
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 |
-
|
40 |
-
### Direct Use
|
41 |
-
|
42 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
43 |
|
44 |
-
|
|
|
45 |
|
46 |
-
|
|
|
47 |
|
48 |
-
|
|
|
49 |
|
50 |
-
[More Information Needed]
|
51 |
|
52 |
-
### Out-of-Scope Use
|
53 |
|
54 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
## Bias, Risks, and Limitations
|
59 |
-
|
60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
|
62 |
-
|
63 |
|
64 |
-
###
|
65 |
|
66 |
-
|
|
|
|
|
|
|
67 |
|
68 |
-
|
|
|
|
|
69 |
|
70 |
-
|
|
|
71 |
|
72 |
-
|
|
|
|
|
|
|
73 |
|
74 |
-
[More Information Needed]
|
75 |
|
76 |
## Training Details
|
77 |
|
78 |
-
|
79 |
-
|
80 |
-
<!-- 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. -->
|
81 |
-
|
82 |
-
[More Information Needed]
|
83 |
-
|
84 |
-
### Training Procedure
|
85 |
-
|
86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
-
|
88 |
-
#### Preprocessing [optional]
|
89 |
-
|
90 |
-
[More Information Needed]
|
91 |
-
|
92 |
-
|
93 |
-
#### Training Hyperparameters
|
94 |
-
|
95 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
-
|
97 |
-
#### Speeds, Sizes, Times [optional]
|
98 |
-
|
99 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
-
|
101 |
-
[More Information Needed]
|
102 |
-
|
103 |
-
## Evaluation
|
104 |
-
|
105 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
106 |
-
|
107 |
-
### Testing Data, Factors & Metrics
|
108 |
-
|
109 |
-
#### Testing Data
|
110 |
-
|
111 |
-
<!-- This should link to a Dataset Card if possible. -->
|
112 |
-
|
113 |
-
[More Information Needed]
|
114 |
-
|
115 |
-
#### Factors
|
116 |
-
|
117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
118 |
-
|
119 |
-
[More Information Needed]
|
120 |
-
|
121 |
-
#### Metrics
|
122 |
-
|
123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
124 |
-
|
125 |
-
[More Information Needed]
|
126 |
-
|
127 |
-
### Results
|
128 |
-
|
129 |
-
[More Information Needed]
|
130 |
-
|
131 |
-
#### Summary
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
## Model Examination [optional]
|
136 |
-
|
137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
138 |
-
|
139 |
-
[More Information Needed]
|
140 |
-
|
141 |
-
## Environmental Impact
|
142 |
-
|
143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
144 |
-
|
145 |
-
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).
|
146 |
-
|
147 |
-
- **Hardware Type:** [More Information Needed]
|
148 |
-
- **Hours used:** [More Information Needed]
|
149 |
-
- **Cloud Provider:** [More Information Needed]
|
150 |
-
- **Compute Region:** [More Information Needed]
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
-
|
153 |
-
## Technical Specifications [optional]
|
154 |
-
|
155 |
-
### Model Architecture and Objective
|
156 |
-
|
157 |
-
[More Information Needed]
|
158 |
-
|
159 |
-
### Compute Infrastructure
|
160 |
-
|
161 |
-
[More Information Needed]
|
162 |
-
|
163 |
-
#### Hardware
|
164 |
-
|
165 |
-
[More Information Needed]
|
166 |
-
|
167 |
-
#### Software
|
168 |
-
|
169 |
-
[More Information Needed]
|
170 |
-
|
171 |
-
## Citation [optional]
|
172 |
-
|
173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
174 |
-
|
175 |
-
**BibTeX:**
|
176 |
-
|
177 |
-
[More Information Needed]
|
178 |
-
|
179 |
-
**APA:**
|
180 |
-
|
181 |
-
[More Information Needed]
|
182 |
-
|
183 |
-
## Glossary [optional]
|
184 |
-
|
185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
186 |
-
|
187 |
-
[More Information Needed]
|
188 |
-
|
189 |
-
## More Information [optional]
|
190 |
-
|
191 |
-
[More Information Needed]
|
192 |
|
193 |
-
## Model Card Authors [optional]
|
194 |
|
195 |
-
[
|
196 |
|
197 |
-
## Model Card Contact
|
198 |
|
199 |
-
|
200 |
-
### Framework versions
|
201 |
|
202 |
-
-
|
|
|
1 |
---
|
2 |
base_model: INSAIT-Institute/BgGPT-7B-Instruct-v0.2
|
3 |
library_name: peft
|
4 |
+
license: apache-2.0
|
5 |
+
language:
|
6 |
+
- bg
|
7 |
+
tags:
|
8 |
+
- propaganda
|
9 |
---
|
10 |
|
11 |
+
# Model Card for identrics/BG_propaganda_detector
|
12 |
|
|
|
13 |
|
14 |
|
15 |
|
16 |
+
## Model Description
|
17 |
|
18 |
+
- **Developed by:** [`Identrics`](https://identrics.ai/)
|
19 |
+
- **Language:** Bulgarian
|
20 |
+
- **License:** apache-2.0
|
21 |
+
- **Finetuned from model:** [`INSAIT-Institute/BgGPT-7B-Instruct-v0.2`](https://huggingface.co/INSAIT-Institute/BgGPT-7B-Instruct-v0.2)
|
22 |
+
- **Context window :** 8192 tokens
|
23 |
|
24 |
+
## Model Description
|
25 |
|
26 |
+
This model consists of a fine-tuned version of BgGPT-7B-Instruct-v0.2 for a propaganda detection task. It is effectively a multilabel classifier, determining wether a given propaganda text in Bulgarian contains or not 5 predefined propaganda types.
|
27 |
+
This model was created by [`Identrics`](https://identrics.ai/), in the scope of the Wasper project.
|
28 |
|
29 |
|
30 |
+
## Propaganda taxonomy
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
+
The propaganda techniques we want to identify are classified in 5 categories:
|
33 |
|
34 |
+
1. Self-Identification Techniques:
|
35 |
+
These techniques exploit the audience's feelings of association (or desire to be associated) with a larger group. They suggest that the audience should feel united, motivated, or threatened by the same factors that unite, motivate, or threaten that group.
|
36 |
|
|
|
|
|
|
|
37 |
|
38 |
+
2. Defamation Techniques:
|
39 |
+
These techniques represent direct or indirect attacks against an entity's reputation and worth.
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
3. Legitimisation Techniques:
|
42 |
+
These techniques attempt to prove and legitimise the propagandist's statements by using arguments that cannot be falsified because they are based on moral values or personal experiences.
|
43 |
|
44 |
+
4. Logical Fallacies:
|
45 |
+
These techniques appeal to the audience's reason and masquerade as objective and factual arguments, but in reality, they exploit distractions and flawed logic.
|
46 |
|
47 |
+
5. Rhetorical Devices:
|
48 |
+
These techniques seek to influence the audience and control the conversation by using linguistic methods.
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
|
53 |
+
## Uses
|
|
|
|
|
|
|
|
|
54 |
|
55 |
+
To be used as a multilabel classifier to identify if the Bulgarian sample text contains one or more of the five propaganda techniques mentioned above.
|
56 |
|
57 |
+
### Example
|
58 |
|
59 |
+
First install direct dependencies:
|
60 |
+
```
|
61 |
+
pip install transformers torch accelerate
|
62 |
+
```
|
63 |
|
64 |
+
Then the model can be downloaded and used for inference:
|
65 |
+
```py
|
66 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
67 |
|
68 |
+
model = AutoModelForSequenceClassification.from_pretrained("identrics/BG_propaganda_classifier", num_labels=5)
|
69 |
+
tokenizer = AutoTokenizer.from_pretrained("identrics/BG_propaganda_classifier")
|
70 |
|
71 |
+
tokens = tokenizer("Газа евтин, американското ядрено гориво евтино, пълно с фотоволтаици а пък тока с 30% нагоре. Защо ?", return_tensors="pt")
|
72 |
+
output = model(**tokens)
|
73 |
+
print(output.logits)
|
74 |
+
```
|
75 |
|
|
|
76 |
|
77 |
## Training Details
|
78 |
|
79 |
+
The training datasets for the model consist of a balanced set totaling 734 Bulgarian examples that include both propaganda and non-propaganda content. These examples are collected from a variety of traditional media and social media sources, ensuring a diverse range of content. Aditionally, the training dataset is enriched with AI-generated samples. The total distribution of the training data is shown in the table below:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
|
|
81 |
|
82 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/66741cdd8123010b8f63f965/71vN4yLV9vyA5Cqc_WRRD.png)
|
83 |
|
|
|
84 |
|
85 |
+
The model was then tested on a smaller evaluation dataset, achieving an f1 score of 0.836. The evaluation dataset is distributed as such:
|
|
|
86 |
|
87 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/66741cdd8123010b8f63f965/DunBsCJMZSFezNVB0Vo3a.png)
|