saraestevez
commited on
Commit
•
bad9d05
1
Parent(s):
4fa3e8a
Add SetFit model
Browse files- .gitattributes +2 -0
- 1_Pooling/config.json +10 -0
- README.md +300 -0
- config.json +26 -0
- config_sentence_transformers.json +9 -0
- config_setfit.json +7 -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 +3 -0
- tokenizer_config.json +64 -0
- unigram.json +3 -0
.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
|
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 384,
|
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 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
ADDED
@@ -0,0 +1,300 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
3 |
+
library_name: setfit
|
4 |
+
metrics:
|
5 |
+
- accuracy
|
6 |
+
pipeline_tag: text-classification
|
7 |
+
tags:
|
8 |
+
- setfit
|
9 |
+
- sentence-transformers
|
10 |
+
- text-classification
|
11 |
+
- generated_from_setfit_trainer
|
12 |
+
widget:
|
13 |
+
- text: Para saber si un negocio va a funcionar, es necesario realizar un estudio
|
14 |
+
de mercado, valorar la economía local durante un año, considerar la afluencia
|
15 |
+
de personas y la ubicación, así como determinar el tamaño de la inversión.
|
16 |
+
- text: Apoyo la opinión de Tyrexito y también reclamo al Banco Sabadell por sus comisiones.
|
17 |
+
- text: Los resultados del Banco Sabadell impulsan al IBEX 35.
|
18 |
+
- text: Aunque no pude retirar el bono de festividad en el cajero, ING y AKBANK rechazaron
|
19 |
+
mis quejas, pero tras anunciar una denuncia, me transfirieron el dinero en una
|
20 |
+
hora; si tienes razón, no te rindas.
|
21 |
+
- text: El Gobierno presentará al nuevo gobernador del Banco de España en una Comisión
|
22 |
+
del Congreso este jueves.
|
23 |
+
inference: true
|
24 |
+
model-index:
|
25 |
+
- name: SetFit with sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
26 |
+
results:
|
27 |
+
- task:
|
28 |
+
type: text-classification
|
29 |
+
name: Text Classification
|
30 |
+
dataset:
|
31 |
+
name: Unknown
|
32 |
+
type: unknown
|
33 |
+
split: test
|
34 |
+
metrics:
|
35 |
+
- type: accuracy
|
36 |
+
value: 0.7739130434782608
|
37 |
+
name: Accuracy
|
38 |
+
---
|
39 |
+
|
40 |
+
# SetFit with sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
41 |
+
|
42 |
+
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 [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance is used for classification.
|
43 |
+
|
44 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
45 |
+
|
46 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
47 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
48 |
+
|
49 |
+
## Model Details
|
50 |
+
|
51 |
+
### Model Description
|
52 |
+
- **Model Type:** SetFit
|
53 |
+
- **Sentence Transformer body:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2)
|
54 |
+
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
55 |
+
- **Maximum Sequence Length:** 128 tokens
|
56 |
+
- **Number of Classes:** 2 classes
|
57 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
58 |
+
<!-- - **Language:** Unknown -->
|
59 |
+
<!-- - **License:** Unknown -->
|
60 |
+
|
61 |
+
### Model Sources
|
62 |
+
|
63 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
64 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
65 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
66 |
+
|
67 |
+
### Model Labels
|
68 |
+
| Label | Examples |
|
69 |
+
|:---------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
70 |
+
| relevant | <ul><li>'Nuevo caso de phishing relacionado con Abanca, registrado el 23 de julio de 2024, con la URL: /www.inicio-abanca.com/es/WELE200M_Logon_Ini.aspx.'</li><li>'Una alumna que trabajó en Bancomer reveló un esquema de robo en el que dos cajeros afirmaban que un cliente había depositado mil pesos en un pago de dos mil y se quedaban con la mitad cada uno.'</li><li>'Las previsiones de crecimiento de España para 2024 han mejorado según diversas organizaciones, con estimaciones que oscilan entre el 1,8% y el 2,4%, impulsadas por turismo, exportaciones y trabajadores extranjeros.'</li></ul> |
|
71 |
+
| discard | <ul><li>'Banco Santander ofrece una cuenta en línea sin comisiones y un bono de 400€ por domiciliar tu nómina.'</li><li>'El BBVA fue el banco que peor me trató al tener que contratar productos innecesarios para conseguir mi primera hipoteca de funcionario.'</li><li>'CaixaBank se destaca como líder del sector bancario gracias a su sólido crecimiento y eficiencia operativa, convirtiéndose en una opción atractiva para inversores.'</li></ul> |
|
72 |
+
|
73 |
+
## Evaluation
|
74 |
+
|
75 |
+
### Metrics
|
76 |
+
| Label | Accuracy |
|
77 |
+
|:--------|:---------|
|
78 |
+
| **all** | 0.7739 |
|
79 |
+
|
80 |
+
## Uses
|
81 |
+
|
82 |
+
### Direct Use for Inference
|
83 |
+
|
84 |
+
First install the SetFit library:
|
85 |
+
|
86 |
+
```bash
|
87 |
+
pip install setfit
|
88 |
+
```
|
89 |
+
|
90 |
+
Then you can load this model and run inference.
|
91 |
+
|
92 |
+
```python
|
93 |
+
from setfit import SetFitModel
|
94 |
+
|
95 |
+
# Download from the 🤗 Hub
|
96 |
+
model = SetFitModel.from_pretrained("saraestevez/setfit-minilm-bank-tweets-processed-200")
|
97 |
+
# Run inference
|
98 |
+
preds = model("Los resultados del Banco Sabadell impulsan al IBEX 35.")
|
99 |
+
```
|
100 |
+
|
101 |
+
<!--
|
102 |
+
### Downstream Use
|
103 |
+
|
104 |
+
*List how someone could finetune this model on their own dataset.*
|
105 |
+
-->
|
106 |
+
|
107 |
+
<!--
|
108 |
+
### Out-of-Scope Use
|
109 |
+
|
110 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
111 |
+
-->
|
112 |
+
|
113 |
+
<!--
|
114 |
+
## Bias, Risks and Limitations
|
115 |
+
|
116 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
117 |
+
-->
|
118 |
+
|
119 |
+
<!--
|
120 |
+
### Recommendations
|
121 |
+
|
122 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
123 |
+
-->
|
124 |
+
|
125 |
+
## Training Details
|
126 |
+
|
127 |
+
### Training Set Metrics
|
128 |
+
| Training set | Min | Median | Max |
|
129 |
+
|:-------------|:----|:--------|:----|
|
130 |
+
| Word count | 1 | 21.3275 | 41 |
|
131 |
+
|
132 |
+
| Label | Training Sample Count |
|
133 |
+
|:---------|:----------------------|
|
134 |
+
| discard | 200 |
|
135 |
+
| relevant | 200 |
|
136 |
+
|
137 |
+
### Training Hyperparameters
|
138 |
+
- batch_size: (16, 2)
|
139 |
+
- num_epochs: (1, 16)
|
140 |
+
- max_steps: -1
|
141 |
+
- sampling_strategy: oversampling
|
142 |
+
- body_learning_rate: (2e-05, 1e-05)
|
143 |
+
- head_learning_rate: 0.01
|
144 |
+
- loss: CosineSimilarityLoss
|
145 |
+
- distance_metric: cosine_distance
|
146 |
+
- margin: 0.25
|
147 |
+
- end_to_end: False
|
148 |
+
- use_amp: False
|
149 |
+
- warmup_proportion: 0.1
|
150 |
+
- seed: 42
|
151 |
+
- eval_max_steps: -1
|
152 |
+
- load_best_model_at_end: False
|
153 |
+
|
154 |
+
### Training Results
|
155 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
156 |
+
|:------:|:----:|:-------------:|:---------------:|
|
157 |
+
| 0.0002 | 1 | 0.4199 | - |
|
158 |
+
| 0.0100 | 50 | 0.3357 | - |
|
159 |
+
| 0.0199 | 100 | 0.3198 | - |
|
160 |
+
| 0.0299 | 150 | 0.2394 | - |
|
161 |
+
| 0.0398 | 200 | 0.2411 | - |
|
162 |
+
| 0.0498 | 250 | 0.2277 | - |
|
163 |
+
| 0.0597 | 300 | 0.1876 | - |
|
164 |
+
| 0.0697 | 350 | 0.1481 | - |
|
165 |
+
| 0.0796 | 400 | 0.1533 | - |
|
166 |
+
| 0.0896 | 450 | 0.0145 | - |
|
167 |
+
| 0.0995 | 500 | 0.0113 | - |
|
168 |
+
| 0.1095 | 550 | 0.0045 | - |
|
169 |
+
| 0.1194 | 600 | 0.0201 | - |
|
170 |
+
| 0.1294 | 650 | 0.0008 | - |
|
171 |
+
| 0.1393 | 700 | 0.0003 | - |
|
172 |
+
| 0.1493 | 750 | 0.0003 | - |
|
173 |
+
| 0.1592 | 800 | 0.0003 | - |
|
174 |
+
| 0.1692 | 850 | 0.0001 | - |
|
175 |
+
| 0.1791 | 900 | 0.0001 | - |
|
176 |
+
| 0.1891 | 950 | 0.0001 | - |
|
177 |
+
| 0.1990 | 1000 | 0.0001 | - |
|
178 |
+
| 0.2090 | 1050 | 0.0001 | - |
|
179 |
+
| 0.2189 | 1100 | 0.0002 | - |
|
180 |
+
| 0.2289 | 1150 | 0.0001 | - |
|
181 |
+
| 0.2388 | 1200 | 0.0001 | - |
|
182 |
+
| 0.2488 | 1250 | 0.0001 | - |
|
183 |
+
| 0.2587 | 1300 | 0.0 | - |
|
184 |
+
| 0.2687 | 1350 | 0.0001 | - |
|
185 |
+
| 0.2786 | 1400 | 0.0001 | - |
|
186 |
+
| 0.2886 | 1450 | 0.0001 | - |
|
187 |
+
| 0.2985 | 1500 | 0.0 | - |
|
188 |
+
| 0.3085 | 1550 | 0.0001 | - |
|
189 |
+
| 0.3184 | 1600 | 0.0 | - |
|
190 |
+
| 0.3284 | 1650 | 0.0 | - |
|
191 |
+
| 0.3383 | 1700 | 0.0 | - |
|
192 |
+
| 0.3483 | 1750 | 0.0001 | - |
|
193 |
+
| 0.3582 | 1800 | 0.0 | - |
|
194 |
+
| 0.3682 | 1850 | 0.0 | - |
|
195 |
+
| 0.3781 | 1900 | 0.0 | - |
|
196 |
+
| 0.3881 | 1950 | 0.0 | - |
|
197 |
+
| 0.3980 | 2000 | 0.0 | - |
|
198 |
+
| 0.4080 | 2050 | 0.0 | - |
|
199 |
+
| 0.4179 | 2100 | 0.0 | - |
|
200 |
+
| 0.4279 | 2150 | 0.0 | - |
|
201 |
+
| 0.4378 | 2200 | 0.0 | - |
|
202 |
+
| 0.4478 | 2250 | 0.0 | - |
|
203 |
+
| 0.4577 | 2300 | 0.0 | - |
|
204 |
+
| 0.4677 | 2350 | 0.0 | - |
|
205 |
+
| 0.4776 | 2400 | 0.0 | - |
|
206 |
+
| 0.4876 | 2450 | 0.0 | - |
|
207 |
+
| 0.4975 | 2500 | 0.0 | - |
|
208 |
+
| 0.5075 | 2550 | 0.0 | - |
|
209 |
+
| 0.5174 | 2600 | 0.0 | - |
|
210 |
+
| 0.5274 | 2650 | 0.0 | - |
|
211 |
+
| 0.5373 | 2700 | 0.0 | - |
|
212 |
+
| 0.5473 | 2750 | 0.0 | - |
|
213 |
+
| 0.5572 | 2800 | 0.0 | - |
|
214 |
+
| 0.5672 | 2850 | 0.0 | - |
|
215 |
+
| 0.5771 | 2900 | 0.0 | - |
|
216 |
+
| 0.5871 | 2950 | 0.0 | - |
|
217 |
+
| 0.5970 | 3000 | 0.0 | - |
|
218 |
+
| 0.6070 | 3050 | 0.0 | - |
|
219 |
+
| 0.6169 | 3100 | 0.0 | - |
|
220 |
+
| 0.6269 | 3150 | 0.0 | - |
|
221 |
+
| 0.6368 | 3200 | 0.0 | - |
|
222 |
+
| 0.6468 | 3250 | 0.0 | - |
|
223 |
+
| 0.6567 | 3300 | 0.0 | - |
|
224 |
+
| 0.6667 | 3350 | 0.0 | - |
|
225 |
+
| 0.6766 | 3400 | 0.0 | - |
|
226 |
+
| 0.6866 | 3450 | 0.0 | - |
|
227 |
+
| 0.6965 | 3500 | 0.0 | - |
|
228 |
+
| 0.7065 | 3550 | 0.0 | - |
|
229 |
+
| 0.7164 | 3600 | 0.0 | - |
|
230 |
+
| 0.7264 | 3650 | 0.0 | - |
|
231 |
+
| 0.7363 | 3700 | 0.0 | - |
|
232 |
+
| 0.7463 | 3750 | 0.0 | - |
|
233 |
+
| 0.7562 | 3800 | 0.0 | - |
|
234 |
+
| 0.7662 | 3850 | 0.0 | - |
|
235 |
+
| 0.7761 | 3900 | 0.0 | - |
|
236 |
+
| 0.7861 | 3950 | 0.0 | - |
|
237 |
+
| 0.7960 | 4000 | 0.0 | - |
|
238 |
+
| 0.8060 | 4050 | 0.0 | - |
|
239 |
+
| 0.8159 | 4100 | 0.0 | - |
|
240 |
+
| 0.8259 | 4150 | 0.0 | - |
|
241 |
+
| 0.8358 | 4200 | 0.0 | - |
|
242 |
+
| 0.8458 | 4250 | 0.0 | - |
|
243 |
+
| 0.8557 | 4300 | 0.0 | - |
|
244 |
+
| 0.8657 | 4350 | 0.0 | - |
|
245 |
+
| 0.8756 | 4400 | 0.0 | - |
|
246 |
+
| 0.8856 | 4450 | 0.0 | - |
|
247 |
+
| 0.8955 | 4500 | 0.0 | - |
|
248 |
+
| 0.9055 | 4550 | 0.0 | - |
|
249 |
+
| 0.9154 | 4600 | 0.0 | - |
|
250 |
+
| 0.9254 | 4650 | 0.0 | - |
|
251 |
+
| 0.9353 | 4700 | 0.0 | - |
|
252 |
+
| 0.9453 | 4750 | 0.0 | - |
|
253 |
+
| 0.9552 | 4800 | 0.0 | - |
|
254 |
+
| 0.9652 | 4850 | 0.0 | - |
|
255 |
+
| 0.9751 | 4900 | 0.0 | - |
|
256 |
+
| 0.9851 | 4950 | 0.0 | - |
|
257 |
+
| 0.9950 | 5000 | 0.0 | - |
|
258 |
+
|
259 |
+
### Framework Versions
|
260 |
+
- Python: 3.11.0rc1
|
261 |
+
- SetFit: 1.0.3
|
262 |
+
- Sentence Transformers: 2.7.0
|
263 |
+
- Transformers: 4.39.0
|
264 |
+
- PyTorch: 2.3.1+cu121
|
265 |
+
- Datasets: 2.19.1
|
266 |
+
- Tokenizers: 0.15.2
|
267 |
+
|
268 |
+
## Citation
|
269 |
+
|
270 |
+
### BibTeX
|
271 |
+
```bibtex
|
272 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
273 |
+
doi = {10.48550/ARXIV.2209.11055},
|
274 |
+
url = {https://arxiv.org/abs/2209.11055},
|
275 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
276 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
277 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
278 |
+
publisher = {arXiv},
|
279 |
+
year = {2022},
|
280 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
281 |
+
}
|
282 |
+
```
|
283 |
+
|
284 |
+
<!--
|
285 |
+
## Glossary
|
286 |
+
|
287 |
+
*Clearly define terms in order to be accessible across audiences.*
|
288 |
+
-->
|
289 |
+
|
290 |
+
<!--
|
291 |
+
## Model Card Authors
|
292 |
+
|
293 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
294 |
+
-->
|
295 |
+
|
296 |
+
<!--
|
297 |
+
## Model Card Contact
|
298 |
+
|
299 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
300 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 384,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 1536,
|
14 |
+
"layer_norm_eps": 1e-12,
|
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.39.0",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 250037
|
26 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "2.0.0",
|
4 |
+
"transformers": "4.7.0",
|
5 |
+
"pytorch": "1.9.0+cu102"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null
|
9 |
+
}
|
config_setfit.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"labels": [
|
3 |
+
"discard",
|
4 |
+
"relevant"
|
5 |
+
],
|
6 |
+
"normalize_embeddings": false
|
7 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6146fba3cc053b63cc4dcacab41cf04dcb51f7e3a46f7a63717287742c38aeea
|
3 |
+
size 470637416
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:71f7e744826ff7d642ef2b204f33c196caeacd5bfd3348dad55bf969f3cfdb2f
|
3 |
+
size 3967
|
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": 128,
|
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": 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,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fa685fc160bbdbab64058d4fc91b60e62d207e8dc60b9af5c002c5ab946ded00
|
3 |
+
size 17083009
|
tokenizer_config.json
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": 512,
|
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
|