adriansanz
commited on
Commit
•
62912e0
1
Parent(s):
27468e6
Add SetFit model
Browse files- .gitattributes +1 -0
- 1_Pooling/config.json +10 -0
- README.md +225 -47
- config.json +5 -9
- config_sentence_transformers.json +10 -0
- config_setfit.json +4 -0
- model.safetensors +2 -2
- model_head.pkl +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- sentencepiece.bpe.model +3 -0
- special_tokens_map.json +7 -7
- tokenizer.json +0 -0
- tokenizer_config.json +15 -12
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ 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
|
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
CHANGED
@@ -1,69 +1,247 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
|
4 |
-
base_model: projecte-aina/roberta-base-ca-v2
|
5 |
-
tags:
|
6 |
-
- generated_from_trainer
|
7 |
metrics:
|
8 |
- accuracy
|
9 |
-
-
|
10 |
-
|
11 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
model-index:
|
13 |
-
- name:
|
14 |
-
results:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
---
|
16 |
|
17 |
-
|
18 |
-
should probably proofread and complete it, then remove this comment. -->
|
19 |
|
20 |
-
|
21 |
|
22 |
-
|
23 |
-
It achieves the following results on the evaluation set:
|
24 |
-
- Loss: 0.0314
|
25 |
-
- Accuracy: 1.0
|
26 |
-
- Precision: 1.0
|
27 |
-
- Recall: 1.0
|
28 |
-
- F1: 1.0
|
29 |
|
30 |
-
|
|
|
31 |
|
32 |
-
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
|
37 |
|
38 |
-
|
|
|
|
|
39 |
|
40 |
-
|
|
|
|
|
|
|
|
|
41 |
|
42 |
-
##
|
43 |
|
44 |
-
###
|
|
|
|
|
|
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
-
|
|
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
| No log | 1.0 | 202 | 0.1516 | 0.9992 | 0.9994 | 0.9988 | 0.9991 |
|
61 |
-
| No log | 2.0 | 404 | 0.0314 | 1.0 | 1.0 | 1.0 | 1.0 |
|
62 |
|
|
|
|
|
63 |
|
64 |
-
|
|
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
base_model: projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base
|
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: Quin és el percentatge de bonificació per a les famílies monoparentals o nombroses?
|
14 |
+
- text: Salut, tanque's
|
15 |
+
- text: Quin és el tema principal de l'informe previ?
|
16 |
+
- text: Quin és el destinatari de la sol·licitud de canvi d'ubicació?
|
17 |
+
- text: Què es necessita per obtenir una placa de gual?
|
18 |
+
inference: true
|
19 |
model-index:
|
20 |
+
- name: SetFit with projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base
|
21 |
+
results:
|
22 |
+
- task:
|
23 |
+
type: text-classification
|
24 |
+
name: Text Classification
|
25 |
+
dataset:
|
26 |
+
name: Unknown
|
27 |
+
type: unknown
|
28 |
+
split: test
|
29 |
+
metrics:
|
30 |
+
- type: accuracy
|
31 |
+
value: 0.9978448275862069
|
32 |
+
name: Accuracy
|
33 |
---
|
34 |
|
35 |
+
# SetFit with projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base
|
|
|
36 |
|
37 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base](https://huggingface.co/projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base) 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.
|
38 |
|
39 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
42 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
43 |
|
44 |
+
## Model Details
|
45 |
|
46 |
+
### Model Description
|
47 |
+
- **Model Type:** SetFit
|
48 |
+
- **Sentence Transformer body:** [projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base](https://huggingface.co/projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base)
|
49 |
+
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
50 |
+
- **Maximum Sequence Length:** 128 tokens
|
51 |
+
- **Number of Classes:** 2 classes
|
52 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
53 |
+
<!-- - **Language:** Unknown -->
|
54 |
+
<!-- - **License:** Unknown -->
|
55 |
|
56 |
+
### Model Sources
|
57 |
|
58 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
59 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
60 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
61 |
|
62 |
+
### Model Labels
|
63 |
+
| Label | Examples |
|
64 |
+
|:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
65 |
+
| 1 | <ul><li>'Bona nit, com estàs?'</li><li>'Ei, què tal tot?'</li><li>'Hola, com està el temps?'</li></ul> |
|
66 |
+
| 0 | <ul><li>'Quin és el propòsit de la llicència administrativa?'</li><li>'Quin és el benefici de les subvencions per als infants?'</li><li>"Què acredita el certificat d'empadronament col·lectiu?"</li></ul> |
|
67 |
|
68 |
+
## Evaluation
|
69 |
|
70 |
+
### Metrics
|
71 |
+
| Label | Accuracy |
|
72 |
+
|:--------|:---------|
|
73 |
+
| **all** | 0.9978 |
|
74 |
|
75 |
+
## Uses
|
76 |
+
|
77 |
+
### Direct Use for Inference
|
78 |
+
|
79 |
+
First install the SetFit library:
|
80 |
+
|
81 |
+
```bash
|
82 |
+
pip install setfit
|
83 |
+
```
|
84 |
+
|
85 |
+
Then you can load this model and run inference.
|
86 |
+
|
87 |
+
```python
|
88 |
+
from setfit import SetFitModel
|
89 |
+
|
90 |
+
# Download from the 🤗 Hub
|
91 |
+
model = SetFitModel.from_pretrained("adriansanz/greetings-v2")
|
92 |
+
# Run inference
|
93 |
+
preds = model("Salut, tanque's")
|
94 |
+
```
|
95 |
|
96 |
+
<!--
|
97 |
+
### Downstream Use
|
98 |
|
99 |
+
*List how someone could finetune this model on their own dataset.*
|
100 |
+
-->
|
|
|
|
|
101 |
|
102 |
+
<!--
|
103 |
+
### Out-of-Scope Use
|
104 |
|
105 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
106 |
+
-->
|
107 |
|
108 |
+
<!--
|
109 |
+
## Bias, Risks and Limitations
|
110 |
+
|
111 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
112 |
+
-->
|
113 |
+
|
114 |
+
<!--
|
115 |
+
### Recommendations
|
116 |
+
|
117 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
118 |
+
-->
|
119 |
+
|
120 |
+
## Training Details
|
121 |
+
|
122 |
+
### Training Set Metrics
|
123 |
+
| Training set | Min | Median | Max |
|
124 |
+
|:-------------|:----|:-------|:----|
|
125 |
+
| Word count | 2 | 9.8187 | 23 |
|
126 |
+
|
127 |
+
| Label | Training Sample Count |
|
128 |
+
|:------|:----------------------|
|
129 |
+
| 0 | 100 |
|
130 |
+
| 1 | 60 |
|
131 |
+
|
132 |
+
### Training Hyperparameters
|
133 |
+
- batch_size: (16, 16)
|
134 |
+
- num_epochs: (3, 3)
|
135 |
+
- max_steps: -1
|
136 |
+
- sampling_strategy: oversampling
|
137 |
+
- body_learning_rate: (2e-05, 1e-05)
|
138 |
+
- head_learning_rate: 0.01
|
139 |
+
- loss: CosineSimilarityLoss
|
140 |
+
- distance_metric: cosine_distance
|
141 |
+
- margin: 0.25
|
142 |
+
- end_to_end: False
|
143 |
+
- use_amp: False
|
144 |
+
- warmup_proportion: 0.1
|
145 |
+
- l2_weight: 0.01
|
146 |
+
- seed: 42
|
147 |
+
- eval_max_steps: -1
|
148 |
+
- load_best_model_at_end: False
|
149 |
+
|
150 |
+
### Training Results
|
151 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
152 |
+
|:------:|:----:|:-------------:|:---------------:|
|
153 |
+
| 0.0012 | 1 | 0.2127 | - |
|
154 |
+
| 0.0581 | 50 | 0.1471 | - |
|
155 |
+
| 0.1163 | 100 | 0.0168 | - |
|
156 |
+
| 0.1744 | 150 | 0.001 | - |
|
157 |
+
| 0.2326 | 200 | 0.0004 | - |
|
158 |
+
| 0.2907 | 250 | 0.0002 | - |
|
159 |
+
| 0.3488 | 300 | 0.0001 | - |
|
160 |
+
| 0.4070 | 350 | 0.0001 | - |
|
161 |
+
| 0.4651 | 400 | 0.0001 | - |
|
162 |
+
| 0.5233 | 450 | 0.0001 | - |
|
163 |
+
| 0.5814 | 500 | 0.0001 | - |
|
164 |
+
| 0.6395 | 550 | 0.0001 | - |
|
165 |
+
| 0.6977 | 600 | 0.0001 | - |
|
166 |
+
| 0.7558 | 650 | 0.0 | - |
|
167 |
+
| 0.8140 | 700 | 0.0 | - |
|
168 |
+
| 0.8721 | 750 | 0.0 | - |
|
169 |
+
| 0.9302 | 800 | 0.0 | - |
|
170 |
+
| 0.9884 | 850 | 0.0 | - |
|
171 |
+
| 1.0465 | 900 | 0.0 | - |
|
172 |
+
| 1.1047 | 950 | 0.0 | - |
|
173 |
+
| 1.1628 | 1000 | 0.0 | - |
|
174 |
+
| 1.2209 | 1050 | 0.0 | - |
|
175 |
+
| 1.2791 | 1100 | 0.0 | - |
|
176 |
+
| 1.3372 | 1150 | 0.0 | - |
|
177 |
+
| 1.3953 | 1200 | 0.0 | - |
|
178 |
+
| 1.4535 | 1250 | 0.0 | - |
|
179 |
+
| 1.5116 | 1300 | 0.0 | - |
|
180 |
+
| 1.5698 | 1350 | 0.0 | - |
|
181 |
+
| 1.6279 | 1400 | 0.0 | - |
|
182 |
+
| 1.6860 | 1450 | 0.0 | - |
|
183 |
+
| 1.7442 | 1500 | 0.0 | - |
|
184 |
+
| 1.8023 | 1550 | 0.0 | - |
|
185 |
+
| 1.8605 | 1600 | 0.0 | - |
|
186 |
+
| 1.9186 | 1650 | 0.0 | - |
|
187 |
+
| 1.9767 | 1700 | 0.0 | - |
|
188 |
+
| 2.0349 | 1750 | 0.0 | - |
|
189 |
+
| 2.0930 | 1800 | 0.0 | - |
|
190 |
+
| 2.1512 | 1850 | 0.0 | - |
|
191 |
+
| 2.2093 | 1900 | 0.0 | - |
|
192 |
+
| 2.2674 | 1950 | 0.0 | - |
|
193 |
+
| 2.3256 | 2000 | 0.0 | - |
|
194 |
+
| 2.3837 | 2050 | 0.0 | - |
|
195 |
+
| 2.4419 | 2100 | 0.0 | - |
|
196 |
+
| 2.5 | 2150 | 0.0 | - |
|
197 |
+
| 2.5581 | 2200 | 0.0 | - |
|
198 |
+
| 2.6163 | 2250 | 0.0 | - |
|
199 |
+
| 2.6744 | 2300 | 0.0 | - |
|
200 |
+
| 2.7326 | 2350 | 0.0 | - |
|
201 |
+
| 2.7907 | 2400 | 0.0 | - |
|
202 |
+
| 2.8488 | 2450 | 0.0 | - |
|
203 |
+
| 2.9070 | 2500 | 0.0 | - |
|
204 |
+
| 2.9651 | 2550 | 0.0 | - |
|
205 |
+
|
206 |
+
### Framework Versions
|
207 |
+
- Python: 3.10.12
|
208 |
+
- SetFit: 1.1.0
|
209 |
+
- Sentence Transformers: 3.2.1
|
210 |
+
- Transformers: 4.44.2
|
211 |
+
- PyTorch: 2.5.0+cu121
|
212 |
+
- Datasets: 3.1.0
|
213 |
+
- Tokenizers: 0.19.1
|
214 |
+
|
215 |
+
## Citation
|
216 |
+
|
217 |
+
### BibTeX
|
218 |
+
```bibtex
|
219 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
220 |
+
doi = {10.48550/ARXIV.2209.11055},
|
221 |
+
url = {https://arxiv.org/abs/2209.11055},
|
222 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
223 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
224 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
225 |
+
publisher = {arXiv},
|
226 |
+
year = {2022},
|
227 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
228 |
+
}
|
229 |
+
```
|
230 |
+
|
231 |
+
<!--
|
232 |
+
## Glossary
|
233 |
+
|
234 |
+
*Clearly define terms in order to be accessible across audiences.*
|
235 |
+
-->
|
236 |
+
|
237 |
+
<!--
|
238 |
+
## Model Card Authors
|
239 |
+
|
240 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
241 |
+
-->
|
242 |
+
|
243 |
+
<!--
|
244 |
+
## Model Card Contact
|
245 |
+
|
246 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
247 |
+
-->
|
config.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "projecte-aina/
|
3 |
"architectures": [
|
4 |
-
"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
7 |
"bos_token_id": 0,
|
@@ -11,23 +11,19 @@
|
|
11 |
"hidden_act": "gelu",
|
12 |
"hidden_dropout_prob": 0.1,
|
13 |
"hidden_size": 768,
|
14 |
-
"id2label": {
|
15 |
-
"0": 0,
|
16 |
-
"1": 1
|
17 |
-
},
|
18 |
"initializer_range": 0.02,
|
19 |
"intermediate_size": 3072,
|
20 |
"layer_norm_eps": 1e-05,
|
21 |
"max_position_embeddings": 514,
|
22 |
-
"model_type": "roberta",
|
23 |
"num_attention_heads": 12,
|
24 |
"num_hidden_layers": 12,
|
|
|
25 |
"pad_token_id": 1,
|
26 |
"position_embedding_type": "absolute",
|
27 |
-
"problem_type": "single_label_classification",
|
28 |
"torch_dtype": "float32",
|
29 |
"transformers_version": "4.44.2",
|
30 |
"type_vocab_size": 1,
|
31 |
"use_cache": true,
|
32 |
-
"vocab_size":
|
33 |
}
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "projecte-aina/ST-NLI-ca_paraphrase-multilingual-mpnet-base",
|
3 |
"architectures": [
|
4 |
+
"XLMRobertaModel"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
7 |
"bos_token_id": 0,
|
|
|
11 |
"hidden_act": "gelu",
|
12 |
"hidden_dropout_prob": 0.1,
|
13 |
"hidden_size": 768,
|
|
|
|
|
|
|
|
|
14 |
"initializer_range": 0.02,
|
15 |
"intermediate_size": 3072,
|
16 |
"layer_norm_eps": 1e-05,
|
17 |
"max_position_embeddings": 514,
|
18 |
+
"model_type": "xlm-roberta",
|
19 |
"num_attention_heads": 12,
|
20 |
"num_hidden_layers": 12,
|
21 |
+
"output_past": true,
|
22 |
"pad_token_id": 1,
|
23 |
"position_embedding_type": "absolute",
|
|
|
24 |
"torch_dtype": "float32",
|
25 |
"transformers_version": "4.44.2",
|
26 |
"type_vocab_size": 1,
|
27 |
"use_cache": true,
|
28 |
+
"vocab_size": 250002
|
29 |
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.2.1",
|
4 |
+
"transformers": "4.44.2",
|
5 |
+
"pytorch": "2.5.0+cu121"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
config_setfit.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"normalize_embeddings": false,
|
3 |
+
"labels": null
|
4 |
+
}
|
model.safetensors
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:541b2bbe7945748eb9a5102fa753a29424013a6ddb8fdeadd1408d8bca5b9ce0
|
3 |
+
size 1112197096
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d57419310f3170a362600f05ead623a5d6d4793887b9248aa87fab12ab91a414
|
3 |
+
size 7007
|
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 |
+
}
|
sentencepiece.bpe.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
|
3 |
+
size 5069051
|
special_tokens_map.json
CHANGED
@@ -2,49 +2,49 @@
|
|
2 |
"bos_token": {
|
3 |
"content": "<s>",
|
4 |
"lstrip": false,
|
5 |
-
"normalized":
|
6 |
"rstrip": false,
|
7 |
"single_word": false
|
8 |
},
|
9 |
"cls_token": {
|
10 |
"content": "<s>",
|
11 |
"lstrip": false,
|
12 |
-
"normalized":
|
13 |
"rstrip": false,
|
14 |
"single_word": false
|
15 |
},
|
16 |
"eos_token": {
|
17 |
"content": "</s>",
|
18 |
"lstrip": false,
|
19 |
-
"normalized":
|
20 |
"rstrip": false,
|
21 |
"single_word": false
|
22 |
},
|
23 |
"mask_token": {
|
24 |
"content": "<mask>",
|
25 |
"lstrip": true,
|
26 |
-
"normalized":
|
27 |
"rstrip": false,
|
28 |
"single_word": false
|
29 |
},
|
30 |
"pad_token": {
|
31 |
"content": "<pad>",
|
32 |
"lstrip": false,
|
33 |
-
"normalized":
|
34 |
"rstrip": false,
|
35 |
"single_word": false
|
36 |
},
|
37 |
"sep_token": {
|
38 |
"content": "</s>",
|
39 |
"lstrip": false,
|
40 |
-
"normalized":
|
41 |
"rstrip": false,
|
42 |
"single_word": false
|
43 |
},
|
44 |
"unk_token": {
|
45 |
"content": "<unk>",
|
46 |
"lstrip": false,
|
47 |
-
"normalized":
|
48 |
"rstrip": false,
|
49 |
"single_word": false
|
50 |
}
|
|
|
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 |
}
|
tokenizer.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
CHANGED
@@ -1,10 +1,9 @@
|
|
1 |
{
|
2 |
-
"add_prefix_space": true,
|
3 |
"added_tokens_decoder": {
|
4 |
"0": {
|
5 |
"content": "<s>",
|
6 |
"lstrip": false,
|
7 |
-
"normalized":
|
8 |
"rstrip": false,
|
9 |
"single_word": false,
|
10 |
"special": true
|
@@ -12,7 +11,7 @@
|
|
12 |
"1": {
|
13 |
"content": "<pad>",
|
14 |
"lstrip": false,
|
15 |
-
"normalized":
|
16 |
"rstrip": false,
|
17 |
"single_word": false,
|
18 |
"special": true
|
@@ -20,7 +19,7 @@
|
|
20 |
"2": {
|
21 |
"content": "</s>",
|
22 |
"lstrip": false,
|
23 |
-
"normalized":
|
24 |
"rstrip": false,
|
25 |
"single_word": false,
|
26 |
"special": true
|
@@ -28,15 +27,15 @@
|
|
28 |
"3": {
|
29 |
"content": "<unk>",
|
30 |
"lstrip": false,
|
31 |
-
"normalized":
|
32 |
"rstrip": false,
|
33 |
"single_word": false,
|
34 |
"special": true
|
35 |
},
|
36 |
-
"
|
37 |
"content": "<mask>",
|
38 |
"lstrip": true,
|
39 |
-
"normalized":
|
40 |
"rstrip": false,
|
41 |
"single_word": false,
|
42 |
"special": true
|
@@ -46,13 +45,17 @@
|
|
46 |
"clean_up_tokenization_spaces": true,
|
47 |
"cls_token": "<s>",
|
48 |
"eos_token": "</s>",
|
49 |
-
"errors": "replace",
|
50 |
"mask_token": "<mask>",
|
51 |
-
"
|
52 |
-
"model_max_length":
|
|
|
53 |
"pad_token": "<pad>",
|
|
|
|
|
54 |
"sep_token": "</s>",
|
55 |
-
"
|
56 |
-
"
|
|
|
|
|
57 |
"unk_token": "<unk>"
|
58 |
}
|
|
|
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
|
|
|
11 |
"1": {
|
12 |
"content": "<pad>",
|
13 |
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
"rstrip": false,
|
16 |
"single_word": false,
|
17 |
"special": true
|
|
|
19 |
"2": {
|
20 |
"content": "</s>",
|
21 |
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
"rstrip": false,
|
24 |
"single_word": false,
|
25 |
"special": true
|
|
|
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
|
|
|
45 |
"clean_up_tokenization_spaces": true,
|
46 |
"cls_token": "<s>",
|
47 |
"eos_token": "</s>",
|
|
|
48 |
"mask_token": "<mask>",
|
49 |
+
"max_length": 128,
|
50 |
+
"model_max_length": 128,
|
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 |
+
"stride": 0,
|
57 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
58 |
+
"truncation_side": "right",
|
59 |
+
"truncation_strategy": "longest_first",
|
60 |
"unk_token": "<unk>"
|
61 |
}
|