Jorgeutd commited on
Commit
a3a0080
1 Parent(s): 13412f0

Push model using huggingface_hub.

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md CHANGED
@@ -5,22 +5,21 @@ tags:
5
  - sentence-transformers
6
  - text-classification
7
  - generated_from_setfit_trainer
 
8
  metrics:
9
  - accuracy
10
  widget:
11
- - text: amy and matthew have a bit of a phony relationship , but the film works in
12
- spite of it .
13
- - text: it 's refreshing to see a romance this smart .
14
- - text: bogdanich is unashamedly pro-serbian and makes little attempt to give voice
15
- to the other side .
16
- - text: sayles has an eye for the ways people of different ethnicities talk to and
17
- about others outside the group .
18
- - text: eddie murphy and owen wilson have a cute partnership in i spy , but the movie
19
- around them is so often nearly nothing that their charm does n't do a load of
20
- good .
21
  pipeline_tag: text-classification
22
  inference: true
23
- base_model: BAAI/bge-small-en-v1.5
24
  model-index:
25
  - name: SetFit with BAAI/bge-small-en-v1.5
26
  results:
@@ -33,9 +32,10 @@ model-index:
33
  split: test
34
  metrics:
35
  - type: accuracy
36
- value: 0.8478857770455793
37
  name: Accuracy
38
  ---
 
39
  # SetFit with BAAI/bge-small-en-v1.5
40
 
41
  This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) 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.
@@ -64,17 +64,17 @@ The model has been trained using an efficient few-shot learning technique that i
64
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
65
 
66
  ### Model Labels
67
- | Label | Examples |
68
- |:---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
69
- | negative | <ul><li>'there might be some sort of credible gender-provoking philosophy submerged here , but who the hell cares ?'</li><li>'represents the depths to which the girls-behaving-badly film has fallen .'</li><li>'-lrb- a -rrb- crushing disappointment .'</li></ul> |
70
- | positive | <ul><li>'what saves it ... and makes it one of the better video-game-based flicks , is that the film acknowledges upfront that the plot makes no sense , such that the lack of linearity is the point of emotional and moral departure for protagonist alice .'</li><li>'but it could be , by its art and heart , a necessary one .'</li><li>'a culture-clash comedy that , in addition to being very funny , captures some of the discomfort and embarrassment of being a bumbling american in europe .'</li></ul> |
71
 
72
  ## Evaluation
73
 
74
  ### Metrics
75
  | Label | Accuracy |
76
  |:--------|:---------|
77
- | **all** | 0.862 |
78
 
79
  ## Uses
80
 
@@ -90,10 +90,11 @@ Then you can load this model and run inference.
90
 
91
  ```python
92
  from setfit import SetFitModel
 
93
  # Download from the 🤗 Hub
94
  model = SetFitModel.from_pretrained("Jorgeutd/setfit-bge-small-v1.5-sst2-50-shot")
95
  # Run inference
96
- preds = model("it 's refreshing to see a romance this smart .")
97
  ```
98
 
99
  <!--
@@ -125,12 +126,12 @@ preds = model("it 's refreshing to see a romance this smart .")
125
  ### Training Set Metrics
126
  | Training set | Min | Median | Max |
127
  |:-------------|:----|:-------|:----|
128
- | Word count | 6 | 22.5 | 45 |
129
 
130
- | Label | Training Sample Count |
131
- |:---------|:----------------------|
132
- | negative | 50 |
133
- | positive | 50 |
134
 
135
  ### Training Hyperparameters
136
  - batch_size: (16, 16)
@@ -150,19 +151,81 @@ preds = model("it 's refreshing to see a romance this smart .")
150
  - load_best_model_at_end: False
151
 
152
  ### Training Results
153
- | Epoch | Step | Training Loss | Validation Loss |
154
- |:-----:|:----:|:-------------:|:---------------:|
155
- | 0.2 | 1 | 0.2109 | - |
156
- | 10.0 | 50 | 0.01 | - |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
 
158
  ### Framework Versions
159
- - Python: 3.10.11
160
  - SetFit: 1.0.3
161
- - Sentence Transformers: 2.3.1
162
- - Transformers: 4.37.2
163
- - PyTorch: 2.2.0+cu121
164
- - Datasets: 2.16.1
165
- - Tokenizers: 0.15.1
166
 
167
  ## Citation
168
 
@@ -179,6 +242,21 @@ preds = model("it 's refreshing to see a romance this smart .")
179
  copyright = {Creative Commons Attribution 4.0 International}
180
  }
