Chernoffface commited on
Commit
587080c
1 Parent(s): 00a00e5

Add SetFit model

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ unigram.json filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -5,7 +5,7 @@ tags:
5
  - sentence-transformers
6
  - text-classification
7
  - generated_from_setfit_trainer
8
- base_model: sentence-transformers/paraphrase-MiniLM-L6-v2
9
  metrics:
10
  - accuracy
11
  widget:
@@ -96,9 +96,9 @@ pipeline_tag: text-classification
96
  inference: false
97
  ---
98
 
99
- # SetFit with sentence-transformers/paraphrase-MiniLM-L6-v2
100
 
101
- This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/paraphrase-MiniLM-L6-v2) as the Sentence Transformer embedding model. A OneVsRestClassifier instance is used for classification.
102
 
103
  The model has been trained using an efficient few-shot learning technique that involves:
104
 
@@ -109,7 +109,7 @@ The model has been trained using an efficient few-shot learning technique that i
109
 
110
  ### Model Description
111
  - **Model Type:** SetFit
112
- - **Sentence Transformer body:** [sentence-transformers/paraphrase-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/paraphrase-MiniLM-L6-v2)
113
  - **Classification head:** a OneVsRestClassifier instance
114
  - **Maximum Sequence Length:** 128 tokens
115
  <!-- - **Number of Classes:** Unknown -->
@@ -177,7 +177,7 @@ preds = model("Mitarbeit am wissenschaftlichen Arbeitsplatz (LV0125)")
177
 
178
  ### Training Hyperparameters
179
  - batch_size: (16, 16)
180
- - num_epochs: (1, 1)
181
  - max_steps: -1
182
  - sampling_strategy: oversampling
183
  - num_iterations: 20
@@ -197,25 +197,43 @@ preds = model("Mitarbeit am wissenschaftlichen Arbeitsplatz (LV0125)")
197
  ### Training Results
198
  | Epoch | Step | Training Loss | Validation Loss |
199
  |:------:|:----:|:-------------:|:---------------:|
200
- | 0.0011 | 1 | 0.2952 | - |
201
- | 0.0552 | 50 | 0.2217 | - |
202
- | 0.1105 | 100 | 0.1748 | - |
203
- | 0.1657 | 150 | 0.15 | - |
204
- | 0.2210 | 200 | 0.1397 | - |
205
- | 0.2762 | 250 | 0.1241 | - |
206
- | 0.3315 | 300 | 0.1208 | - |
207
- | 0.3867 | 350 | 0.1128 | - |
208
- | 0.4420 | 400 | 0.1044 | - |
209
- | 0.4972 | 450 | 0.1121 | - |
210
- | 0.5525 | 500 | 0.106 | - |
211
- | 0.6077 | 550 | 0.1069 | - |
212
- | 0.6630 | 600 | 0.098 | - |
213
- | 0.7182 | 650 | 0.0921 | - |
214
- | 0.7735 | 700 | 0.0986 | - |
215
- | 0.8287 | 750 | 0.0838 | - |
216
- | 0.8840 | 800 | 0.091 | - |
217
- | 0.9392 | 850 | 0.0934 | - |
218
- | 0.9945 | 900 | 0.0954 | - |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
 
220
  ### Framework Versions
221
  - Python: 3.12.3
 
5
  - sentence-transformers
6
  - text-classification
7
  - generated_from_setfit_trainer
8
+ base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
9
  metrics:
10
  - accuracy
11
  widget:
 
96
  inference: false
97
  ---
98
 
99
+ # SetFit with sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
100
 
101
+ This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) as the Sentence Transformer embedding model. A OneVsRestClassifier instance is used for classification.
102
 
103
  The model has been trained using an efficient few-shot learning technique that involves:
104
 
 
109
 
110
  ### Model Description
111
  - **Model Type:** SetFit
112
+ - **Sentence Transformer body:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2)
113
  - **Classification head:** a OneVsRestClassifier instance
