yaniseuranova
commited on
Commit
•
7656974
1
Parent(s):
6d42cc7
Add SetFit model
Browse files- README.md +30 -32
- config.json +1 -1
- config_setfit.json +3 -3
- model.safetensors +1 -1
- model_head.pkl +2 -2
README.md
CHANGED
@@ -48,7 +48,7 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
48 |
- **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)
|
49 |
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
50 |
- **Maximum Sequence Length:** 512 tokens
|
51 |
-
- **Number of Classes:**
|
52 |
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
53 |
<!-- - **Language:** Unknown -->
|
54 |
<!-- - **License:** Unknown -->
|
@@ -60,14 +60,12 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
60 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
61 |
|
62 |
### Model Labels
|
63 |
-
| Label
|
64 |
-
|
65 |
-
|
|
66 |
-
| very_lexical
|
67 |
-
|
|
68 |
-
| lexical
|
69 |
-
| lexical_queries | <ul><li>'Comment fonctionne la blockchain?'</li></ul> |
|
70 |
-
| lexical_query | <ul><li>'Who won the Nobel Peace Prize in 2021?'</li></ul> |
|
71 |
|
72 |
## Evaluation
|
73 |
|
@@ -128,12 +126,12 @@ preds = model("Comment rédiger un bon CV?")
|
|
128 |
|:-------------|:----|:-------|:----|
|
129 |
| Word count | 4 | 7.1667 | 13 |
|
130 |
|
131 |
-
| Label
|
132 |
-
|
133 |
-
|
|
134 |
-
|
|
135 |
-
|
|
136 |
-
| very_lexical
|
137 |
|
138 |
### Training Hyperparameters
|
139 |
- batch_size: (16, 16)
|
@@ -156,23 +154,23 @@ preds = model("Comment rédiger un bon CV?")
|
|
156 |
| Epoch | Step | Training Loss | Validation Loss |
|
157 |
|:-------:|:-------:|:-------------:|:---------------:|
|
158 |
| 0.0060 | 1 | 0.3581 | - |
|
159 |
-
| 0.
|
160 |
-
| 0.
|
161 |
-
| 0.
|
162 |
-
| 1.0 |
|
163 |
-
| 1.
|
164 |
-
| 1.
|
165 |
-
| 1.
|
166 |
-
| 2.0 |
|
167 |
-
| 2.
|
168 |
-
| 2.
|
169 |
-
| 2.
|
170 |
-
|
|
171 |
-
| 3.
|
172 |
-
| 3.
|
173 |
-
| 3.
|
174 |
-
| 3.
|
175 |
-
| **4.0** | **
|
176 |
|
177 |
* The bold row denotes the saved checkpoint.
|
178 |
### Framework Versions
|
|
|
48 |
- **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)
|
49 |
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
50 |
- **Maximum Sequence Length:** 512 tokens
|
51 |
+
- **Number of Classes:** 4 classes
|
52 |
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
53 |
<!-- - **Language:** Unknown -->
|
54 |
<!-- - **License:** Unknown -->
|
|
|
60 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
61 |
|
62 |
### Model Labels
|
63 |
+
| Label | Examples |
|
64 |
+
|:--------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
65 |
+
| very_semantic | <ul><li>'Quels sont les principes fondamentaux du corps humain?'</li><li>"Comment améliorer l'efficacité énergétique dans les bâtiments?"</li><li>'Combien de calories dans une pomme?'</li></ul> |
|
66 |
+
| very_lexical | <ul><li>"Quelle est la capitale de l'Italie?"</li><li>"Qui est l'auteur de '1984'?"</li><li>'What is the current unemployment rate in France?'</li></ul> |
|
67 |
+
| semantic | <ul><li>"Quels sont les avantages de l'apprentissage machine dans le secteur de la santé?"</li><li>'Comment puis-je optimiser les performances de mon site web?'</li><li>'What are the main challenges in cybersecurity?'</li></ul> |
|
68 |
+
| lexical | <ul><li>'Quel est le numéro de téléphone du service client ou du customer suport?'</li><li>'Comment fonctionne la blockchain?'</li><li>'How can I reset my user password?'</li></ul> |
|
|
|
|
|
69 |
|
70 |
## Evaluation
|
71 |
|
|
|
126 |
|:-------------|:----|:-------|:----|
|
127 |
| Word count | 4 | 7.1667 | 13 |
|
128 |
|
129 |
+
| Label | Training Sample Count |
|
130 |
+
|:--------------|:----------------------|
|
131 |
+
| very_semantic | 13 |
|
132 |
+
| semantic | 21 |
|
133 |
+
| lexical | 11 |
|
134 |
+
| very_lexical | 15 |
|
135 |
|
136 |
### Training Hyperparameters
|
137 |
- batch_size: (16, 16)
|
|
|
154 |
| Epoch | Step | Training Loss | Validation Loss |
|
155 |
|:-------:|:-------:|:-------------:|:---------------:|
|
156 |
| 0.0060 | 1 | 0.3581 | - |
|
157 |
+
| 0.3012 | 50 | 0.2063 | - |
|
158 |
+
| 0.6024 | 100 | 0.1283 | - |
|
159 |
+
| 0.9036 | 150 | 0.0083 | - |
|
160 |
+
| 1.0 | 166 | - | 0.003 |
|
161 |
+
| 1.2048 | 200 | 0.0014 | - |
|
162 |
+
| 1.5060 | 250 | 0.0008 | - |
|
163 |
+
| 1.8072 | 300 | 0.0006 | - |
|
164 |
+
| 2.0 | 332 | - | 0.0006 |
|
165 |
+
| 2.1084 | 350 | 0.0004 | - |
|
166 |
+
| 2.4096 | 400 | 0.0003 | - |
|
167 |
+
| 2.7108 | 450 | 0.0005 | - |
|
168 |
+
| 3.0 | 498 | - | 0.0004 |
|
169 |
+
| 3.0120 | 500 | 0.0003 | - |
|
170 |
+
| 3.3133 | 550 | 0.0005 | - |
|
171 |
+
| 3.6145 | 600 | 0.0003 | - |
|
172 |
+
| 3.9157 | 650 | 0.0003 | - |
|
173 |
+
| **4.0** | **664** | **-** | **0.0003** |
|
174 |
|
175 |
* The bold row denotes the saved checkpoint.
|
176 |
### Framework Versions
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "checkpoints/
|
3 |
"architectures": [
|
4 |
"MPNetModel"
|
5 |
],
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "checkpoints/step_664",
|
3 |
"architectures": [
|
4 |
"MPNetModel"
|
5 |
],
|
config_setfit.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
{
|
2 |
"labels": [
|
3 |
-
"
|
4 |
-
"
|
5 |
-
"
|
6 |
"very_lexical"
|
7 |
],
|
8 |
"normalize_embeddings": false
|
|
|
1 |
{
|
2 |
"labels": [
|
3 |
+
"very_semantic",
|
4 |
+
"semantic",
|
5 |
+
"lexical",
|
6 |
"very_lexical"
|
7 |
],
|
8 |
"normalize_embeddings": false
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 437967672
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1b53398a5e1768704556a85ff27c1d05e5391646db87372f075a3bc0d2145a0b
|
3 |
size 437967672
|
model_head.pkl
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:c8319b40498ce63d8e5868820a4e5de714d7af5a0e73cb8705a3d00f2c7f6ee4
|
3 |
+
size 25655
|