181
  ```
182
- ---
183
- license: apache-2.0
184
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  - sentence-transformers
6
  - text-classification
7
  - generated_from_setfit_trainer
8
+ base_model: BAAI/bge-small-en-v1.5
9
  metrics:
10
  - accuracy
11
  widget:
12
+ - text: mostly works because of the universal themes , earnest performances ... and
13
+ excellent use of music by india 's popular gulzar and jagjit singh .
14
+ - text: in all the annals of the movies , few films have been this odd , inexplicable
15
+ and unpleasant .
16
+ - text: director charles stone iii applies more detail to the film 's music than to
17
+ the story line ; what 's best about drumline is its energy .
18
+ - text: there 's nothing exactly wrong here , but there 's not nearly enough that
19
+ 's right .
20
+ - text: it 's a bad sign in a thriller when you instantly know whodunit .
 
21
  pipeline_tag: text-classification
22
  inference: true
 
23
  model-index:
24
  - name: SetFit with BAAI/bge-small-en-v1.5
25
  results:
 
32
  split: test
33
  metrics:
34
  - type: accuracy
35
+ value: 0.8621636463481603
36
  name: Accuracy
37
  ---
38
+
39
  # SetFit with BAAI/bge-small-en-v1.5
40
 
41
  This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) 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.
 
64
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
65
 
66
  ### Model Labels
67
+ | Label | Examples |
68
+ |:------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
69
+ | 1 | <ul><li>'a sensitive , modest comic tragedy that works as both character study and symbolic examination of the huge economic changes sweeping modern china .'</li><li>'the year 2002 has conjured up more coming-of-age stories than seem possible , but take care of my cat emerges as the very best of them .'</li><li>'amy and matthew have a bit of a phony relationship , but the film works in spite of it .'</li></ul> |
70
+ | 0 | <ul><li>'works on the whodunit level as its larger themes get lost in the murk of its own making'</li><li>"one of those strained caper movies that 's hardly any fun to watch and begins to vaporize from your memory minutes after it ends ."</li><li>"shunji iwai 's all about lily chou chou is a beautifully shot , but ultimately flawed film about growing up in japan ."</li></ul> |
71
 
72
  ## Evaluation
73
 
74
  ### Metrics
75
  | Label | Accuracy |
76
  |:--------|:---------|
77
+ | **all** | 0.8622 |
78
 
79
  ## Uses
80
 
 
90
 
91
  ```python
92
  from setfit import SetFitModel
93
+
94
  # Download from the 🤗 Hub
95
  model = SetFitModel.from_pretrained("Jorgeutd/setfit-bge-small-v1.5-sst2-50-shot")
96
  # Run inference
