Add SetFit model
Browse files- README.md +22 -23
- config_setfit.json +2 -2
- model.safetensors +1 -1
- model_head.pkl +2 -2
README.md
CHANGED
|
@@ -24,9 +24,8 @@ metrics:
|
|
| 24 |
pipeline_tag: text-classification
|
| 25 |
library_name: setfit
|
| 26 |
inference: true
|
| 27 |
-
base_model: sentence-transformers/paraphrase-mpnet-base-v2
|
| 28 |
model-index:
|
| 29 |
-
- name: SetFit
|
| 30 |
results:
|
| 31 |
- task:
|
| 32 |
type: text-classification
|
|
@@ -37,22 +36,22 @@ model-index:
|
|
| 37 |
split: test
|
| 38 |
metrics:
|
| 39 |
- type: accuracy
|
| 40 |
-
value: 0.
|
| 41 |
name: Accuracy
|
| 42 |
- type: precision
|
| 43 |
-
value: 0.
|
| 44 |
name: Precision
|
| 45 |
- type: recall
|
| 46 |
-
value: 0.
|
| 47 |
name: Recall
|
| 48 |
- type: f1
|
| 49 |
-
value: 0.
|
| 50 |
name: F1
|
| 51 |
---
|
| 52 |
|
| 53 |
-
# SetFit
|
| 54 |
|
| 55 |
-
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification.
|
| 56 |
|
| 57 |
The model has been trained using an efficient few-shot learning technique that involves:
|
| 58 |
|
|
@@ -63,7 +62,7 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
| 63 |
|
| 64 |
### Model Description
|
| 65 |
- **Model Type:** SetFit
|
| 66 |
-
- **Sentence Transformer
|
| 67 |
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
| 68 |
- **Maximum Sequence Length:** 512 tokens
|
| 69 |
- **Number of Classes:** 3 classes
|
|
@@ -89,7 +88,7 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
| 89 |
### Metrics
|
| 90 |
| Label | Accuracy | Precision | Recall | F1 |
|
| 91 |
|:--------|:---------|:----------|:-------|:-------|
|
| 92 |
-
| **all** | 0.
|
| 93 |
|
| 94 |
## Uses
|
| 95 |
|
|
@@ -176,10 +175,10 @@ preds = model("it made sense because it is tom's opinion that cyberbullying is n
|
|
| 176 |
| 0.2632 | 100 | 0.1707 | - |
|
| 177 |
| 0.3947 | 150 | 0.0839 | - |
|
| 178 |
| 0.5263 | 200 | 0.0335 | - |
|
| 179 |
-
| 0.6579 | 250 | 0.
|
| 180 |
-
| 0.7895 | 300 | 0.
|
| 181 |
-
| 0.9211 | 350 | 0.
|
| 182 |
-
| 1.0526 | 400 | 0.
|
| 183 |
| 1.1842 | 450 | 0.0006 | - |
|
| 184 |
| 1.3158 | 500 | 0.0004 | - |
|
| 185 |
| 1.4474 | 550 | 0.0002 | - |
|
|
@@ -188,7 +187,7 @@ preds = model("it made sense because it is tom's opinion that cyberbullying is n
|
|
| 188 |
| 1.8421 | 700 | 0.0002 | - |
|
| 189 |
| 1.9737 | 750 | 0.0002 | - |
|
| 190 |
| 2.1053 | 800 | 0.0002 | - |
|
| 191 |
-
| 2.2368 | 850 | 0.
|
| 192 |
| 2.3684 | 900 | 0.0001 | - |
|
| 193 |
| 2.5 | 950 | 0.0001 | - |
|
| 194 |
| 2.6316 | 1000 | 0.0001 | - |
|
|
@@ -202,14 +201,14 @@ preds = model("it made sense because it is tom's opinion that cyberbullying is n
|
|
| 202 |
| 3.6842 | 1400 | 0.0001 | - |
|
| 203 |
| 3.8158 | 1450 | 0.0001 | - |
|
| 204 |
| 3.9474 | 1500 | 0.0001 | - |
|
| 205 |
-
| 4.0789 | 1550 | 0.
|
| 206 |
| 4.2105 | 1600 | 0.0001 | - |
|
| 207 |
-
| 4.3421 | 1650 | 0.
|
| 208 |
| 4.4737 | 1700 | 0.0001 | - |
|
| 209 |
-
| 4.6053 | 1750 | 0.
|
| 210 |
-
| 4.7368 | 1800 | 0.
|
| 211 |
-
| 4.8684 | 1850 | 0.
|
| 212 |
-
| 5.0 | 1900 | 0.
|
| 213 |
| 5.1316 | 1950 | 0.0001 | - |
|
| 214 |
| 5.2632 | 2000 | 0.0001 | - |
|
| 215 |
| 5.3947 | 2050 | 0.0001 | - |
|
|
@@ -217,8 +216,8 @@ preds = model("it made sense because it is tom's opinion that cyberbullying is n
|
|
| 217 |
| 5.6579 | 2150 | 0.0001 | - |
|
| 218 |
| 5.7895 | 2200 | 0.0001 | - |
|
| 219 |
| 5.9211 | 2250 | 0.0001 | - |
|
| 220 |
-
| 6.0526 | 2300 | 0.
|
| 221 |
-
| 6.1842 | 2350 | 0.
|
| 222 |
| 6.3158 | 2400 | 0.0001 | - |
|
| 223 |
| 6.4474 | 2450 | 0.0001 | - |
|
| 224 |
| 6.5789 | 2500 | 0.0001 | - |
|
|
|
|
| 24 |
pipeline_tag: text-classification
|
| 25 |
library_name: setfit
|
| 26 |
inference: true
|
|
|
|
| 27 |
model-index:
|
| 28 |
+
- name: SetFit
|
| 29 |
results:
|
| 30 |
- task:
|
| 31 |
type: text-classification
|
|
|
|
| 36 |
split: test
|
| 37 |
metrics:
|
| 38 |
- type: accuracy
|
| 39 |
+
value: 0.9210526315789473
|
| 40 |
name: Accuracy
|
| 41 |
- type: precision
|
| 42 |
+
value: 0.9198717948717949
|
| 43 |
name: Precision
|
| 44 |
- type: recall
|
| 45 |
+
value: 0.9030769230769231
|
| 46 |
name: Recall
|
| 47 |
- type: f1
|
| 48 |
+
value: 0.9105882352941177
|
| 49 |
name: F1
|
| 50 |
---
|
| 51 |
|
| 52 |
+
# SetFit
|
| 53 |
|
| 54 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification.
|
| 55 |
|
| 56 |
The model has been trained using an efficient few-shot learning technique that involves:
|
| 57 |
|
|
|
|
| 62 |
|
| 63 |
### Model Description
|
| 64 |
- **Model Type:** SetFit
|
| 65 |
+
<!-- - **Sentence Transformer:** [Unknown](https://huggingface.co/unknown) -->
|
| 66 |
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
| 67 |
- **Maximum Sequence Length:** 512 tokens
|
| 68 |
- **Number of Classes:** 3 classes
|
|
|
|
| 88 |
### Metrics
|
| 89 |
| Label | Accuracy | Precision | Recall | F1 |
|
| 90 |
|:--------|:---------|:----------|:-------|:-------|
|
| 91 |
+
| **all** | 0.9211 | 0.9199 | 0.9031 | 0.9106 |
|
| 92 |
|
| 93 |
## Uses
|
| 94 |
|
|
|
|
| 175 |
| 0.2632 | 100 | 0.1707 | - |
|
| 176 |
| 0.3947 | 150 | 0.0839 | - |
|
| 177 |
| 0.5263 | 200 | 0.0335 | - |
|
| 178 |
+
| 0.6579 | 250 | 0.0141 | - |
|
| 179 |
+
| 0.7895 | 300 | 0.0072 | - |
|
| 180 |
+
| 0.9211 | 350 | 0.0026 | - |
|
| 181 |
+
| 1.0526 | 400 | 0.0008 | - |
|
| 182 |
| 1.1842 | 450 | 0.0006 | - |
|
| 183 |
| 1.3158 | 500 | 0.0004 | - |
|
| 184 |
| 1.4474 | 550 | 0.0002 | - |
|
|
|
|
| 187 |
| 1.8421 | 700 | 0.0002 | - |
|
| 188 |
| 1.9737 | 750 | 0.0002 | - |
|
| 189 |
| 2.1053 | 800 | 0.0002 | - |
|
| 190 |
+
| 2.2368 | 850 | 0.0002 | - |
|
| 191 |
| 2.3684 | 900 | 0.0001 | - |
|
| 192 |
| 2.5 | 950 | 0.0001 | - |
|
| 193 |
| 2.6316 | 1000 | 0.0001 | - |
|
|
|
|
| 201 |
| 3.6842 | 1400 | 0.0001 | - |
|
| 202 |
| 3.8158 | 1450 | 0.0001 | - |
|
| 203 |
| 3.9474 | 1500 | 0.0001 | - |
|
| 204 |
+
| 4.0789 | 1550 | 0.0002 | - |
|
| 205 |
| 4.2105 | 1600 | 0.0001 | - |
|
| 206 |
+
| 4.3421 | 1650 | 0.0033 | - |
|
| 207 |
| 4.4737 | 1700 | 0.0001 | - |
|
| 208 |
+
| 4.6053 | 1750 | 0.0004 | - |
|
| 209 |
+
| 4.7368 | 1800 | 0.0035 | - |
|
| 210 |
+
| 4.8684 | 1850 | 0.0002 | - |
|
| 211 |
+
| 5.0 | 1900 | 0.0003 | - |
|
| 212 |
| 5.1316 | 1950 | 0.0001 | - |
|
| 213 |
| 5.2632 | 2000 | 0.0001 | - |
|
| 214 |
| 5.3947 | 2050 | 0.0001 | - |
|
|
|
|
| 216 |
| 5.6579 | 2150 | 0.0001 | - |
|
| 217 |
| 5.7895 | 2200 | 0.0001 | - |
|
| 218 |
| 5.9211 | 2250 | 0.0001 | - |
|
| 219 |
+
| 6.0526 | 2300 | 0.0001 | - |
|
| 220 |
+
| 6.1842 | 2350 | 0.0001 | - |
|
| 221 |
| 6.3158 | 2400 | 0.0001 | - |
|
| 222 |
| 6.4474 | 2450 | 0.0001 | - |
|
| 223 |
| 6.5789 | 2500 | 0.0001 | - |
|
config_setfit.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
{
|
| 2 |
-
"normalize_embeddings": false,
|
| 3 |
"labels": [
|
| 4 |
"Enrichment / reinterpretation",
|
| 5 |
"Lack of understanding / clear misunderstanding",
|
| 6 |
"Linguistic (in)felicity"
|
| 7 |
-
]
|
|
|
|
| 8 |
}
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"labels": [
|
| 3 |
"Enrichment / reinterpretation",
|
| 4 |
"Lack of understanding / clear misunderstanding",
|
| 5 |
"Linguistic (in)felicity"
|
| 6 |
+
],
|
| 7 |
+
"normalize_embeddings": false
|
| 8 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 437967672
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1625837d71bc138f11bf50626777c6a9c2b957a36bff3cd9a1c3aa249cc74f92
|
| 3 |
size 437967672
|
model_head.pkl
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ef5aeaa81f2f1b263fe1cabd76a630e5a36ee60b89606afb19eef2e09ce148b
|
| 3 |
+
size 10627
|