114
  - **Maximum Sequence Length:** 128 tokens
115
  <!-- - **Number of Classes:** Unknown -->
 
177
 
178
  ### Training Hyperparameters
179
  - batch_size: (16, 16)
180
+ - num_epochs: (2, 2)
181
  - max_steps: -1
182
  - sampling_strategy: oversampling
183
  - num_iterations: 20
 
197
  ### Training Results
198
  | Epoch | Step | Training Loss | Validation Loss |
199
  |:------:|:----:|:-------------:|:---------------:|
200
+ | 0.0011 | 1 | 0.2964 | - |
201
+ | 0.0552 | 50 | 0.2042 | - |
202
+ | 0.1105 | 100 | 0.1643 | - |
203
+ | 0.1657 | 150 | 0.1376 | - |
204
+ | 0.2210 | 200 | 0.1232 | - |
205
+ | 0.2762 | 250 | 0.1125 | - |
206
+ | 0.3315 | 300 | 0.1079 | - |
207
+ | 0.3867 | 350 | 0.0951 | - |
208
+ | 0.4420 | 400 | 0.0847 | - |
209
+ | 0.4972 | 450 | 0.0917 | - |
210
+ | 0.5525 | 500 | 0.085 | - |
211
+ | 0.6077 | 550 | 0.0758 | - |
212
+ | 0.6630 | 600 | 0.0743 | - |
213
+ | 0.7182 | 650 | 0.0671 | - |
214
+ | 0.7735 | 700 | 0.0743 | - |
215
+ | 0.8287 | 750 | 0.0571 | - |
216
+ | 0.8840 | 800 | 0.0625 | - |
217
+ | 0.9392 | 850 | 0.0607 | - |
218
+ | 0.9945 | 900 | 0.0686 | - |
219
+ | 1.0497 | 950 | 0.0541 | - |
220
+ | 1.1050 | 1000 | 0.0553 | - |
221
+ | 1.1602 | 1050 | 0.0565 | - |
222
+ | 1.2155 | 1100 | 0.0558 | - |
223
+ | 1.2707 | 1150 | 0.0578 | - |
224
+ | 1.3260 | 1200 | 0.0525 | - |
225
+ | 1.3812 | 1250 | 0.0541 | - |
226
+ | 1.4365 | 1300 | 0.049 | - |
227
+ | 1.4917 | 1350 | 0.0485 | - |
228
+ | 1.5470 | 1400 | 0.0475 | - |
229
+ | 1.6022 | 1450 | 0.0479 | - |
230
+ | 1.6575 | 1500 | 0.0514 | - |
231
+ | 1.7127 | 1550 | 0.0509 | - |
232
+ | 1.7680 | 1600 | 0.0517 | - |
233
+ | 1.8232 | 1650 | 0.0455 | - |
234
+ | 1.8785 | 1700 | 0.0493 | - |
235
+ | 1.9337 | 1750 | 0.0501 | - |
236
+ | 1.9890 | 1800 | 0.0492 | - |
237
 
238
  ### Framework Versions
239
  - Python: 3.12.3
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "sentence-transformers/paraphrase-MiniLM-L6-v2",
3
  "architectures": [
4
  "BertModel"
5
  ],
@@ -15,12 +15,12 @@
15
  "max_position_embeddings": 512,
16
  "model_type": "bert",
17
  "num_attention_heads": 12,
18
- "num_hidden_layers": 6,
19
  "pad_token_id": 0,
20
  "position_embedding_type": "absolute",
21
  "torch_dtype": "float32",
22
  "transformers_version": "4.43.1",
23
  "type_vocab_size": 2,
24
  "use_cache": true,
25
- "vocab_size": 30522
26
  }
 
