Add SetFit model
Browse files- 1_Pooling/config.json +7 -0
- README.md +208 -0
- config.json +28 -0
- config_sentence_transformers.json +7 -0
- config_setfit.json +4 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- model_head.pkl +3 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +64 -0
- vocab.json +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,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: setfit
|
3 |
+
tags:
|
4 |
+
- setfit
|
5 |
+
- sentence-transformers
|
6 |
+
- text-classification
|
7 |
+
- generated_from_setfit_trainer
|
8 |
+
datasets:
|
9 |
+
- hojzas/proj8-label2
|
10 |
+
metrics:
|
11 |
+
- accuracy
|
12 |
+
widget:
|
13 |
+
- text: 'def first_with_given_key(iterable, key=lambda x: x):\n keys_used = {}\n for
|
14 |
+
item in iterable:\n rp = repr(key(item))\n if rp not in keys_used.keys():\n keys_used[rp]
|
15 |
+
= repr(item)\n yield item'
|
16 |
+
- text: 'def first_with_given_key(iterable, key=lambda x: x):\n keys=[]\n for
|
17 |
+
i in iterable:\n if key(i) not in keys:\n yield i\n keys.append(key(i))'
|
18 |
+
- text: 'def first_with_given_key(iterable, key=repr):\n set_of_keys = set()\n lambda_key
|
19 |
+
= (lambda x: key(x))\n for item in iterable:\n key = lambda_key(item)\n try:\n key_for_set
|
20 |
+
= hash(key)\n except TypeError:\n key_for_set = repr(key)\n if
|
21 |
+
key_for_set in set_of_keys:\n continue\n set_of_keys.add(key_for_set)\n yield
|
22 |
+
item'
|
23 |
+
- text: 'def first_with_given_key(iterable, key = lambda x: x):\n found_keys={}\n for
|
24 |
+
i in iterable:\n if key(i) not in found_keys.keys():\n found_keys[key(i)]=i\n yield
|
25 |
+
i'
|
26 |
+
- text: 'def first_with_given_key(the_iterable, key=lambda x: x):\n temp_keys=[]\n for
|
27 |
+
i in range(len(the_iterable)):\n if (key(the_iterable[i]) not in temp_keys):\n temp_keys.append(key(the_iterable[i]))\n yield
|
28 |
+
the_iterable[i]\n del temp_keys'
|
29 |
+
pipeline_tag: text-classification
|
30 |
+
inference: true
|
31 |
+
co2_eq_emissions:
|
32 |
+
emissions: 0.11699550964562933
|
33 |
+
source: codecarbon
|
34 |
+
training_type: fine-tuning
|
35 |
+
on_cloud: false
|
36 |
+
cpu_model: Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz
|
37 |
+
ram_total_size: 251.49160385131836
|
38 |
+
hours_used: 0.002
|
39 |
+
base_model: flax-sentence-embeddings/st-codesearch-distilroberta-base
|
40 |
+
---
|
41 |
+
|
42 |
+
# SetFit with flax-sentence-embeddings/st-codesearch-distilroberta-base
|
43 |
+
|
44 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model trained on the [hojzas/proj8-label2](https://huggingface.co/datasets/hojzas/proj8-label2) dataset that can be used for Text Classification. This SetFit model uses [flax-sentence-embeddings/st-codesearch-distilroberta-base](https://huggingface.co/flax-sentence-embeddings/st-codesearch-distilroberta-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.
|
45 |
+
|
46 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
47 |
+
|
48 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
49 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
50 |
+
|
51 |
+
## Model Details
|
52 |
+
|
53 |
+
### Model Description
|
54 |
+
- **Model Type:** SetFit
|
55 |
+
- **Sentence Transformer body:** [flax-sentence-embeddings/st-codesearch-distilroberta-base](https://huggingface.co/flax-sentence-embeddings/st-codesearch-distilroberta-base)
|
56 |
+
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
57 |
+
- **Maximum Sequence Length:** 128 tokens
|
58 |
+
- **Number of Classes:** 2 classes
|
59 |
+
- **Training Dataset:** [hojzas/proj8-label2](https://huggingface.co/datasets/hojzas/proj8-label2)
|
60 |
+
<!-- - **Language:** Unknown -->
|
61 |
+
<!-- - **License:** Unknown -->
|
62 |
+
|
63 |
+
### Model Sources
|
64 |
+
|
65 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
66 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
67 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
68 |
+
|
69 |
+
### Model Labels
|
70 |
+
| Label | Examples |
|
71 |
+
|:------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
72 |
+
| 0 | <ul><li>'def first_with_given_key(iterable, key=lambda x: x):\\n keys_in_list = []\\n for it in iterable:\\n if key(it) not in keys_in_list:\\n keys_in_list.append(key(it))\\n yield it'</li><li>'def first_with_given_key(iterable, key=lambda value: value):\\n it = iter(iterable)\\n saved_keys = []\\n while True:\\n try:\\n value = next(it)\\n if key(value) not in saved_keys:\\n saved_keys.append(key(value))\\n yield value\\n except StopIteration:\\n break'</li><li>'def first_with_given_key(iterable, key=None):\\n if key is None:\\n key = lambda x: x\\n item_list = []\\n key_set = set()\\n for item in iterable:\\n generated_item = key(item)\\n if generated_item not in item_list:\\n item_list.append(generated_item)\\n yield item'</li></ul> |
|
73 |
+
| 1 | <ul><li>'def first_with_given_key(lst, key = lambda x: x):\\n res = set()\\n for i in lst:\\n if repr(key(i)) not in res:\\n res.add(repr(key(i)))\\n yield i'</li><li>'def first_with_given_key(iterable, key=repr):\\n set_of_keys = set()\\n lambda_key = (lambda x: key(x))\\n for item in iterable:\\n key = lambda_key(item)\\n try:\\n key_for_set = hash(key)\\n except TypeError:\\n key_for_set = repr(key)\\n if key_for_set in set_of_keys:\\n continue\\n set_of_keys.add(key_for_set)\\n yield item'</li><li>'def first_with_given_key(iterable, key=None):\\n if key is None:\\n key = identity\\n appeared_keys = set()\\n for item in iterable:\\n generated_key = key(item)\\n if not generated_key.__hash__:\\n generated_key = repr(generated_key)\\n if generated_key not in appeared_keys:\\n appeared_keys.add(generated_key)\\n yield item'</li></ul> |
|
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("hojzas/setfit-proj8-code")
|
92 |
+
# Run inference
|
93 |
+
preds = model("def first_with_given_key(iterable, key=lambda x: x):\n keys=[]\n for i in iterable:\n if key(i) not in keys:\n yield i\n keys.append(key(i))")
|
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 | 43 | 90.28 | 119 |
|
126 |
+
|
127 |
+
| Label | Training Sample Count |
|
128 |
+
|:------|:----------------------|
|
129 |
+
| 0 | 20 |
|
130 |
+
| 1 | 5 |
|
131 |
+
|
132 |
+
### Training Hyperparameters
|
133 |
+
- batch_size: (16, 16)
|
134 |
+
- num_epochs: (1, 1)
|
135 |
+
- max_steps: -1
|
136 |
+
- sampling_strategy: oversampling
|
137 |
+
- num_iterations: 20
|
138 |
+
- body_learning_rate: (2e-05, 2e-05)
|
139 |
+
- head_learning_rate: 2e-05
|
140 |
+
- loss: CosineSimilarityLoss
|
141 |
+
- distance_metric: cosine_distance
|
142 |
+
- margin: 0.25
|
143 |
+
- end_to_end: False
|
144 |
+
- use_amp: False
|
145 |
+
- warmup_proportion: 0.1
|
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.0159 | 1 | 0.3347 | - |
|
154 |
+
| 0.7937 | 50 | 0.0035 | - |
|
155 |
+
|
156 |
+
### Environmental Impact
|
157 |
+
Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
|
158 |
+
- **Carbon Emitted**: 0.000 kg of CO2
|
159 |
+
- **Hours Used**: 0.002 hours
|
160 |
+
|
161 |
+
### Training Hardware
|
162 |
+
- **On Cloud**: No
|
163 |
+
- **GPU Model**: No GPU used
|
164 |
+
- **CPU Model**: Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz
|
165 |
+
- **RAM Size**: 251.49 GB
|
166 |
+
|
167 |
+
### Framework Versions
|
168 |
+
- Python: 3.10.12
|
169 |
+
- SetFit: 1.0.3
|
170 |
+
- Sentence Transformers: 2.2.2
|
171 |
+
- Transformers: 4.36.1
|
172 |
+
- PyTorch: 2.1.2+cu121
|
173 |
+
- Datasets: 2.14.7
|
174 |
+
- Tokenizers: 0.15.1
|
175 |
+
|
176 |
+
## Citation
|
177 |
+
|
178 |
+
### BibTeX
|
179 |
+
```bibtex
|
180 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
181 |
+
doi = {10.48550/ARXIV.2209.11055},
|
182 |
+
url = {https://arxiv.org/abs/2209.11055},
|
183 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
184 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
185 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
186 |
+
publisher = {arXiv},
|
187 |
+
year = {2022},
|
188 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
189 |
+
}
|
190 |
+
```
|
191 |
+
|
192 |
+
<!--
|
193 |
+
## Glossary
|
194 |
+
|
195 |
+
*Clearly define terms in order to be accessible across audiences.*
|
196 |
+
-->
|
197 |
+
|
198 |
+
<!--
|
199 |
+
## Model Card Authors
|
200 |
+
|
201 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
202 |
+
-->
|
203 |
+
|
204 |
+
<!--
|
205 |
+
## Model Card Contact
|
206 |
+
|
207 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
208 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/home/xkrejc70/.cache/torch/sentence_transformers/flax-sentence-embeddings_st-codesearch-distilroberta-base/",
|
3 |
+
"architectures": [
|
4 |
+
"RobertaModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"gradient_checkpointing": false,
|
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": "roberta",
|
19 |
+
"num_attention_heads": 12,
|
20 |
+
"num_hidden_layers": 6,
|
21 |
+
"pad_token_id": 1,
|
22 |
+
"position_embedding_type": "absolute",
|
23 |
+
"torch_dtype": "float32",
|
24 |
+
"transformers_version": "4.36.1",
|
25 |
+
"type_vocab_size": 1,
|
26 |
+
"use_cache": true,
|
27 |
+
"vocab_size": 50265
|
28 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "2.0.0",
|
4 |
+
"transformers": "4.6.1",
|
5 |
+
"pytorch": "1.8.1"
|
6 |
+
}
|
7 |
+
}
|
config_setfit.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"labels": null,
|
3 |
+
"normalize_embeddings": false
|
4 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bcddb31be7da04a9046e413cef69669bb03b5a2297a9e6f78f2b9bc593df3fd6
|
3 |
+
size 328485128
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:50605be5f944be93be2ea7f2d35ea5db9f5ce32ce2cfe2e46a4f7525633c94d5
|
3 |
+
size 7007
|
modules.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{
|
15 |
+
"idx": 2,
|
16 |
+
"name": "2",
|
17 |
+
"path": "2_Normalize",
|
18 |
+
"type": "sentence_transformers.models.Normalize"
|
19 |
+
}
|
20 |
+
]
|
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
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"0": {
|
5 |
+
"content": "<s>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": false,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"1": {
|
13 |
+
"content": "<pad>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": false,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
},
|
20 |
+
"2": {
|
21 |
+
"content": "</s>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": false,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false,
|
26 |
+
"special": true
|
27 |
+
},
|
28 |
+
"3": {
|
29 |
+
"content": "<unk>",
|
30 |
+
"lstrip": false,
|
31 |
+
"normalized": false,
|
32 |
+
"rstrip": false,
|
33 |
+
"single_word": false,
|
34 |
+
"special": true
|
35 |
+
},
|
36 |
+
"50264": {
|
37 |
+
"content": "<mask>",
|
38 |
+
"lstrip": true,
|
39 |
+
"normalized": false,
|
40 |
+
"rstrip": false,
|
41 |
+
"single_word": false,
|
42 |
+
"special": true
|
43 |
+
}
|
44 |
+
},
|
45 |
+
"bos_token": "<s>",
|
46 |
+
"clean_up_tokenization_spaces": true,
|
47 |
+
"cls_token": "<s>",
|
48 |
+
"eos_token": "</s>",
|
49 |
+
"errors": "replace",
|
50 |
+
"mask_token": "<mask>",
|
51 |
+
"max_length": 128,
|
52 |
+
"model_max_length": 512,
|
53 |
+
"pad_to_multiple_of": null,
|
54 |
+
"pad_token": "<pad>",
|
55 |
+
"pad_token_type_id": 0,
|
56 |
+
"padding_side": "right",
|
57 |
+
"sep_token": "</s>",
|
58 |
+
"stride": 0,
|
59 |
+
"tokenizer_class": "RobertaTokenizer",
|
60 |
+
"trim_offsets": true,
|
61 |
+
"truncation_side": "right",
|
62 |
+
"truncation_strategy": "longest_first",
|
63 |
+
"unk_token": "<unk>"
|
64 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|