Add SetFit model
Browse files- 1_Pooling/config.json +7 -0
- README.md +348 -0
- config.json +24 -0
- config_sentence_transformers.json +7 -0
- config_setfit.json +4 -0
- model.safetensors +3 -0
- model_head.pkl +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +59 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 768,
|
3 |
+
"pooling_mode_cls_token": false,
|
4 |
+
"pooling_mode_mean_tokens": true,
|
5 |
+
"pooling_mode_max_tokens": false,
|
6 |
+
"pooling_mode_mean_sqrt_len_tokens": false
|
7 |
+
}
|
README.md
ADDED
@@ -0,0 +1,348 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: setfit
|
3 |
+
tags:
|
4 |
+
- setfit
|
5 |
+
- sentence-transformers
|
6 |
+
- text-classification
|
7 |
+
- generated_from_setfit_trainer
|
8 |
+
metrics:
|
9 |
+
- metric
|
10 |
+
widget:
|
11 |
+
- text: Damn, my condolences to you bro
|
12 |
+
- text: No Friday Im booked all day
|
13 |
+
- text: Im sorry.
|
14 |
+
- text: Hiding in the bush
|
15 |
+
- text: '*"The conservative party is a cult." Says the group that bans words and follows
|
16 |
+
socialism.??*'
|
17 |
+
pipeline_tag: text-classification
|
18 |
+
inference: false
|
19 |
+
base_model: sentence-transformers/paraphrase-mpnet-base-v2
|
20 |
+
model-index:
|
21 |
+
- name: SetFit with sentence-transformers/paraphrase-mpnet-base-v2
|
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: metric
|
32 |
+
value: 0.7340375623557441
|
33 |
+
name: Metric
|
34 |
+
---
|
35 |
+
|
36 |
+
# SetFit with sentence-transformers/paraphrase-mpnet-base-v2
|
37 |
+
|
38 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2) as the Sentence Transformer embedding model. A ClassifierChain instance is used for classification.
|
39 |
+
|
40 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
41 |
+
|
42 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
43 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
44 |
+
|
45 |
+
## Model Details
|
46 |
+
|
47 |
+
### Model Description
|
48 |
+
- **Model Type:** SetFit
|
49 |
+
- **Sentence Transformer body:** [sentence-transformers/paraphrase-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2)
|
50 |
+
- **Classification head:** a ClassifierChain instance
|
51 |
+
- **Maximum Sequence Length:** 512 tokens
|
52 |
+
<!-- - **Number of Classes:** Unknown -->
|
53 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
54 |
+
<!-- - **Language:** Unknown -->
|
55 |
+
<!-- - **License:** Unknown -->
|
56 |
+
|
57 |
+
### Model Sources
|
58 |
+
|
59 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
60 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
61 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
62 |
+
|
63 |
+
## Evaluation
|
64 |
+
|
65 |
+
### Metrics
|
66 |
+
| Label | Metric |
|
67 |
+
|:--------|:-------|
|
68 |
+
| **all** | 0.7340 |
|
69 |
+
|
70 |
+
## Uses
|
71 |
+
|
72 |
+
### Direct Use for Inference
|
73 |
+
|
74 |
+
First install the SetFit library:
|
75 |
+
|
76 |
+
```bash
|
77 |
+
pip install setfit
|
78 |
+
```
|
79 |
+
|
80 |
+
Then you can load this model and run inference.
|
81 |
+
|
82 |
+
```python
|
83 |
+
from setfit import SetFitModel
|
84 |
+
|
85 |
+
# Download from the 🤗 Hub
|
86 |
+
model = SetFitModel.from_pretrained("CrisisNarratives/setfit-8classes-multi_label")
|
87 |
+
# Run inference
|
88 |
+
preds = model("Im sorry.")
|
89 |
+
```
|
90 |
+
|
91 |
+
<!--
|
92 |
+
### Downstream Use
|
93 |
+
|
94 |
+
*List how someone could finetune this model on their own dataset.*
|
95 |
+
-->
|
96 |
+
|
97 |
+
<!--
|
98 |
+
### Out-of-Scope Use
|
99 |
+
|
100 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
101 |
+
-->
|
102 |
+
|
103 |
+
<!--
|
104 |
+
## Bias, Risks and Limitations
|
105 |
+
|
106 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
107 |
+
-->
|
108 |
+
|
109 |
+
<!--
|
110 |
+
### Recommendations
|
111 |
+
|
112 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
113 |
+
-->
|
114 |
+
|
115 |
+
## Training Details
|
116 |
+
|
117 |
+
### Training Set Metrics
|
118 |
+
| Training set | Min | Median | Max |
|
119 |
+
|:-------------|:----|:--------|:-----|
|
120 |
+
| Word count | 1 | 25.3789 | 1681 |
|
121 |
+
|
122 |
+
### Training Hyperparameters
|
123 |
+
- batch_size: (16, 16)
|
124 |
+
- num_epochs: (3, 3)
|
125 |
+
- max_steps: -1
|
126 |
+
- sampling_strategy: oversampling
|
127 |
+
- num_iterations: 40
|
128 |
+
- body_learning_rate: (1.752e-05, 1.752e-05)
|
129 |
+
- head_learning_rate: 1.752e-05
|
130 |
+
- loss: CosineSimilarityLoss
|
131 |
+
- distance_metric: cosine_distance
|
132 |
+
- margin: 0.25
|
133 |
+
- end_to_end: False
|
134 |
+
- use_amp: False
|
135 |
+
- warmup_proportion: 0.1
|
136 |
+
- seed: 30
|
137 |
+
- eval_max_steps: -1
|
138 |
+
- load_best_model_at_end: False
|
139 |
+
|
140 |
+
### Training Results
|
141 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
142 |
+
|:------:|:----:|:-------------:|:---------------:|
|
143 |
+
| 0.0004 | 1 | 0.4024 | - |
|
144 |
+
| 0.0185 | 50 | 0.2502 | - |
|
145 |
+
| 0.0370 | 100 | 0.2222 | - |
|
146 |
+
| 0.0555 | 150 | 0.2279 | - |
|
147 |
+
| 0.0739 | 200 | 0.2556 | - |
|
148 |
+
| 0.0924 | 250 | 0.2444 | - |
|
149 |
+
| 0.1109 | 300 | 0.2441 | - |
|
150 |
+
| 0.1294 | 350 | 0.2538 | - |
|
151 |
+
| 0.1479 | 400 | 0.2245 | - |
|
152 |
+
| 0.1664 | 450 | 0.2111 | - |
|
153 |
+
| 0.1848 | 500 | 0.1554 | - |
|
154 |
+
| 0.2033 | 550 | 0.1361 | - |
|
155 |
+
| 0.2218 | 600 | 0.1712 | - |
|
156 |
+
| 0.2403 | 650 | 0.1506 | - |
|
157 |
+
| 0.2588 | 700 | 0.1175 | - |
|
158 |
+
| 0.2773 | 750 | 0.0695 | - |
|
159 |
+
| 0.2957 | 800 | 0.0916 | - |
|
160 |
+
| 0.3142 | 850 | 0.0884 | - |
|
161 |
+
| 0.3327 | 900 | 0.0412 | - |
|
162 |
+
| 0.3512 | 950 | 0.1189 | - |
|
163 |
+
| 0.3697 | 1000 | 0.0485 | - |
|
164 |
+
| 0.3882 | 1050 | 0.1098 | - |
|
165 |
+
| 0.4067 | 1100 | 0.0303 | - |
|
166 |
+
| 0.4251 | 1150 | 0.0244 | - |
|
167 |
+
| 0.4436 | 1200 | 0.0429 | - |
|
168 |
+
| 0.4621 | 1250 | 0.034 | - |
|
169 |
+
| 0.4806 | 1300 | 0.0725 | - |
|
170 |
+
| 0.4991 | 1350 | 0.0438 | - |
|
171 |
+
| 0.5176 | 1400 | 0.0124 | - |
|
172 |
+
| 0.5360 | 1450 | 0.1603 | - |
|
173 |
+
| 0.5545 | 1500 | 0.1134 | - |
|
174 |
+
| 0.5730 | 1550 | 0.098 | - |
|
175 |
+
| 0.5915 | 1600 | 0.0343 | - |
|
176 |
+
| 0.6100 | 1650 | 0.0354 | - |
|
177 |
+
| 0.6285 | 1700 | 0.0892 | - |
|
178 |
+
| 0.6470 | 1750 | 0.0137 | - |
|
179 |
+
| 0.6654 | 1800 | 0.071 | - |
|
180 |
+
| 0.6839 | 1850 | 0.0317 | - |
|
181 |
+
| 0.7024 | 1900 | 0.0285 | - |
|
182 |
+
| 0.7209 | 1950 | 0.0311 | - |
|
183 |
+
| 0.7394 | 2000 | 0.0755 | - |
|
184 |
+
| 0.7579 | 2050 | 0.09 | - |
|
185 |
+
| 0.7763 | 2100 | 0.0565 | - |
|
186 |
+
| 0.7948 | 2150 | 0.0099 | - |
|
187 |
+
| 0.8133 | 2200 | 0.0236 | - |
|
188 |
+
| 0.8318 | 2250 | 0.0663 | - |
|
189 |
+
| 0.8503 | 2300 | 0.1391 | - |
|
190 |
+
| 0.8688 | 2350 | 0.0176 | - |
|
191 |
+
| 0.8872 | 2400 | 0.0645 | - |
|
192 |
+
| 0.9057 | 2450 | 0.0318 | - |
|
193 |
+
| 0.9242 | 2500 | 0.0186 | - |
|
194 |
+
| 0.9427 | 2550 | 0.0514 | - |
|
195 |
+
| 0.9612 | 2600 | 0.0261 | - |
|
196 |
+
| 0.9797 | 2650 | 0.0535 | - |
|
197 |
+
| 0.9982 | 2700 | 0.018 | - |
|
198 |
+
| 1.0166 | 2750 | 0.0218 | - |
|
199 |
+
| 1.0351 | 2800 | 0.0351 | - |
|
200 |
+
| 1.0536 | 2850 | 0.0704 | - |
|
201 |
+
| 1.0721 | 2900 | 0.0251 | - |
|
202 |
+
| 1.0906 | 2950 | 0.0156 | - |
|
203 |
+
| 1.1091 | 3000 | 0.0821 | - |
|
204 |
+
| 1.1275 | 3050 | 0.0273 | - |
|
205 |
+
| 1.1460 | 3100 | 0.0719 | - |
|
206 |
+
| 1.1645 | 3150 | 0.0496 | - |
|
207 |
+
| 1.1830 | 3200 | 0.0124 | - |
|
208 |
+
| 1.2015 | 3250 | 0.0576 | - |
|
209 |
+
| 1.2200 | 3300 | 0.0453 | - |
|
210 |
+
| 1.2384 | 3350 | 0.0236 | - |
|
211 |
+
| 1.2569 | 3400 | 0.013 | - |
|
212 |
+
| 1.2754 | 3450 | 0.0909 | - |
|
213 |
+
| 1.2939 | 3500 | 0.024 | - |
|
214 |
+
| 1.3124 | 3550 | 0.0264 | - |
|
215 |
+
| 1.3309 | 3600 | 0.0397 | - |
|
216 |
+
| 1.3494 | 3650 | 0.0484 | - |
|
217 |
+
| 1.3678 | 3700 | 0.0301 | - |
|
218 |
+
| 1.3863 | 3750 | 0.0512 | - |
|
219 |
+
| 1.4048 | 3800 | 0.0625 | - |
|
220 |
+
| 1.4233 | 3850 | 0.0583 | - |
|
221 |
+
| 1.4418 | 3900 | 0.0506 | - |
|
222 |
+
| 1.4603 | 3950 | 0.0561 | - |
|
223 |
+
| 1.4787 | 4000 | 0.0295 | - |
|
224 |
+
| 1.4972 | 4050 | 0.1352 | - |
|
225 |
+
| 1.5157 | 4100 | 0.0101 | - |
|
226 |
+
| 1.5342 | 4150 | 0.0221 | - |
|
227 |
+
| 1.5527 | 4200 | 0.057 | - |
|
228 |
+
| 1.5712 | 4250 | 0.0389 | - |
|
229 |
+
| 1.5896 | 4300 | 0.0173 | - |
|
230 |
+
| 1.6081 | 4350 | 0.0605 | - |
|
231 |
+
| 1.6266 | 4400 | 0.0187 | - |
|
232 |
+
| 1.6451 | 4450 | 0.0401 | - |
|
233 |
+
| 1.6636 | 4500 | 0.0571 | - |
|
234 |
+
| 1.6821 | 4550 | 0.0612 | - |
|
235 |
+
| 1.7006 | 4600 | 0.03 | - |
|
236 |
+
| 1.7190 | 4650 | 0.0299 | - |
|
237 |
+
| 1.7375 | 4700 | 0.0583 | - |
|
238 |
+
| 1.7560 | 4750 | 0.0279 | - |
|
239 |
+
| 1.7745 | 4800 | 0.027 | - |
|
240 |
+
| 1.7930 | 4850 | 0.0343 | - |
|
241 |
+
| 1.8115 | 4900 | 0.0634 | - |
|
242 |
+
| 1.8299 | 4950 | 0.0748 | - |
|
243 |
+
| 1.8484 | 5000 | 0.0699 | - |
|
244 |
+
| 1.8669 | 5050 | 0.0678 | - |
|
245 |
+
| 1.8854 | 5100 | 0.0724 | - |
|
246 |
+
| 1.9039 | 5150 | 0.0211 | - |
|
247 |
+
| 1.9224 | 5200 | 0.037 | - |
|
248 |
+
| 1.9409 | 5250 | 0.0891 | - |
|
249 |
+
| 1.9593 | 5300 | 0.0235 | - |
|
250 |
+
| 1.9778 | 5350 | 0.0339 | - |
|
251 |
+
| 1.9963 | 5400 | 0.029 | - |
|
252 |
+
| 2.0148 | 5450 | 0.1292 | - |
|
253 |
+
| 2.0333 | 5500 | 0.0457 | - |
|
254 |
+
| 2.0518 | 5550 | 0.0577 | - |
|
255 |
+
| 2.0702 | 5600 | 0.063 | - |
|
256 |
+
| 2.0887 | 5650 | 0.0198 | - |
|
257 |
+
| 2.1072 | 5700 | 0.0367 | - |
|
258 |
+
| 2.1257 | 5750 | 0.0475 | - |
|
259 |
+
| 2.1442 | 5800 | 0.0368 | - |
|
260 |
+
| 2.1627 | 5850 | 0.0401 | - |
|
261 |
+
| 2.1811 | 5900 | 0.0353 | - |
|
262 |
+
| 2.1996 | 5950 | 0.0387 | - |
|
263 |
+
| 2.2181 | 6000 | 0.0325 | - |
|
264 |
+
| 2.2366 | 6050 | 0.046 | - |
|
265 |
+
| 2.2551 | 6100 | 0.03 | - |
|
266 |
+
| 2.2736 | 6150 | 0.0338 | - |
|
267 |
+
| 2.2921 | 6200 | 0.0374 | - |
|
268 |
+
| 2.3105 | 6250 | 0.0206 | - |
|
269 |
+
| 2.3290 | 6300 | 0.031 | - |
|
270 |
+
| 2.3475 | 6350 | 0.0493 | - |
|
271 |
+
| 2.3660 | 6400 | 0.0182 | - |
|
272 |
+
| 2.3845 | 6450 | 0.0352 | - |
|
273 |
+
| 2.4030 | 6500 | 0.0622 | - |
|
274 |
+
| 2.4214 | 6550 | 0.0682 | - |
|
275 |
+
| 2.4399 | 6600 | 0.0227 | - |
|
276 |
+
| 2.4584 | 6650 | 0.0401 | - |
|
277 |
+
| 2.4769 | 6700 | 0.0348 | - |
|
278 |
+
| 2.4954 | 6750 | 0.0417 | - |
|
279 |
+
| 2.5139 | 6800 | 0.0232 | - |
|
280 |
+
| 2.5323 | 6850 | 0.0603 | - |
|
281 |
+
| 2.5508 | 6900 | 0.0981 | - |
|
282 |
+
| 2.5693 | 6950 | 0.0433 | - |
|
283 |
+
| 2.5878 | 7000 | 0.0187 | - |
|
284 |
+
| 2.6063 | 7050 | 0.0099 | - |
|
285 |
+
| 2.6248 | 7100 | 0.0276 | - |
|
286 |
+
| 2.6433 | 7150 | 0.0516 | - |
|
287 |
+
| 2.6617 | 7200 | 0.0211 | - |
|
288 |
+
| 2.6802 | 7250 | 0.0191 | - |
|
289 |
+
| 2.6987 | 7300 | 0.1152 | - |
|
290 |
+
| 2.7172 | 7350 | 0.0442 | - |
|
291 |
+
| 2.7357 | 7400 | 0.0226 | - |
|
292 |
+
| 2.7542 | 7450 | 0.0429 | - |
|
293 |
+
| 2.7726 | 7500 | 0.0313 | - |
|
294 |
+
| 2.7911 | 7550 | 0.0601 | - |
|
295 |
+
| 2.8096 | 7600 | 0.0156 | - |
|
296 |
+
| 2.8281 | 7650 | 0.039 | - |
|
297 |
+
| 2.8466 | 7700 | 0.0239 | - |
|
298 |
+
| 2.8651 | 7750 | 0.1159 | - |
|
299 |
+
| 2.8835 | 7800 | 0.0223 | - |
|
300 |
+
| 2.9020 | 7850 | 0.0442 | - |
|
301 |
+
| 2.9205 | 7900 | 0.0254 | - |
|
302 |
+
| 2.9390 | 7950 | 0.0268 | - |
|
303 |
+
| 2.9575 | 8000 | 0.0415 | - |
|
304 |
+
| 2.9760 | 8050 | 0.0235 | - |
|
305 |
+
| 2.9945 | 8100 | 0.0177 | - |
|
306 |
+
|
307 |
+
### Framework Versions
|
308 |
+
- Python: 3.9.16
|
309 |
+
- SetFit: 1.0.1
|
310 |
+
- Sentence Transformers: 2.2.2
|
311 |
+
- Transformers: 4.35.0
|
312 |
+
- PyTorch: 2.1.0+cu121
|
313 |
+
- Datasets: 2.14.6
|
314 |
+
- Tokenizers: 0.14.1
|
315 |
+
|
316 |
+
## Citation
|
317 |
+
|
318 |
+
### BibTeX
|
319 |
+
```bibtex
|
320 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
321 |
+
doi = {10.48550/ARXIV.2209.11055},
|
322 |
+
url = {https://arxiv.org/abs/2209.11055},
|
323 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
324 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
325 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
326 |
+
publisher = {arXiv},
|
327 |
+
year = {2022},
|
328 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
329 |
+
}
|
330 |
+
```
|
331 |
+
|
332 |
+
<!--
|
333 |
+
## Glossary
|
334 |
+
|
335 |
+
*Clearly define terms in order to be accessible across audiences.*
|
336 |
+
-->
|
337 |
+
|
338 |
+
<!--
|
339 |
+
## Model Card Authors
|
340 |
+
|
341 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
342 |
+
-->
|
343 |
+
|
344 |
+
<!--
|
345 |
+
## Model Card Contact
|
346 |
+
|
347 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
348 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/users/ghorbaf2/.cache/torch/sentence_transformers/sentence-transformers_paraphrase-mpnet-base-v2/",
|
3 |
+
"architectures": [
|
4 |
+
"MPNetModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"eos_token_id": 2,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-05,
|
15 |
+
"max_position_embeddings": 514,
|
16 |
+
"model_type": "mpnet",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 1,
|
20 |
+
"relative_attention_num_buckets": 32,
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.35.0",
|
23 |
+
"vocab_size": 30527
|
24 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "2.0.0",
|
4 |
+
"transformers": "4.7.0",
|
5 |
+
"pytorch": "1.9.0+cu102"
|
6 |
+
}
|
7 |
+
}
|
config_setfit.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"labels": null,
|
3 |
+
"normalize_embeddings": false
|
4 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c60cd6f8236e11a384f7febbec43cd5c86b4091c1b7ddf0411aed38360b66a7a
|
3 |
+
size 437967672
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e82210e675cbc8bf524ec34ca8a87b282256c51e55c4dab0ff4730a3ce5c2434
|
3 |
+
size 53361
|
modules.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": true,
|
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": true,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "[UNK]",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": false,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"104": {
|
28 |
+
"content": "[UNK]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"30526": {
|
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_basic_tokenize": true,
|
48 |
+
"do_lower_case": true,
|
49 |
+
"eos_token": "</s>",
|
50 |
+
"mask_token": "<mask>",
|
51 |
+
"model_max_length": 512,
|
52 |
+
"never_split": null,
|
53 |
+
"pad_token": "<pad>",
|
54 |
+
"sep_token": "</s>",
|
55 |
+
"strip_accents": null,
|
56 |
+
"tokenize_chinese_chars": true,
|
57 |
+
"tokenizer_class": "MPNetTokenizer",
|
58 |
+
"unk_token": "[UNK]"
|
59 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|