1
  {
2
+ "_name_or_path": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
3
  "architectures": [
4
  "BertModel"
5
  ],
 
15
  "max_position_embeddings": 512,
16
  "model_type": "bert",
17
  "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
  "pad_token_id": 0,
20
  "position_embedding_type": "absolute",
21
  "torch_dtype": "float32",
22
  "transformers_version": "4.43.1",
23
  "type_vocab_size": 2,
24
  "use_cache": true,
25
+ "vocab_size": 250037
26
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:94453a28695f826bd7955817136533b0d3cd57f03a9f4b5907b986b8d419d207
3
- size 90864192
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:42e2383eb5474eed20c60c6a3fad5e648145652feb7e0764fbec3bdb0749421a
3
+ size 470637416
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e0a432ee29f7090fa5a16b651ad4b4773ae8eecf202bb18dc4b5f0bfa5051115
3
  size 21396
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:480e709d8a111a96f8c6ae0719ba08c423e620951ab490a55a242b2022be5623
3
  size 21396
special_tokens_map.json CHANGED
@@ -1,34 +1,48 @@
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,
 
1
  {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
  "cls_token": {
10
+ "content": "<s>",
11
  "lstrip": false,
12
  "normalized": false,
13
  "rstrip": false,
14
  "single_word": false
15
  },
16
+ "eos_token": {
17
+ "content": "</s>",
18
  "lstrip": false,
19
  "normalized": false,
20
  "rstrip": false,
21
  "single_word": false
22
  },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
  "pad_token": {
31
+ "content": "<pad>",
32
  "lstrip": false,
33
  "normalized": false,
34
  "rstrip": false,
35
  "single_word": false
36
  },
37
  "sep_token": {
38
+ "content": "</s>",
39
  "lstrip": false,
40
  "normalized": false,
41
  "rstrip": false,
42
  "single_word": false
43
  },
44
  "unk_token": {
45
+ "content": "<unk>",
46
  "lstrip": false,
47
  "normalized": false,
48
  "rstrip": false,
tokenizer.json CHANGED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json CHANGED
@@ -1,57 +1,64 @@
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": 128,
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
  }
 
1
  {
2
  "added_tokens_decoder": {
3
  "0": {
4
+ "content": "<s>",
5
  "lstrip": false,
6
  "normalized": false,
7
  "rstrip": false,
8
  "single_word": false,
9
  "special": true
10
  },
11
+ "1": {
12
+ "content": "<pad>",
13
  "lstrip": false,
14
  "normalized": false,
15
  "rstrip": false,
16
  "single_word": false,
17
  "special": true
18
  },
19
+ "2": {
20
+ "content": "</s>",
21
  "lstrip": false,
22
  "normalized": false,
23
  "rstrip": false,
24
  "single_word": false,
25
  "special": true
26
  },
27
+ "3": {
28
+ "content": "<unk>",
29
  "lstrip": false,
30
  "normalized": false,
31
  "rstrip": false,
32
  "single_word": false,
33
  "special": true
34
  },
35
+ "250001": {
36
+ "content": "<mask>",
37
+ "lstrip": true,
38
  "normalized": false,
39
  "rstrip": false,
40
  "single_word": false,
41
  "special": true
42
  }
43
  },
44
+ "bos_token": "<s>",
45
  "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
 
47
  "do_lower_case": true,
48
+ "eos_token": "</s>",
49
+ "mask_token": "<mask>",
50
+ "max_length": 128,
51
  "model_max_length": 128,
52
+ "pad_to_multiple_of": null,
53
+ "pad_token": "<pad>",
54
+ "pad_token_type_id": 0,
55
+ "padding_side": "right",
56
+ "sep_token": "</s>",
57
+ "stride": 0,
58
  "strip_accents": null,
59
  "tokenize_chinese_chars": true,
60
  "tokenizer_class": "BertTokenizer",
61
+ "truncation_side": "right",
62
+ "truncation_strategy": "longest_first",
63
+ "unk_token": "<unk>"
64
  }
unigram.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d
3
+ size 14763260