PeterPanecillo commited on
Commit
507ed92
·
verified ·
1 Parent(s): 2c81f6e

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -0
README.md ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _misogBETO is a domain adaptation of a [Spanish BERT](https://huggingface.co/dccuchile/bert-base-spanish-wwm-cased) language model, specifically adapted to the misogyny domain.
2
+
3
+ It was adapted using a guided lexical masking strategy during masked language model (MLM) pretraining.
4
+ Instead of randomly masking tokens, we prioritized masking words appearing in a [misogyny-specific lexicon](https://github.com/fmplaza/hate-speech-spanish-lexicons/blob/master/misogyny_lexicon.txt).
5
+ The base corpus used for domain adaptation was the [Spanish Hate Speech Superset](https://huggingface.co/datasets/manueltonneau/spanish-hate-speech-superset).
6
+
7
+
8
+ For training the model we used a batch size of 8, with a learning rate of 2e-5. We trained the model for four epochs using a NVIDIA GeForce RTX 5090 GPU.
9
+
10
+ ## Usage
11
+
12
+ ```python
13
+ from transformers import pipeline
14
+ pipe = pipeline("fill-mask", model="PeterPanecillo/_misogBETO")
15
+ text = pipe("Las [MASK] son adictivas.")
16
+ print(text)
17
+ ```
18
+
19
+ ## Load model directly
20
+ ```
21
+ from transformers import AutoTokenizer, AutoModelForMaskedLM
22
+ tokenizer = AutoTokenizer.from_pretrained("PeterPanecillo/_misogBETO")
23
+ model = AutoModelForMaskedLM.from_pretrained("PeterPanecillo/_misogBETO")
24
+ ```