Commit
•
c9d4561
0
Parent(s):
Duplicate from joshuasundance/setfit-absa-all-mpnet-base-v2-laptops-polarity
Browse filesCo-authored-by: Joshua Sundance Bailey <[email protected]>
- .gitattributes +35 -0
- 1_Pooling/config.json +9 -0
- README.md +234 -0
- config.json +24 -0
- config_sentence_transformers.json +7 -0
- config_setfit.json +11 -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 +72 -0
- vocab.txt +0 -0
.gitattributes
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
32 |
+
*.xz 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
|
1_Pooling/config.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
}
|
README.md
ADDED
@@ -0,0 +1,234 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: setfit
|
3 |
+
tags:
|
4 |
+
- setfit
|
5 |
+
- absa
|
6 |
+
- sentence-transformers
|
7 |
+
- text-classification
|
8 |
+
- generated_from_setfit_trainer
|
9 |
+
metrics:
|
10 |
+
- accuracy
|
11 |
+
widget:
|
12 |
+
- text: louder and the mouse didnt break:I wish the volume could be louder and the
|
13 |
+
mouse didnt break after only a month.
|
14 |
+
- text: + + (sales, service,:BEST BUY - 5 STARS + + + (sales, service, respect for
|
15 |
+
old men who aren't familiar with the technology) DELL COMPUTERS - 3 stars DELL
|
16 |
+
SUPPORT - owes a me a couple
|
17 |
+
- text: back and my built-in webcam and built-:I got it back and my built-in webcam
|
18 |
+
and built-in mic were shorting out anytime I touched the lid, (mind you this was
|
19 |
+
my means of communication with my fiance who was deployed) but I suffered thru
|
20 |
+
it and would constandly have to reset the computer to be able to use my cam and
|
21 |
+
mic anytime they went out.
|
22 |
+
- text: after i install Mozzilla firfox i love every:the only fact i dont like about
|
23 |
+
apples is they generally use safari and i dont use safari but after i install
|
24 |
+
Mozzilla firfox i love every single bit about it.
|
25 |
+
- text: in webcam and built-in mic were shorting out:I got it back and my built-in
|
26 |
+
webcam and built-in mic were shorting out anytime I touched the lid, (mind you
|
27 |
+
this was my means of communication with my fiance who was deployed) but I suffered
|
28 |
+
thru it and would constandly have to reset the computer to be able to use my cam
|
29 |
+
and mic anytime they went out.
|
30 |
+
pipeline_tag: text-classification
|
31 |
+
inference: false
|
32 |
+
base_model: sentence-transformers/all-mpnet-base-v2
|
33 |
+
model-index:
|
34 |
+
- name: SetFit Polarity Model with sentence-transformers/all-mpnet-base-v2
|
35 |
+
results:
|
36 |
+
- task:
|
37 |
+
type: text-classification
|
38 |
+
name: Text Classification
|
39 |
+
dataset:
|
40 |
+
name: tomaarsen/setfit-absa-semeval-laptops
|
41 |
+
type: unknown
|
42 |
+
split: test
|
43 |
+
metrics:
|
44 |
+
- type: accuracy
|
45 |
+
value: 0.7007874015748031
|
46 |
+
name: Accuracy
|
47 |
+
---
|
48 |
+
|
49 |
+
# SetFit Polarity Model with sentence-transformers/all-mpnet-base-v2
|
50 |
+
|
51 |
+
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-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-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 classifying aspect polarities.
|
52 |
+
|
53 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
54 |
+
|
55 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
56 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
57 |
+
|
58 |
+
This model was trained within the context of a larger system for ABSA, which looks like so:
|
59 |
+
|
60 |
+
1. Use a spaCy model to select possible aspect span candidates.
|
61 |
+
2. Use a SetFit model to filter these possible aspect span candidates.
|
62 |
+
3. **Use this SetFit model to classify the filtered aspect span candidates.**
|
63 |
+
|
64 |
+
## Model Details
|
65 |
+
|
66 |
+
### Model Description
|
67 |
+
- **Model Type:** SetFit
|
68 |
+
- **Sentence Transformer body:** [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)
|
69 |
+
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
70 |
+
- **spaCy Model:** en_core_web_sm
|
71 |
+
- **SetFitABSA Aspect Model:** [joshuasundance/setfit-absa-all-MiniLM-L6-v2-laptops-aspect](https://huggingface.co/joshuasundance/setfit-absa-all-MiniLM-L6-v2-laptops-aspect)
|
72 |
+
- **SetFitABSA Polarity Model:** [joshuasundance/setfit-absa-all-mpnet-base-v2-laptops-polarity](https://huggingface.co/joshuasundance/setfit-absa-all-mpnet-base-v2-laptops-polarity)
|
73 |
+
- **Maximum Sequence Length:** 384 tokens
|
74 |
+
- **Number of Classes:** 4 classes
|
75 |
+
<!-- - **Training Dataset:** [tomaarsen/setfit-absa-semeval-laptops](https://huggingface.co/datasets/tomaarsen/setfit-absa-semeval-laptops) -->
|
76 |
+
<!-- - **Language:** Unknown -->
|
77 |
+
<!-- - **License:** Unknown -->
|
78 |
+
|
79 |
+
### Model Sources
|
80 |
+
|
81 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
82 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
83 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
84 |
+
|
85 |
+
### Model Labels
|
86 |
+
| Label | Examples |
|
87 |
+
|:---------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
88 |
+
| neutral | <ul><li>'skip taking the cord with me because:I charge it at night and skip taking the cord with me because of the good battery life.'</li><li>'The tech guy then said the:The tech guy then said the service center does not do 1-to-1 exchange and I have to direct my concern to the "sales" team, which is the retail shop which I bought my netbook from.'</li><li>'all dark, power light steady, hard:\xa0One night I turned the freaking thing off after using it, the next day I turn it on, no GUI, screen all dark, power light steady, hard drive light steady and not flashing as it usually does.'</li></ul> |
|
89 |
+
| positive | <ul><li>'of the good battery life.:I charge it at night and skip taking the cord with me because of the good battery life.'</li><li>'is of high quality, has a:it is of high quality, has a killer GUI, is extremely stable, is highly expandable, is bundled with lots of very good applications, is easy to use, and is absolutely gorgeous.'</li><li>'has a killer GUI, is extremely:it is of high quality, has a killer GUI, is extremely stable, is highly expandable, is bundled with lots of very good applications, is easy to use, and is absolutely gorgeous.'</li></ul> |
|
90 |
+
| negative | <ul><li>'then said the service center does not do:The tech guy then said the service center does not do 1-to-1 exchange and I have to direct my concern to the "sales" team, which is the retail shop which I bought my netbook from.'</li><li>'concern to the "sales" team, which is:The tech guy then said the service center does not do 1-to-1 exchange and I have to direct my concern to the "sales" team, which is the retail shop which I bought my netbook from.'</li><li>'on, no GUI, screen all:\xa0One night I turned the freaking thing off after using it, the next day I turn it on, no GUI, screen all dark, power light steady, hard drive light steady and not flashing as it usually does.'</li></ul> |
|
91 |
+
| conflict | <ul><li>'-No backlit keyboard, but not:-No backlit keyboard, but not an issue for me.'</li><li>"to replace the battery once, but:I did have to replace the battery once, but that was only a couple months ago and it's been working perfect ever since."</li></ul> |
|
92 |
+
|
93 |
+
## Evaluation
|
94 |
+
|
95 |
+
### Metrics
|
96 |
+
| Label | Accuracy |
|
97 |
+
|:--------|:---------|
|
98 |
+
| **all** | 0.7008 |
|
99 |
+
|
100 |
+
## Uses
|
101 |
+
|
102 |
+
### Direct Use for Inference
|
103 |
+
|
104 |
+
First install the SetFit library:
|
105 |
+
|
106 |
+
```bash
|
107 |
+
pip install setfit
|
108 |
+
```
|
109 |
+
|
110 |
+
Then you can load this model and run inference.
|
111 |
+
|
112 |
+
```python
|
113 |
+
from setfit import AbsaModel
|
114 |
+
|
115 |
+
# Download from the 🤗 Hub
|
116 |
+
model = AbsaModel.from_pretrained(
|
117 |
+
"joshuasundance/setfit-absa-all-MiniLM-L6-v2-laptops-aspect",
|
118 |
+
"joshuasundance/setfit-absa-all-mpnet-base-v2-laptops-polarity",
|
119 |
+
spacy_model="en_core_web_sm",
|
120 |
+
)
|
121 |
+
# Run inference
|
122 |
+
preds = model("This laptop meets every expectation and Windows 7 is great!")
|
123 |
+
```
|
124 |
+
|
125 |
+
<!--
|
126 |
+
### Downstream Use
|
127 |
+
|
128 |
+
*List how someone could finetune this model on their own dataset.*
|
129 |
+
-->
|
130 |
+
|
131 |
+
<!--
|
132 |
+
### Out-of-Scope Use
|
133 |
+
|
134 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
135 |
+
-->
|
136 |
+
|
137 |
+
<!--
|
138 |
+
## Bias, Risks and Limitations
|
139 |
+
|
140 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
141 |
+
-->
|
142 |
+
|
143 |
+
<!--
|
144 |
+
### Recommendations
|
145 |
+
|
146 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
147 |
+
-->
|
148 |
+
|
149 |
+
## Training Details
|
150 |
+
|
151 |
+
### Training Set Metrics
|
152 |
+
| Training set | Min | Median | Max |
|
153 |
+
|:-------------|:----|:--------|:----|
|
154 |
+
| Word count | 3 | 25.5873 | 48 |
|
155 |
+
|
156 |
+
| Label | Training Sample Count |
|
157 |
+
|:---------|:----------------------|
|
158 |
+
| conflict | 2 |
|
159 |
+
| negative | 45 |
|
160 |
+
| neutral | 30 |
|
161 |
+
| positive | 49 |
|
162 |
+
|
163 |
+
### Training Hyperparameters
|
164 |
+
- batch_size: (128, 128)
|
165 |
+
- num_epochs: (5, 5)
|
166 |
+
- max_steps: -1
|
167 |
+
- sampling_strategy: oversampling
|
168 |
+
- body_learning_rate: (2e-05, 1e-05)
|
169 |
+
- head_learning_rate: 0.01
|
170 |
+
- loss: CosineSimilarityLoss
|
171 |
+
- distance_metric: cosine_distance
|
172 |
+
- margin: 0.25
|
173 |
+
- end_to_end: False
|
174 |
+
- use_amp: True
|
175 |
+
- warmup_proportion: 0.1
|
176 |
+
- seed: 42
|
177 |
+
- eval_max_steps: -1
|
178 |
+
- load_best_model_at_end: True
|
179 |
+
|
180 |
+
### Training Results
|
181 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
182 |
+
|:----------:|:------:|:-------------:|:---------------:|
|
183 |
+
| 0.0120 | 1 | 0.2721 | - |
|
184 |
+
| **0.6024** | **50** | **0.0894** | **0.2059** |
|
185 |
+
| 1.2048 | 100 | 0.0014 | 0.2309 |
|
186 |
+
| 1.8072 | 150 | 0.0006 | 0.2359 |
|
187 |
+
| 2.4096 | 200 | 0.0005 | 0.2373 |
|
188 |
+
| 3.0120 | 250 | 0.0004 | 0.2364 |
|
189 |
+
| 3.6145 | 300 | 0.0003 | 0.2371 |
|
190 |
+
|
191 |
+
* The bold row denotes the saved checkpoint.
|
192 |
+
### Framework Versions
|
193 |
+
- Python: 3.11.7
|
194 |
+
- SetFit: 1.0.3
|
195 |
+
- Sentence Transformers: 2.3.0
|
196 |
+
- spaCy: 3.7.2
|
197 |
+
- Transformers: 4.37.2
|
198 |
+
- PyTorch: 2.1.2+cu118
|
199 |
+
- Datasets: 2.16.1
|
200 |
+
- Tokenizers: 0.15.1
|
201 |
+
|
202 |
+
## Citation
|
203 |
+
|
204 |
+
### BibTeX
|
205 |
+
```bibtex
|
206 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
207 |
+
doi = {10.48550/ARXIV.2209.11055},
|
208 |
+
url = {https://arxiv.org/abs/2209.11055},
|
209 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
210 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
211 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
212 |
+
publisher = {arXiv},
|
213 |
+
year = {2022},
|
214 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
215 |
+
}
|
216 |
+
```
|
217 |
+
|
218 |
+
<!--
|
219 |
+
## Glossary
|
220 |
+
|
221 |
+
*Clearly define terms in order to be accessible across audiences.*
|
222 |
+
-->
|
223 |
+
|
224 |
+
<!--
|
225 |
+
## Model Card Authors
|
226 |
+
|
227 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
228 |
+
-->
|
229 |
+
|
230 |
+
<!--
|
231 |
+
## Model Card Contact
|
232 |
+
|
233 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
234 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "models\\step_50",
|
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.37.2",
|
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.6.1",
|
5 |
+
"pytorch": "1.8.1"
|
6 |
+
}
|
7 |
+
}
|
config_setfit.json
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"spacy_model": "en_core_web_sm",
|
3 |
+
"labels": [
|
4 |
+
"conflict",
|
5 |
+
"negative",
|
6 |
+
"neutral",
|
7 |
+
"positive"
|
8 |
+
],
|
9 |
+
"normalize_embeddings": false,
|
10 |
+
"span_context": 3
|
11 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:044528001fa520cf8b424c5e6d3f59cdd18e4eb3c0ecd4f34ef59ffc491d8c75
|
3 |
+
size 437967672
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:997c8cb6395841b75b502d811d3151392313529db6da426d09843f0d25b78faf
|
3 |
+
size 25559
|
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": 384,
|
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,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": true,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"104": {
|
36 |
+
"content": "[UNK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
},
|
43 |
+
"30526": {
|
44 |
+
"content": "<mask>",
|
45 |
+
"lstrip": true,
|
46 |
+
"normalized": false,
|
47 |
+
"rstrip": false,
|
48 |
+
"single_word": false,
|
49 |
+
"special": true
|
50 |
+
}
|
51 |
+
},
|
52 |
+
"bos_token": "<s>",
|
53 |
+
"clean_up_tokenization_spaces": true,
|
54 |
+
"cls_token": "<s>",
|
55 |
+
"do_lower_case": true,
|
56 |
+
"eos_token": "</s>",
|
57 |
+
"mask_token": "<mask>",
|
58 |
+
"max_length": 128,
|
59 |
+
"model_max_length": 512,
|
60 |
+
"pad_to_multiple_of": null,
|
61 |
+
"pad_token": "<pad>",
|
62 |
+
"pad_token_type_id": 0,
|
63 |
+
"padding_side": "right",
|
64 |
+
"sep_token": "</s>",
|
65 |
+
"stride": 0,
|
66 |
+
"strip_accents": null,
|
67 |
+
"tokenize_chinese_chars": true,
|
68 |
+
"tokenizer_class": "MPNetTokenizer",
|
69 |
+
"truncation_side": "right",
|
70 |
+
"truncation_strategy": "longest_first",
|
71 |
+
"unk_token": "[UNK]"
|
72 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|