Henniina commited on
Commit
1df51b8
·
verified ·
1 Parent(s): 99e1846

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -30
README.md CHANGED
@@ -41,14 +41,15 @@ model-index:
41
  name: Metric
42
  ---
43
 
44
- # SetFit with TurkuNLP/bert-base-finnish-cased-v1
45
 
46
- This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [TurkuNLP/bert-base-finnish-cased-v1](https://huggingface.co/TurkuNLP/bert-base-finnish-cased-v1) as the Sentence Transformer embedding model. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification.
47
 
 
48
  The model has been trained using an efficient few-shot learning technique that involves:
49
 
50
- 1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
51
- 2. Training a classification head with features from the fine-tuned Sentence Transformer.
52
 
53
  ## Model Details
54
 
@@ -57,29 +58,28 @@ The model has been trained using an efficient few-shot learning technique that i
57
  - **Sentence Transformer body:** [TurkuNLP/bert-base-finnish-cased-v1](https://huggingface.co/TurkuNLP/bert-base-finnish-cased-v1)
58
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
59
  - **Maximum Sequence Length:** 512 tokens
60
- - **Number of Classes:** 2 classes
61
  <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
62
  <!-- - **Language:** Unknown -->
63
  <!-- - **License:** Unknown -->
64
 
65
  ### Model Sources
66
 
67
- - **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
68
- - **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
69
- - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
70
-
71
  ### Model Labels
72
  | Label | Examples |
73
  |:------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
74
  | 0 | <ul><li>'Etunimi Sukunimi herra senkun aloittaa keräyksen♥️'</li><li>'Etunimi Sukunimi venäjän syy hintojen nousu vai syytätkö sodastakin Suomen hallitusta ? 😖'</li><li>'Etunimi Sukunimi Olikhaan se virve'</li></ul> |
75
- | 1 | <ul><li>'Etunimi Sukunimi Ei tarkoita vaihtoehdottomuutta. Vaan että jos hakee, niin kannattaa valmistautua kaikenlaiseen, "roskinpia" rajaloukkauksia myöten. Valmistautuminen ei tarkoita, etteikö silti voisi hakea, vaan sitä että voi taklata vaikutusyritykset mahdollisimman hyvin.'</li><li>'Etunimi Etunimi Alkkiomäki, mikä on vastaus sössöttäjille, mahtava kuulla vastauksesi??'</li><li>'Etunimi Sukunimi eli he ilmiselvästi tekee töitä palkatta? Miksi sit puhutaan sairaanhoitajien bonareista ja palkankorotuksista? Meillä on paljon isompia ongelmia käsissämme kuin tämä pandemia joka tilastojenkin puolesta on rokottamattomien pandemia.. mielenterveys ongelmat huippulukemissa ja leikkauksia siirretään samalla kuin kansa lihavoituu entisestään! Näitäkään ei saada hoidettu pyhällä hengellä ja lainanotto ei ole ratkaisu'</li></ul> |
76
 
77
  ## Evaluation
78
 
79
  ### Metrics
80
  | Label | Metric |
81
  |:--------|:-------|
82
- | **all** | 0.7503 |
83
 
84
  ## Uses
85
 
@@ -99,26 +99,22 @@ from setfit import SetFitModel
99
  # Download from the 🤗 Hub
100
  model = SetFitModel.from_pretrained("Finnish-actions/SetFit-FinBERT1-A2-challenge")
101
  # Run inference
102
- preds = model("Etunimi Sukunimi 🙋‍♀️")
103
  ```
104
 
105
- <!--
106
  ### Downstream Use
107
 
108
- *List how someone could finetune this model on their own dataset.*
109
- -->
110
 
111
- <!--
112
  ### Out-of-Scope Use
113
 
114
- *List how the model may foreseeably be misused and address what users ought not to do with the model.*
115
- -->
116
 
117
- <!--
118
  ## Bias, Risks and Limitations
119
 
120
- *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
121
- -->
122
 
123
  <!--
124
  ### Recommendations
@@ -158,6 +154,7 @@ preds = model("Etunimi Sukunimi 🙋‍♀️")
158
  - eval_max_steps: -1
159
  - load_best_model_at_end: False
160
 
 
161
  ### Training Results
162
  | Epoch | Step | Training Loss | Validation Loss |
163
  |:------:|:----:|:-------------:|:---------------:|
@@ -223,6 +220,7 @@ preds = model("Etunimi Sukunimi 🙋‍♀️")
223
  | 3.8728 | 2800 | 0.0 | - |
224
  | 3.9419 | 2850 | 0.0 | - |
225
  | 4.0 | 2892 | - | 0.4098 |
 
226
 
227
  ### Framework Versions
228
  - Python: 3.11.9
@@ -235,18 +233,21 @@ preds = model("Etunimi Sukunimi 🙋‍♀️")
235
 
236
  ## Citation
237
 
 
 
238
  ### BibTeX
239
  ```bibtex
240
- @article{https://doi.org/10.48550/arxiv.2209.11055,
241
- doi = {10.48550/ARXIV.2209.11055},
242
- url = {https://arxiv.org/abs/2209.11055},
243
- author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
244
- keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
245
- title = {Efficient Few-Shot Learning Without Prompts},
246
- publisher = {arXiv},
247
- year = {2022},
248
- copyright = {Creative Commons Attribution 4.0 International}
249
  }
 
250
  ```
251
 
252
  <!--
 
41
  name: Metric
42
  ---
43
 
44
+ # Detect Actions in Asynchronous Conversation Comments
45
 
46
+ ## SetFit with TurkuNLP/bert-base-finnish-cased-v1
47
 
48
+ This is a SetFit model that can be used for Text Classification of actions in asynchronous conversation. This particular model detects if a comment includes a challenge or not. The configuration of the model is that the model is based on only one annotator's annotations (annotator A2). Metric evaluations are based on conservative ground truth (see paper). This SetFit model uses TurkuNLP/bert-base-finnish-cased-v1 as the Sentence Transformer embedding model (using word embeddings). A LogisticRegression instance is used for classification.
49
  The model has been trained using an efficient few-shot learning technique that involves:
50
 
51
+ 1. Fine-tuning a Sentence Transformer with contrastive learning.
52
+ 2. Training a classification head with features from the fine-tuned Sentence Transformer.
53
 
54
  ## Model Details
55
 
 
58
  - **Sentence Transformer body:** [TurkuNLP/bert-base-finnish-cased-v1](https://huggingface.co/TurkuNLP/bert-base-finnish-cased-v1)
59
  - **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
60
  - **Maximum Sequence Length:** 512 tokens
61
+ - **Number of Classes:** 2 classes (action present yes/no))
62
  <!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
63
  <!-- - **Language:** Unknown -->
64
  <!-- - **License:** Unknown -->
65
 
66
  ### Model Sources
67
 
68
+ - **Repository:** [GitHub](https://github.com/henniina/Detecting-paired-actions)
69
+ - **Paper:** Paakki, H., Toivanen, P. and Kajava K. (2025). Implicit and Indirect: Detecting Face-threatening and Paired Actions in Asynchronous Online Conversations. Northern European Journal of Language Technology (NEJLT), 11(1), pp. 58-83.
70
+ -
 
71
  ### Model Labels
72
  | Label | Examples |
73
  |:------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
74
  | 0 | <ul><li>'Etunimi Sukunimi herra senkun aloittaa keräyksen♥️'</li><li>'Etunimi Sukunimi venäjän syy hintojen nousu vai syytätkö sodastakin Suomen hallitusta ? 😖'</li><li>'Etunimi Sukunimi Olikhaan se virve'</li></ul> |
75
+ | 1 | <ul><li>'Etunimi Sukunimi Ei tarkoita vaihtoehdottomuutta. Vaan että jos hakee, niin kannattaa valmistautua kaikenlaiseen, "roskinpia" rajaloukkauksia myöten. Valmistautuminen ei tarkoita, etteikö silti voisi hakea, vaan sitä että voi taklata vaikutusyritykset mahdollisimman hyvin.'</li><li>'Etunimi Etunimi Sukunimi, mikä on vastaus sössöttäjille, mahtava kuulla vastauksesi??'</li><li>'Etunimi Sukunimi eli he ilmiselvästi tekee töitä palkatta? Miksi sit puhutaan sairaanhoitajien bonareista ja palkankorotuksista? Meillä on paljon isompia ongelmia käsissämme kuin tämä pandemia joka tilastojenkin puolesta on rokottamattomien pandemia.. mielenterveys ongelmat huippulukemissa ja leikkauksia siirretään samalla kuin kansa lihavoituu entisestään! Näitäkään ei saada hoidettu pyhällä hengellä ja lainanotto ei ole ratkaisu'</li></ul> |
76
 
77
  ## Evaluation
78
 
79
  ### Metrics
80
  | Label | Metric |
81
  |:--------|:-------|
82
+ | **all** | 0.76 |
83
 
84
  ## Uses
85
 
 
99
  # Download from the 🤗 Hub
100
  model = SetFitModel.from_pretrained("Finnish-actions/SetFit-FinBERT1-A2-challenge")
101
  # Run inference
102
+ preds = model("Etunimi Sukunimi minä myös 🙋‍♀️")
103
  ```
104
 
105
+
106
  ### Downstream Use
107
 
108
+ NB. This model has been trained on data coming from Finnish language asynchronous conversations under crisis related news on Facebook. This specific model has been trained to detect whether a comment includes a question or not. It reflects only one of our annotators' label interpretations, so the best use of our models (see our paper) would be to combine a set of models we provide on our Huggingface (Finnish-actions), and use a model ensemble to provide label predictions. It needs to be noted also that the model may not be well applicable outside of its empirical context, so in downstream applications, one should always conduct an evaluation of the model applicability using manually annotated data from that specific context (see our paper for annotation instructions).
 
109
 
 
110
  ### Out-of-Scope Use
111
 
112
+ Please use this model only for action detection and analysis. Uses of this model and the involved data for generative purposes (e.g. NLG) is prohibited.
 
113
 
 
114
  ## Bias, Risks and Limitations
115
 
116
+ Note that the model may produce errors. Due to the size of the training dataset, model may not generalize very well even for other novel topics within the same context. Note that model predictions should not be regarded as final judgments e.g. for online moderation purposes, but each case should also be regarded individually if using model predictions to support moderation. Also, the annotations only reflect three (though experienced) annotators' interpretations, so there might be perspectives on data intepretation that have not been taken into account here.
117
+ If model is used to support moderation on social media, we recommend that final judgments should always be left for human moderators.
118
 
119
  <!--
120
  ### Recommendations
 
154
  - eval_max_steps: -1
155
  - load_best_model_at_end: False
156
 
157
+ <!--
158
  ### Training Results
159
  | Epoch | Step | Training Loss | Validation Loss |
160
  |:------:|:----:|:-------------:|:---------------:|
 
220
  | 3.8728 | 2800 | 0.0 | - |
221
  | 3.9419 | 2850 | 0.0 | - |
222
  | 4.0 | 2892 | - | 0.4098 |
223
+ -->
224
 
225
  ### Framework Versions
226
  - Python: 3.11.9
 
233
 
234
  ## Citation
235
 
236
+ If you use this model, please cite the following work:
237
+
238
  ### BibTeX
239
  ```bibtex
240
+ @article{paakki-implicit-indirect,
241
+ doi = {https://doi.org/10.3384/nejlt.2000-1533.2025.5980},
242
+ url = {https://nejlt.ep.liu.se/article/view/5980},
243
+ author = {Paakki, Henna and Toivanen, Pihla and Kajava, Kaisla},
244
+ title = {Implicit and Indirect: Detecting Face-threatening and Paired Actions in Asynchronous Online Conversations},
245
+ publisher = {Northern European Journal of Language Technology (NEJLT)},
246
+ volume= {11},
247
+ number= {1},
248
+ year = {2025}
249
  }
250
+
251
  ```
252
 
253
  <!--