akhooli commited on
Commit
b5b06a5
1 Parent(s): c86127e

Add SetFit model

Browse files
Files changed (5) hide show
  1. README.md +14 -14
  2. config.json +1 -1
  3. config_setfit.json +2 -2
  4. model.safetensors +1 -1
  5. model_head.pkl +1 -1
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- base_model: akhooli/sbert_ar_nli_500k
3
  library_name: setfit
4
  metrics:
5
  - accuracy
@@ -35,7 +35,7 @@ widget:
35
  فالفندق
36
  inference: true
37
  model-index:
38
- - name: SetFit with akhooli/sbert_ar_nli_500k
39
  results:
40
  - task:
41
  type: text-classification
@@ -46,13 +46,13 @@ model-index:
46
  split: test
47
  metrics:
48
  - type: accuracy
49
- value: 0.46636363636363637
50
  name: Accuracy
51
  ---
52
 
53
- # SetFit with akhooli/sbert_ar_nli_500k
54
 
55
- This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [akhooli/sbert_ar_nli_500k](https://huggingface.co/akhooli/sbert_ar_nli_500k) 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.
56
 
57
  The model has been trained using an efficient few-shot learning technique that involves:
58
 
@@ -63,7 +63,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 body:** [akhooli/sbert_ar_nli_500k](https://huggingface.co/akhooli/sbert_ar_nli_500k)
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 +89,7 @@ The model has been trained using an efficient few-shot learning technique that i
89
  ### Metrics
90
  | Label | Accuracy |
91
  |:--------|:---------|
92
- | **all** | 0.4664 |
93
 
94
  ## Uses
95
 
@@ -145,12 +145,12 @@ preds = model("مكان راحه البال . المكان نظيف جدا وم
145
 
146
  | Label | Training Sample Count |
147
  |:---------|:----------------------|
 
148
  | Negative | 8 |
149
  | Positive | 8 |
150
- | Mixed | 8 |
151
 
152
  ### Training Hyperparameters
153
- - batch_size: (16, 16)
154
  - num_epochs: (4, 4)
155
  - max_steps: -1
156
  - sampling_strategy: oversampling
@@ -170,11 +170,11 @@ preds = model("مكان راحه البال . المكان نظيف جدا وم
170
  ### Training Results
171
  | Epoch | Step | Training Loss | Validation Loss |
172
  |:------:|:----:|:-------------:|:---------------:|
173
- | 0.0833 | 1 | 0.2047 | - |
174
- | 1.0 | 12 | - | 0.2570 |
175
- | 2.0 | 24 | - | 0.2721 |
176
- | 3.0 | 36 | - | 0.2744 |
177
- | 4.0 | 48 | - | 0.2741 |
178
 
179
  ### Framework Versions
180
  - Python: 3.10.14
 
1
  ---
2
+ base_model: akhooli/Arabic-SBERT-100K
3
  library_name: setfit
4
  metrics:
5
  - accuracy
 
35
  فالفندق
36
  inference: true
37
  model-index:
38
+ - name: SetFit with akhooli/Arabic-SBERT-100K
39
  results:
40
  - task:
41
  type: text-classification
 
46
  split: test
47
  metrics:
48
  - type: accuracy
49
+ value: 0.5005050505050505
50
  name: Accuracy
51
  ---
52
 
53
+ # SetFit with akhooli/Arabic-SBERT-100K
54
 
55
+ This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [akhooli/Arabic-SBERT-100K](https://huggingface.co/akhooli/Arabic-SBERT-100K) 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.
56
 
57
  The model has been trained using an efficient few-shot learning technique that involves:
58
 
 
63
 
64
  ### Model Description
65
  - **Model Type:** SetFit
66
+ - **Sentence Transformer body:** [akhooli/Arabic-SBERT-100K](https://huggingface.co/akhooli/Arabic-SBERT-100K)
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
  ### Metrics
90
  | Label | Accuracy |
91
  |:--------|:---------|
92
+ | **all** | 0.5005 |
93
 
94
  ## Uses
95
 
 
145
 
146
  | Label | Training Sample Count |
147
  |:---------|:----------------------|
148
+ | Mixed | 8 |
149
  | Negative | 8 |
150
  | Positive | 8 |
 
151
 
152
  ### Training Hyperparameters
153
+ - batch_size: (32, 32)
154
  - num_epochs: (4, 4)
155
  - max_steps: -1
156
  - sampling_strategy: oversampling
 
170
  ### Training Results
171
  | Epoch | Step | Training Loss | Validation Loss |
172
  |:------:|:----:|:-------------:|:---------------:|
173
+ | 0.1667 | 1 | 0.2506 | - |
174
+ | 1.0 | 6 | - | 0.2707 |
175
+ | 2.0 | 12 | - | 0.2555 |
176
+ | 3.0 | 18 | - | 0.2677 |
177
+ | 4.0 | 24 | - | 0.2754 |
178
 
179
  ### Framework Versions
180
  - Python: 3.10.14
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "akhooli/sbert_ar_nli_500k",
3
  "architectures": [
4
  "BertModel"
5
  ],
 
1
  {
2
+ "_name_or_path": "akhooli/Arabic-SBERT-100K",
3
  "architectures": [
4
  "BertModel"
5
  ],
config_setfit.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "normalize_embeddings": false,
3
  "labels": [
 
4
  "Negative",
5
- "Positive",
6
- "Mixed"
7
  ]
8
  }
 
1
  {
2
  "normalize_embeddings": false,
3
  "labels": [
4
+ "Mixed",
5
  "Negative",
6
+ "Positive"
 
7
  ]
8
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:371918891d5e1705e6e5bdf494f8d81a1f0cc8c8ff58cda6a03b30fd6b701668
3
  size 540795752
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a56c33d50e4ea6defd40d5c06e9feb367b7d6e473eb03e975cf65f772deab63
3
  size 540795752
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1419f33885c2a0aca451451040cd7f8c3fb8525745151bf49e5db609c8871107
3
  size 19375
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f4e48c683cb7411d3312fb65609c7d3b5ee2bfba3b96357f2e84b85a38abad1
3
  size 19375