initial commit
Browse files
README.md
CHANGED
@@ -1,199 +1,114 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
-
# Model Card for
|
7 |
-
|
8 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
-
|
10 |
-
|
11 |
|
12 |
## Model Details
|
13 |
|
14 |
### Model Description
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
19 |
|
20 |
-
- **
|
21 |
-
- **
|
22 |
-
- **
|
23 |
-
- **
|
24 |
-
- **
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
|
28 |
-
### Model Sources [optional]
|
29 |
-
|
30 |
-
<!-- Provide the basic links for the model. -->
|
31 |
-
|
32 |
-
- **Repository:** [More Information Needed]
|
33 |
-
- **Paper [optional]:** [More Information Needed]
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
|
36 |
## Uses
|
37 |
|
38 |
-
|
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 |
-
### Downstream Use [optional]
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
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 |
-
[More Information Needed]
|
57 |
|
58 |
## Bias, Risks, and Limitations
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
### Recommendations
|
65 |
-
|
66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
-
|
68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
|
70 |
## How to Get Started with the Model
|
71 |
|
72 |
-
|
|
|
|
|
|
|
73 |
|
74 |
-
|
|
|
|
|
|
|
75 |
|
76 |
## Training Details
|
77 |
|
78 |
### Training Data
|
79 |
|
80 |
-
|
81 |
|
82 |
-
|
|
|
|
|
|
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
|
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 |
-
|
100 |
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
## Evaluation
|
104 |
|
105 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
188 |
|
189 |
-
## More Information [optional]
|
190 |
|
191 |
-
|
192 |
|
193 |
-
|
194 |
|
195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
|
197 |
-
##
|
198 |
|
199 |
-
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
+
tags:
|
4 |
+
- toxicity-detection
|
5 |
+
- NLP
|
6 |
+
- classification
|
7 |
+
- fine-tuning
|
8 |
+
license: mit
|
9 |
+
language:
|
10 |
+
- pt
|
11 |
+
metrics:
|
12 |
+
- accuracy
|
13 |
+
base_model:
|
14 |
+
- google-bert/bert-base-uncased
|
15 |
+
pipeline_tag: text-classification
|
16 |
---
|
17 |
|
18 |
+
# Model Card for BERT Uncased Fine-Tuned on Toxicity Detection
|
|
|
|
|
|
|
|
|
19 |
|
20 |
## Model Details
|
21 |
|
22 |
### Model Description
|
23 |
|
24 |
+
Este modelo é um BERT base uncased fine-tuned para a detecção de toxicidade em tweets. Ele foi treinado em um dataset anotado com classificação binária: 0 para tweets não tóxicos e 1 para tweets tóxicos.
|
|
|
|
|
25 |
|
26 |
+
- **Desenvolvido por:** Carlos André Dos Santos Lima
|
27 |
+
- **Tipo de modelo:** BERT (base-uncased)
|
28 |
+
- **Idiomas:** Portugês
|
29 |
+
- **Licença:** MIT
|
30 |
+
- **Fine-tuned a partir de:** bert-base-uncased
|
|
|
|
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
## Uses
|
34 |
|
35 |
+
### Uso Direto
|
|
|
|
|
|
|
|
|
36 |
|
37 |
+
Este modelo pode ser usado para identificar tweets tóxicos em Português. Pode ser aplicado diretamente em moderação de conteúdo, análise de sentimentos e detecção de discurso de ódio.
|
38 |
|
|
|
39 |
|
40 |
+
### Uso Fora do Escopo
|
41 |
|
42 |
+
O modelo pode apresentar viés ao classificar tweets fora do contexto do dataset de treinamento. Ele não é adequado para tomada de decisões críticas sem revisão humana.
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
## Bias, Risks, and Limitations
|
45 |
|
46 |
+
- O modelo pode apresentar viés em suas predições devido à distribuição do dataset de treinamento.
|
47 |
+
- Pode não generalizar bem para contextos diferentes daqueles presentes no dataset.
|
48 |
+
- Recomenda-se revisão humana para evitar classificações injustas.
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
## How to Get Started with the Model
|
51 |
|
52 |
+
```python
|
53 |
+
from transformers import pipeline
|
54 |
+
|
55 |
+
toxicity_classifier = pipeline("text-classification", model="[modelo no Hugging Face]")
|
56 |
|
57 |
+
text = "This is an example tweet."
|
58 |
+
result = toxicity_classifier(text)
|
59 |
+
print(result)
|
60 |
+
```
|
61 |
|
62 |
## Training Details
|
63 |
|
64 |
### Training Data
|
65 |
|
66 |
+
O modelo foi treinado em um dataset contendo tweets anotados manualmente como tóxicos ou não tóxicos.
|
67 |
|
68 |
+
Arquivos do dataset:
|
69 |
+
- `train.csv` - Dados de treino
|
70 |
+
- `test.csv` - Dados de teste
|
71 |
+
- `sample_submission.csv` - Exemplo de submissão
|
72 |
|
73 |
+
Colunas:
|
74 |
+
- `id` - Identificador do tweet
|
75 |
+
- `text` - Conteúdo do tweet
|
76 |
+
- `label` - 0: não tóxico, 1: tóxico
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
+
### Training Procedure
|
79 |
|
80 |
+
- **Hardware:** GPU T4
|
81 |
+
- **Hiperparâmetros:**
|
82 |
+
- Batch size: 64
|
83 |
+
- Learning rate: 2e-5
|
84 |
+
- Epochs: 5
|
85 |
+
- Otimizador: AdamW
|
86 |
|
87 |
## Evaluation
|
88 |
|
89 |
+
### Dados e Métricas
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
+
- Dataset de teste utilizado para avaliação.
|
92 |
+
- Principais métricas:
|
93 |
+
- Acurácia
|
94 |
+
- Precisão
|
95 |
+
- Recall
|
96 |
+
- F1-score
|
97 |
|
|
|
98 |
|
99 |
+
## Citation
|
100 |
|
101 |
+
Se usar este modelo, cite da seguinte forma:
|
102 |
|
103 |
+
```bibtex
|
104 |
+
@article{Carlos2025,
|
105 |
+
title={Fine-Tuning BERT for Toxicity Detection},
|
106 |
+
author={Carlos André Dos Santos Lima},
|
107 |
+
journal={Hugging Face Model Hub},
|
108 |
+
year={2025}
|
109 |
+
}
|
110 |
+
```
|
111 |
|
112 |
+
## Contato
|
113 |
|
114 |
+
Caso tenha dúvidas ou sugestões, entre em contato pelo e-mail: [email protected] ou abra uma issue no repositório do modelo no Hugging Face.
|