Add SetFit ABSA model
Browse files- 1_Pooling/config.json +10 -0
- README.md +231 -0
- config.json +25 -0
- config_sentence_transformers.json +10 -0
- config_setfit.json +9 -0
- model.safetensors +3 -0
- model_head.pkl +3 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +65 -0
- vocab.txt +0 -0
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,231 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- setfit
|
| 4 |
+
- absa
|
| 5 |
+
- sentence-transformers
|
| 6 |
+
- text-classification
|
| 7 |
+
- generated_from_setfit_trainer
|
| 8 |
+
widget:
|
| 9 |
+
- text: notch:Can't complain about the display it's fantastic! You can tell the graphics
|
| 10 |
+
is top-notch.
|
| 11 |
+
- text: lightweight:Wish that it is more lightweight. Its frustrating how bad the
|
| 12 |
+
design is.
|
| 13 |
+
- text: RAM:Memory is adequate with plenty of RAM for doing a lot of tasks smoothly.
|
| 14 |
+
- text: lie:The keyboard does not have backlight like what is advertised. Complete
|
| 15 |
+
lie
|
| 16 |
+
- text: mousepad:Unfortunately, the trackpad doesnt perform well. I had issues with
|
| 17 |
+
the mousepad from the start.
|
| 18 |
+
metrics:
|
| 19 |
+
- accuracy
|
| 20 |
+
pipeline_tag: text-classification
|
| 21 |
+
library_name: setfit
|
| 22 |
+
inference: false
|
| 23 |
+
base_model: sentence-transformers/all-MiniLM-L6-v2
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# SetFit Aspect Model with sentence-transformers/all-MiniLM-L6-v2
|
| 27 |
+
|
| 28 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Aspect Based Sentiment Analysis (ABSA). This SetFit model uses [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-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. In particular, this model is in charge of filtering aspect span candidates.
|
| 29 |
+
|
| 30 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
| 31 |
+
|
| 32 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
| 33 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
| 34 |
+
|
| 35 |
+
This model was trained within the context of a larger system for ABSA, which looks like so:
|
| 36 |
+
|
| 37 |
+
1. Use a spaCy model to select possible aspect span candidates.
|
| 38 |
+
2. **Use this SetFit model to filter these possible aspect span candidates.**
|
| 39 |
+
3. Use a SetFit model to classify the filtered aspect span candidates.
|
| 40 |
+
|
| 41 |
+
## Model Details
|
| 42 |
+
|
| 43 |
+
### Model Description
|
| 44 |
+
- **Model Type:** SetFit
|
| 45 |
+
- **Sentence Transformer body:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
|
| 46 |
+
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
| 47 |
+
- **spaCy Model:** en_core_web_sm
|
| 48 |
+
- **SetFitABSA Aspect Model:** [najwaa/absa-laptops-aspect-p2](https://huggingface.co/najwaa/absa-laptops-aspect-p2)
|
| 49 |
+
- **SetFitABSA Polarity Model:** [setfit-absa-polarity](https://huggingface.co/setfit-absa-polarity)
|
| 50 |
+
- **Maximum Sequence Length:** 256 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 |
+
| aspect | <ul><li>'light weight:this computer is so light weight and easy to carry.'</li><li>'carry:this computer is so light weight and easy to carry.'</li><li>'lightweight:very lightweight.'</li></ul> |
|
| 66 |
+
| no aspect | <ul><li>'computer:this computer is so light weight and easy to carry.'</li><li>"premium:The build quality feels premium but it's surprisingly heavy for daily commuting."</li><li>"commuting:The build quality feels premium but it's surprisingly heavy for daily commuting."</li></ul> |
|
| 67 |
+
|
| 68 |
+
## Uses
|
| 69 |
+
|
| 70 |
+
### Direct Use for Inference
|
| 71 |
+
|
| 72 |
+
First install the SetFit library:
|
| 73 |
+
|
| 74 |
+
```bash
|
| 75 |
+
pip install setfit
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
Then you can load this model and run inference.
|
| 79 |
+
|
| 80 |
+
```python
|
| 81 |
+
from setfit import AbsaModel
|
| 82 |
+
|
| 83 |
+
# Download from the 🤗 Hub
|
| 84 |
+
model = AbsaModel.from_pretrained(
|
| 85 |
+
"najwaa/absa-laptops-aspect-p2",
|
| 86 |
+
"setfit-absa-polarity",
|
| 87 |
+
)
|
| 88 |
+
# Run inference
|
| 89 |
+
preds = model("The food was great, but the venue is just way too busy.")
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
<!--
|
| 93 |
+
### Downstream Use
|
| 94 |
+
|
| 95 |
+
*List how someone could finetune this model on their own dataset.*
|
| 96 |
+
-->
|
| 97 |
+
|
| 98 |
+
<!--
|
| 99 |
+
### Out-of-Scope Use
|
| 100 |
+
|
| 101 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 102 |
+
-->
|
| 103 |
+
|
| 104 |
+
<!--
|
| 105 |
+
## Bias, Risks and Limitations
|
| 106 |
+
|
| 107 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 108 |
+
-->
|
| 109 |
+
|
| 110 |
+
<!--
|
| 111 |
+
### Recommendations
|
| 112 |
+
|
| 113 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 114 |
+
-->
|
| 115 |
+
|
| 116 |
+
## Training Details
|
| 117 |
+
|
| 118 |
+
### Training Set Metrics
|
| 119 |
+
| Training set | Min | Median | Max |
|
| 120 |
+
|:-------------|:----|:--------|:----|
|
| 121 |
+
| Word count | 2 | 18.3046 | 52 |
|
| 122 |
+
|
| 123 |
+
| Label | Training Sample Count |
|
| 124 |
+
|:----------|:----------------------|
|
| 125 |
+
| no aspect | 341 |
|
| 126 |
+
| aspect | 263 |
|
| 127 |
+
|
| 128 |
+
### Training Hyperparameters
|
| 129 |
+
- batch_size: (32, 32)
|
| 130 |
+
- num_epochs: (5, 5)
|
| 131 |
+
- max_steps: -1
|
| 132 |
+
- sampling_strategy: oversampling
|
| 133 |
+
- body_learning_rate: (2e-05, 1e-05)
|
| 134 |
+
- head_learning_rate: 0.01
|
| 135 |
+
- loss: CosineSimilarityLoss
|
| 136 |
+
- distance_metric: cosine_distance
|
| 137 |
+
- margin: 0.25
|
| 138 |
+
- end_to_end: False
|
| 139 |
+
- use_amp: True
|
| 140 |
+
- warmup_proportion: 0.1
|
| 141 |
+
- l2_weight: 0.01
|
| 142 |
+
- seed: 42
|
| 143 |
+
- eval_max_steps: -1
|
| 144 |
+
- load_best_model_at_end: True
|
| 145 |
+
|
| 146 |
+
### Training Results
|
| 147 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
| 148 |
+
|:------:|:----:|:-------------:|:---------------:|
|
| 149 |
+
| 0.0002 | 1 | 0.2288 | - |
|
| 150 |
+
| 0.0017 | 10 | - | 0.3073 |
|
| 151 |
+
| 0.0034 | 20 | - | 0.3065 |
|
| 152 |
+
| 0.0052 | 30 | - | 0.3052 |
|
| 153 |
+
| 0.0069 | 40 | - | 0.3034 |
|
| 154 |
+
| 0.0086 | 50 | 0.3393 | 0.3011 |
|
| 155 |
+
| 0.0103 | 60 | - | 0.2984 |
|
| 156 |
+
| 0.0120 | 70 | - | 0.2954 |
|
| 157 |
+
| 0.0138 | 80 | - | 0.2923 |
|
| 158 |
+
| 0.0155 | 90 | - | 0.2888 |
|
| 159 |
+
| 0.0172 | 100 | 0.3016 | 0.2855 |
|
| 160 |
+
| 0.0189 | 110 | - | 0.2821 |
|
| 161 |
+
| 0.0206 | 120 | - | 0.2786 |
|
| 162 |
+
| 0.0224 | 130 | - | 0.2754 |
|
| 163 |
+
| 0.0241 | 140 | - | 0.2722 |
|
| 164 |
+
| 0.0258 | 150 | 0.2875 | 0.2684 |
|
| 165 |
+
| 0.0275 | 160 | - | 0.2653 |
|
| 166 |
+
| 0.0292 | 170 | - | 0.2629 |
|
| 167 |
+
| 0.0310 | 180 | - | 0.2611 |
|
| 168 |
+
| 0.0327 | 190 | - | 0.2597 |
|
| 169 |
+
| 0.0344 | 200 | 0.272 | 0.2588 |
|
| 170 |
+
| 0.0361 | 210 | - | 0.2585 |
|
| 171 |
+
| 0.0378 | 220 | - | 0.2584 |
|
| 172 |
+
| 0.0396 | 230 | - | 0.2584 |
|
| 173 |
+
| 0.0413 | 240 | - | 0.2584 |
|
| 174 |
+
| 0.0430 | 250 | 0.2652 | 0.2585 |
|
| 175 |
+
| 0.0447 | 260 | - | 0.2581 |
|
| 176 |
+
| 0.0464 | 270 | - | 0.2580 |
|
| 177 |
+
| 0.0482 | 280 | - | 0.2580 |
|
| 178 |
+
| 0.0499 | 290 | - | 0.2580 |
|
| 179 |
+
| 0.0516 | 300 | 0.2635 | 0.2578 |
|
| 180 |
+
| 0.0533 | 310 | - | 0.2578 |
|
| 181 |
+
| 0.0550 | 320 | - | 0.2575 |
|
| 182 |
+
| 0.0567 | 330 | - | 0.2572 |
|
| 183 |
+
| 0.0585 | 340 | - | 0.2573 |
|
| 184 |
+
| 0.0602 | 350 | 0.2608 | 0.2572 |
|
| 185 |
+
| 0.0619 | 360 | - | 0.2576 |
|
| 186 |
+
| 0.0636 | 370 | - | 0.2576 |
|
| 187 |
+
| 0.0653 | 380 | - | 0.2579 |
|
| 188 |
+
|
| 189 |
+
### Framework Versions
|
| 190 |
+
- Python: 3.11.12
|
| 191 |
+
- SetFit: 1.1.2
|
| 192 |
+
- Sentence Transformers: 4.1.0
|
| 193 |
+
- spaCy: 3.7.5
|
| 194 |
+
- Transformers: 4.51.3
|
| 195 |
+
- PyTorch: 2.6.0+cu124
|
| 196 |
+
- Datasets: 3.6.0
|
| 197 |
+
- Tokenizers: 0.21.1
|
| 198 |
+
|
| 199 |
+
## Citation
|
| 200 |
+
|
| 201 |
+
### BibTeX
|
| 202 |
+
```bibtex
|
| 203 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
| 204 |
+
doi = {10.48550/ARXIV.2209.11055},
|
| 205 |
+
url = {https://arxiv.org/abs/2209.11055},
|
| 206 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
| 207 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
| 208 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
| 209 |
+
publisher = {arXiv},
|
| 210 |
+
year = {2022},
|
| 211 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
| 212 |
+
}
|
| 213 |
+
```
|
| 214 |
+
|
| 215 |
+
<!--
|
| 216 |
+
## Glossary
|
| 217 |
+
|
| 218 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 219 |
+
-->
|
| 220 |
+
|
| 221 |
+
<!--
|
| 222 |
+
## Model Card Authors
|
| 223 |
+
|
| 224 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 225 |
+
-->
|
| 226 |
+
|
| 227 |
+
<!--
|
| 228 |
+
## Model Card Contact
|
| 229 |
+
|
| 230 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 231 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"BertModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"classifier_dropout": null,
|
| 7 |
+
"gradient_checkpointing": false,
|
| 8 |
+
"hidden_act": "gelu",
|
| 9 |
+
"hidden_dropout_prob": 0.1,
|
| 10 |
+
"hidden_size": 384,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 1536,
|
| 13 |
+
"layer_norm_eps": 1e-12,
|
| 14 |
+
"max_position_embeddings": 512,
|
| 15 |
+
"model_type": "bert",
|
| 16 |
+
"num_attention_heads": 12,
|
| 17 |
+
"num_hidden_layers": 6,
|
| 18 |
+
"pad_token_id": 0,
|
| 19 |
+
"position_embedding_type": "absolute",
|
| 20 |
+
"torch_dtype": "float32",
|
| 21 |
+
"transformers_version": "4.51.3",
|
| 22 |
+
"type_vocab_size": 2,
|
| 23 |
+
"use_cache": true,
|
| 24 |
+
"vocab_size": 30522
|
| 25 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"sentence_transformers": "4.1.0",
|
| 4 |
+
"transformers": "4.51.3",
|
| 5 |
+
"pytorch": "2.6.0+cu124"
|
| 6 |
+
},
|
| 7 |
+
"prompts": {},
|
| 8 |
+
"default_prompt_name": null,
|
| 9 |
+
"similarity_fn_name": "cosine"
|
| 10 |
+
}
|
config_setfit.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"spacy_model": "en_core_web_sm",
|
| 3 |
+
"span_context": 0,
|
| 4 |
+
"normalize_embeddings": false,
|
| 5 |
+
"labels": [
|
| 6 |
+
"no aspect",
|
| 7 |
+
"aspect"
|
| 8 |
+
]
|
| 9 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b4821e1c536f800d3bd35247973da0cf7b2562063090f832c0447c1416e7b17f
|
| 3 |
+
size 90864192
|
model_head.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0d2ef6be1cdfa64b2fe87a577fe53ead57d10c561148757fe7b593082243ef9b
|
| 3 |
+
size 3919
|
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": 256,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": {
|
| 3 |
+
"content": "[CLS]",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"mask_token": {
|
| 10 |
+
"content": "[MASK]",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "[PAD]",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"sep_token": {
|
| 24 |
+
"content": "[SEP]",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"unk_token": {
|
| 31 |
+
"content": "[UNK]",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
}
|
| 37 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": false,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_basic_tokenize": true,
|
| 47 |
+
"do_lower_case": true,
|
| 48 |
+
"extra_special_tokens": {},
|
| 49 |
+
"mask_token": "[MASK]",
|
| 50 |
+
"max_length": 128,
|
| 51 |
+
"model_max_length": 256,
|
| 52 |
+
"never_split": null,
|
| 53 |
+
"pad_to_multiple_of": null,
|
| 54 |
+
"pad_token": "[PAD]",
|
| 55 |
+
"pad_token_type_id": 0,
|
| 56 |
+
"padding_side": "right",
|
| 57 |
+
"sep_token": "[SEP]",
|
| 58 |
+
"stride": 0,
|
| 59 |
+
"strip_accents": null,
|
| 60 |
+
"tokenize_chinese_chars": true,
|
| 61 |
+
"tokenizer_class": "BertTokenizer",
|
| 62 |
+
"truncation_side": "right",
|
| 63 |
+
"truncation_strategy": "longest_first",
|
| 64 |
+
"unk_token": "[UNK]"
|
| 65 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|