thegenerativegeneration commited on
Commit
37bcb01
1 Parent(s): 11152e7

Upload 13 files

Browse files
Files changed (6) hide show
  1. README.md +60 -49
  2. config.json +1 -1
  3. model.safetensors +1 -1
  4. model_head.pkl +1 -1
  5. tokenizer.json +2 -2
  6. tokenizer_config.json +0 -7
README.md CHANGED
@@ -9,13 +9,28 @@ base_model: intfloat/multilingual-e5-small
9
  metrics:
10
  - accuracy
11
  widget:
12
- - text: 'query: Baiklah, kita cakap lagi nanti, Mark. Selamat hari!'
13
- - text: 'query: Tôi xin lỗi nhưng tôi phải đi'
14
- - text: 'query: 次回行くときは、私を連れて行ってください。もっと自然の中で活動したいと思っています。'
15
- - text: 'query: Entschuldigung, ich muss jetzt gehen.'
16
- - text: 'query: Buenos días, ¿cómo están ustedes?'
 
17
  pipeline_tag: text-classification
18
  inference: true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  ---
20
 
21
  # SetFit with intfloat/multilingual-e5-small
@@ -46,10 +61,17 @@ The model has been trained using an efficient few-shot learning technique that i
46
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
47
 
48
  ### Model Labels
49
- | Label | Examples |
50
- |:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
51
- | 0 | <ul><li>'query: Értem. Mit csinálunk most?'</li><li>'query: Ola Luca, que tal? Rematache o traballo?'</li><li>'query: Lijepo je. Hvala.'</li></ul> |
52
- | 1 | <ul><li>'query: Жөнейін, кейін кездесеміз.'</li><li>'query: Така, ќе се видиме повторно.'</li><li>'query: ठीक है बाद में बात करते हैं मार्क अच्छा दिन'</li></ul> |
 
 
 
 
 
 
 
53
 
54
  ## Uses
55
 
@@ -69,7 +91,7 @@ from setfit import SetFitModel
69
  # Download from the 🤗 Hub
70
  model = SetFitModel.from_pretrained("setfit_model_id")
71
  # Run inference
72
- preds = model("query: Tôi xin lỗi nhưng tôi phải đi")
73
  ```
74
 
75
  <!--
@@ -101,65 +123,54 @@ preds = model("query: Tôi xin lỗi nhưng tôi phải đi")
101
  ### Training Set Metrics
102
  | Training set | Min | Median | Max |
103
  |:-------------|:----|:-------|:----|
104
- | Word count | 2 | 7.2168 | 25 |
105
 
106
  | Label | Training Sample Count |
107
  |:------|:----------------------|
108
- | 0 | 346 |
109
- | 1 | 346 |
110
 
111
  ### Training Hyperparameters
112
  - batch_size: (16, 2)
113
  - num_epochs: (1, 16)
114
- - max_steps: 1400
115
  - sampling_strategy: undersampling
116
  - body_learning_rate: (1e-05, 1e-05)
117
  - head_learning_rate: 0.001
118
  - loss: CosineSimilarityLoss
119
  - distance_metric: cosine_distance
120
- - margin: 0.05
121
  - end_to_end: False
122
  - use_amp: False
123
  - warmup_proportion: 0.1
124
  - seed: 42
125
  - run_name: multilingual-e5-small
126
  - eval_max_steps: -1
127
- - load_best_model_at_end: True
128
 
129
  ### Training Results
130
- | Epoch | Step | Training Loss | Validation Loss |
131
- |:----------:|:--------:|:-------------:|:---------------:|
132
- | 0.0004 | 1 | 0.3607 | - |
133
- | 0.0179 | 50 | 0.3254 | - |
134
- | 0.0357 | 100 | 0.2303 | 0.2049 |
135
- | 0.0536 | 150 | 0.106 | - |
136
- | 0.0714 | 200 | 0.1294 | 0.0748 |
137
- | 0.0893 | 250 | 0.087 | - |
138
- | 0.1071 | 300 | 0.0732 | 0.0787 |
139
- | 0.1250 | 350 | 0.0019 | - |
140
- | 0.1428 | 400 | 0.0027 | 0.1072 |
141
- | 0.1607 | 450 | 0.0015 | - |
142
- | 0.1785 | 500 | 0.0008 | 0.0999 |
143
- | 0.1964 | 550 | 0.0016 | - |
144
- | 0.2142 | 600 | 0.0004 | 0.1215 |
145
- | 0.2321 | 650 | 0.0012 | - |
146
- | 0.2499 | 700 | 0.0008 | 0.1267 |
147
- | 0.2678 | 750 | 0.0005 | - |
148
- | 0.2856 | 800 | 0.0003 | 0.1216 |
149
- | 0.3035 | 850 | 0.0003 | - |
150
- | 0.3213 | 900 | 0.0004 | 0.1142 |
151
- | 0.3392 | 950 | 0.0004 | - |
152
- | **0.3570** | **1000** | **0.0004** | **0.0616** |
153
- | 0.3749 | 1050 | 0.0002 | - |
154
- | 0.3927 | 1100 | 0.0004 | 0.0946 |
155
- | 0.4106 | 1150 | 0.0002 | - |
156
- | 0.4284 | 1200 | 0.0003 | 0.1091 |
157
- | 0.4463 | 1250 | 0.0002 | - |
158
- | 0.4641 | 1300 | 0.0003 | 0.1141 |
159
- | 0.4820 | 1350 | 0.0004 | - |
160
- | 0.4998 | 1400 | 0.0002 | 0.1209 |
161
-
162
- * The bold row denotes the saved checkpoint.
163
  ### Framework Versions
164
  - Python: 3.10.11
165
  - SetFit: 1.0.3
 
9
  metrics:
10
  - accuracy
11
  widget:
12
+ - text: 'query: Interessant. Hast du das schon mal ausprobiert?'
13
+ - text: 'query: はい、持っていますよ。すぐにメールで送りますね。'
14
+ - text: 'query: Va bene ci sentiamo dopo Marco buona giornata'
15
+ - text: 'query: Ζητώ συγγνώμη, πρέπει να αποχωρήσω τώρα.'
16
+ - text: 'query: Guten Morgen, Maria! Hast du die Präsentation für das Meeting heute
17
+ fertig?'
18
  pipeline_tag: text-classification
19
  inference: true
20
+ model-index:
21
+ - name: SetFit with intfloat/multilingual-e5-small
22
+ results:
23
+ - task:
24
+ type: text-classification
25
+ name: Text Classification
26
+ dataset:
27
+ name: Unknown
28
+ type: unknown
29
+ split: test
30
+ metrics:
31
+ - type: accuracy
32
+ value: 0.9333333333333333
33
+ name: Accuracy
34
  ---
35
 
36
  # SetFit with intfloat/multilingual-e5-small
 
61
  - **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
62
 
63
  ### Model Labels
64
+ | Label | Examples |
65
+ |:------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
66
+ | 0 | <ul><li>'query: สวัสดีค่ะ วันนี้เป็นอย่างไรบ้าง?'</li><li>'query: Jag förstår. Vad tycker du att vi ska göra nu?'</li><li>'query: Hej, wszystko w porządku. Właśnie dostałam nową pracę.'</li></ul> |
67
+ | 1 | <ul><li>'query: Чудесно, доскоро!'</li><li>'query: Mama cheamă, trebuie să mă întorc acasă, pa.'</li><li>'query: Perdó, ja he de marxar.'</li></ul> |
68
+
69
+ ## Evaluation
70
+
71
+ ### Metrics
72
+ | Label | Accuracy |
73
+ |:--------|:---------|
74
+ | **all** | 0.9333 |
75
 
76
  ## Uses
77
 
 
91
  # Download from the 🤗 Hub
92
  model = SetFitModel.from_pretrained("setfit_model_id")
93
  # Run inference
94
+ preds = model("query: はい、持っていますよ。すぐにメールで送りますね。")
95
  ```
96
 
97
  <!--
 
123
  ### Training Set Metrics
124
  | Training set | Min | Median | Max |
125
  |:-------------|:----|:-------|:----|
126
+ | Word count | 2 | 7.3663 | 21 |
127
 
128
  | Label | Training Sample Count |
129
  |:------|:----------------------|
130
+ | 0 | 286 |
131
+ | 1 | 290 |
132
 
133
  ### Training Hyperparameters
134
  - batch_size: (16, 2)
135
  - num_epochs: (1, 16)
136
+ - max_steps: 900
137
  - sampling_strategy: undersampling
138
  - body_learning_rate: (1e-05, 1e-05)
139
  - head_learning_rate: 0.001
140
  - loss: CosineSimilarityLoss
141
  - distance_metric: cosine_distance
142
+ - margin: 0.1
143
  - end_to_end: False
144
  - use_amp: False
145
  - warmup_proportion: 0.1
146
  - seed: 42
147
  - run_name: multilingual-e5-small
148
  - eval_max_steps: -1
149
+ - load_best_model_at_end: False
150
 
151
  ### Training Results
152
+ | Epoch | Step | Training Loss | Validation Loss |
153
+ |:------:|:----:|:-------------:|:---------------:|
154
+ | 0.0006 | 1 | 0.3683 | - |
155
+ | 0.0278 | 50 | 0.2855 | - |
156
+ | 0.0555 | 100 | 0.1691 | 0.1598 |
157
+ | 0.0833 | 150 | 0.0339 | - |
158
+ | 0.1110 | 200 | 0.0134 | 0.0745 |
159
+ | 0.1388 | 250 | 0.0309 | - |
160
+ | 0.1666 | 300 | 0.0076 | 0.0344 |
161
+ | 0.1943 | 350 | 0.0023 | - |
162
+ | 0.2221 | 400 | 0.0012 | 0.0849 |
163
+ | 0.2499 | 450 | 0.0007 | - |
164
+ | 0.2776 | 500 | 0.0008 | 0.0932 |
165
+ | 0.3054 | 550 | 0.0005 | - |
166
+ | 0.3331 | 600 | 0.0005 | 0.0805 |
167
+ | 0.3609 | 650 | 0.0004 | - |
168
+ | 0.3887 | 700 | 0.0006 | 0.0951 |
169
+ | 0.4164 | 750 | 0.0006 | - |
170
+ | 0.4442 | 800 | 0.0016 | 0.0983 |
171
+ | 0.4720 | 850 | 0.0008 | - |
172
+ | 0.4997 | 900 | 0.0005 | 0.092 |
173
+
 
 
 
 
 
 
 
 
 
 
 
174
  ### Framework Versions
175
  - Python: 3.10.11
176
  - SetFit: 1.0.3
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "checkpoints/step_1000",
3
  "architectures": [
4
  "BertModel"
5
  ],
 
1
  {
2
+ "_name_or_path": "intfloat/multilingual-e5-small",
3
  "architectures": [
4
  "BertModel"
5
  ],
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:27c89f801f10bb9afe5e4f308a41a0d7492b8725340318de1847eec8f6b84cf1
3
  size 470637416
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee129ffbb039e468d217b93891bd4d7fb59fc6cb127dba8a76b3a0c9ca261203
3
  size 470637416
model_head.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0b054fef0d715653a0dba9374d17ce2d5fa1a3fb6560f2768740890da80a0321
3
  size 4608
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df99fc1c0b63c98daf8f7d2ba317bcf6e7a91658fd8942d6f7028ae034ecb4d0
3
  size 4608
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:55ce1a4600af70b33f5a7fba12dbb41a504d3c08737c9b26b5e7fd6e437a9a23
3
- size 17083087
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:45b6ee00bc5023ac454b82c372ebe14b27866fa471b6dbb0d24e09b12909a1f4
3
+ size 17083075
tokenizer_config.json CHANGED
@@ -46,17 +46,10 @@
46
  "cls_token": "<s>",
47
  "eos_token": "</s>",
48
  "mask_token": "<mask>",
49
- "max_length": 512,
50
  "model_max_length": 512,
51
- "pad_to_multiple_of": null,
52
  "pad_token": "<pad>",
53
- "pad_token_type_id": 0,
54
- "padding_side": "right",
55
  "sep_token": "</s>",
56
  "sp_model_kwargs": {},
57
- "stride": 0,
58
  "tokenizer_class": "XLMRobertaTokenizer",
59
- "truncation_side": "right",
60
- "truncation_strategy": "longest_first",
61
  "unk_token": "<unk>"
62
  }
 
46
  "cls_token": "<s>",
47
  "eos_token": "</s>",
48
  "mask_token": "<mask>",
 
49
  "model_max_length": 512,
 
50
  "pad_token": "<pad>",
 
 
51
  "sep_token": "</s>",
52
  "sp_model_kwargs": {},
 
53
  "tokenizer_class": "XLMRobertaTokenizer",
 
 
54
  "unk_token": "<unk>"
55
  }