thegenerativegeneration
commited on
Commit
•
37bcb01
1
Parent(s):
11152e7
Upload 13 files
Browse files- README.md +60 -49
- config.json +1 -1
- model.safetensors +1 -1
- model_head.pkl +1 -1
- tokenizer.json +2 -2
- 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:
|
13 |
-
- text: 'query:
|
14 |
-
- text: 'query:
|
15 |
-
- text: 'query:
|
16 |
-
- text: 'query:
|
|
|
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:
|
52 |
-
| 1 | <ul><li>'query:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
|
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.
|
105 |
|
106 |
| Label | Training Sample Count |
|
107 |
|:------|:----------------------|
|
108 |
-
| 0 |
|
109 |
-
| 1 |
|
110 |
|
111 |
### Training Hyperparameters
|
112 |
- batch_size: (16, 2)
|
113 |
- num_epochs: (1, 16)
|
114 |
-
- max_steps:
|
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.
|
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:
|
128 |
|
129 |
### Training Results
|
130 |
-
| Epoch
|
131 |
-
|
132 |
-
| 0.
|
133 |
-
| 0.
|
134 |
-
| 0.
|
135 |
-
| 0.
|
136 |
-
| 0.
|
137 |
-
| 0.
|
138 |
-
| 0.
|
139 |
-
| 0.
|
140 |
-
| 0.
|
141 |
-
| 0.
|
142 |
-
| 0.
|
143 |
-
| 0.
|
144 |
-
| 0.
|
145 |
-
| 0.
|
146 |
-
| 0.
|
147 |
-
| 0.
|
148 |
-
| 0.
|
149 |
-
| 0.
|
150 |
-
| 0.
|
151 |
-
|
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 mă 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": "
|
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:
|
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:
|
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:
|
3 |
-
size
|
|
|
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 |
}
|