97
+ preds = model("it 's a bad sign in a thriller when you instantly know whodunit .")
98
  ```
99
 
100
  <!--
 
126
  ### Training Set Metrics
127
  | Training set | Min | Median | Max |
128
  |:-------------|:----|:-------|:----|
129
+ | Word count | 3 | 21.31 | 50 |
130
 
131
+ | Label | Training Sample Count |
132
+ |:------|:----------------------|
133
+ | 0 | 50 |
134
+ | 1 | 50 |
135
 
136
  ### Training Hyperparameters
137
  - batch_size: (16, 16)
 
151
  - load_best_model_at_end: False
152
 
153
  ### Training Results
154
+ | Epoch | Step | Training Loss | Validation Loss |
155
+ |:------:|:----:|:-------------:|:---------------:|
156
+ | 0.0031 | 1 | 0.2515 | - |
157
+ | 0.1567 | 50 | 0.2298 | - |
158
+ | 0.3135 | 100 | 0.2134 | - |
159
+ | 0.4702 | 150 | 0.0153 | - |
160
+ | 0.6270 | 200 | 0.0048 | - |
161
+ | 0.7837 | 250 | 0.0024 | - |
162
+ | 0.9404 | 300 | 0.0023 | - |
163
+ | 1.0972 | 350 | 0.0016 | - |
164
+ | 1.2539 | 400 | 0.0016 | - |
165
+ | 1.4107 | 450 | 0.001 | - |
166
+ | 1.5674 | 500 | 0.0013 | - |
167
+ | 1.7241 | 550 | 0.0008 | - |
168
+ | 1.8809 | 600 | 0.0008 | - |
169
+ | 2.0376 | 650 | 0.0007 | - |
170
+ | 2.1944 | 700 | 0.0008 | - |
171
+ | 2.3511 | 750 | 0.0008 | - |
172
+ | 2.5078 | 800 | 0.0007 | - |
173
+ | 2.6646 | 850 | 0.0006 | - |
174
+ | 2.8213 | 900 | 0.0006 | - |
175
+ | 2.9781 | 950 | 0.0005 | - |
176
+ | 3.1348 | 1000 | 0.0006 | - |
177
+ | 3.2915 | 1050 | 0.0006 | - |
178
+ | 3.4483 | 1100 | 0.0005 | - |
179
+ | 3.6050 | 1150 | 0.0005 | - |
180
+ | 3.7618 | 1200 | 0.0005 | - |
181
+ | 3.9185 | 1250 | 0.0005 | - |
182
+ | 4.0752 | 1300 | 0.0005 | - |
183
+ | 4.2320 | 1350 | 0.0004 | - |
184
+ | 4.3887 | 1400 | 0.0004 | - |
185
+ | 4.5455 | 1450 | 0.0004 | - |
186
+ | 4.7022 | 1500 | 0.0003 | - |
187
+ | 4.8589 | 1550 | 0.0006 | - |
188
+ | 5.0157 | 1600 | 0.0007 | - |
189
+ | 5.1724 | 1650 | 0.0004 | - |
190
+ | 5.3292 | 1700 | 0.0004 | - |
191
+ | 5.4859 | 1750 | 0.0004 | - |
192
+ | 5.6426 | 1800 | 0.0004 | - |
193
+ | 5.7994 | 1850 | 0.0003 | - |
194
+ | 5.9561 | 1900 | 0.0004 | - |
195
+ | 6.1129 | 1950 | 0.0003 | - |
196
+ | 6.2696 | 2000 | 0.0003 | - |
197
+ | 6.4263 | 2050 | 0.0005 | - |
198
+ | 6.5831 | 2100 | 0.0003 | - |
199
+ | 6.7398 | 2150 | 0.0003 | - |
200
+ | 6.8966 | 2200 | 0.0003 | - |
201
+ | 7.0533 | 2250 | 0.0003 | - |
202
+ | 7.2100 | 2300 | 0.0003 | - |
203
+ | 7.3668 | 2350 | 0.0003 | - |
204
+ | 7.5235 | 2400 | 0.0002 | - |
205
+ | 7.6803 | 2450 | 0.0003 | - |
206
+ | 7.8370 | 2500 | 0.0003 | - |
207
+ | 7.9937 | 2550 | 0.0003 | - |
208
+ | 8.1505 | 2600 | 0.0003 | - |
209
+ | 8.3072 | 2650 | 0.0003 | - |
210
+ | 8.4639 | 2700 | 0.0003 | - |
211
+ | 8.6207 | 2750 | 0.0003 | - |
212
+ | 8.7774 | 2800 | 0.0004 | - |
213
+ | 8.9342 | 2850 | 0.0002 | - |
214
+ | 9.0909 | 2900 | 0.0003 | - |
215
+ | 9.2476 | 2950 | 0.0004 | - |
216
+ | 9.4044 | 3000 | 0.0004 | - |
217
+ | 9.5611 | 3050 | 0.0003 | - |
218
+ | 9.7179 | 3100 | 0.0004 | - |
219
+ | 9.8746 | 3150 | 0.0003 | - |
220
 
221
  ### Framework Versions
222
+ - Python: 3.10.13
223
  - SetFit: 1.0.3
224
+ - Sentence Transformers: 2.6.1
225
+ - Transformers: 4.39.1
226
+ - PyTorch: 2.1.0
227
+ - Datasets: 2.18.0
228
+ - Tokenizers: 0.15.2
229
 
230
  ## Citation
231
 
 
242
  copyright = {Creative Commons Attribution 4.0 International}
243
  }
244
  ```
245
+
246
+ <!--
247
+ ## Glossary
248
+
249
+ *Clearly define terms in order to be accessible across audiences.*
250
+ -->
251
+
252
+ <!--
253
+ ## Model Card Authors
254
+
255
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
256
+ -->
257
+
258
+ <!--
259
+ ## Model Card Contact
260
+
261
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
262
+ -->
config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "BAAI/bge-small-en-v1.5",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 384,
11
+ "id2label": {
12
+ "0": "LABEL_0"
13
+ },
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 1536,
16
+ "label2id": {
17
+ "LABEL_0": 0
18
+ },
19
+ "layer_norm_eps": 1e-12,
20
+ "max_position_embeddings": 512,
21
+ "model_type": "bert",
22
+ "num_attention_heads": 12,
23
+ "num_hidden_layers": 12,
24
+ "pad_token_id": 0,
25
+ "position_embedding_type": "absolute",
26
+ "torch_dtype": "float32",
27
+ "transformers_version": "4.39.1",
28
+ "type_vocab_size": 2,
29
+ "use_cache": true,
30
+ "vocab_size": 30522
31
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "2.2.2",
4
+ "transformers": "4.28.1",
5
+ "pytorch": "1.13.0+cu117"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null
9
+ }
config_setfit.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "normalize_embeddings": false,
3
+ "labels": null
4
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4ed5ae86db9742447235984fb83c57b4660ebce9c29d81901fa05b1a37d8deeb
3
+ size 133462128
model_head.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8365e74dece1c00a9d150d662c5584ee6b7ecd3fb05c047095d7d40e2286a06a
3
+ size 3941
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": true
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "mask_token": "[MASK]",
49
+ "model_max_length": 512,
50
+ "never_split": null,
51
+ "pad_token": "[PAD]",
52
+ "sep_token": "[SEP]",
53
+ "strip_accents": null,
54
+ "tokenize_chinese_chars": true,
55
+ "tokenizer_class": "BertTokenizer",
56
+ "unk_token": "[UNK]"
57
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff