Add SetFit ABSA model
Browse files- 1_Pooling/config.json +7 -0
- README.md +280 -0
- config.json +47 -0
- config_sentence_transformers.json +7 -0
- config_setfit.json +11 -0
- model.safetensors +3 -0
- model_head.pkl +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +64 -0
- vocab.txt +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,280 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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: di area tersebut makanan perancis:mungkin agak ramai di akhir pekan, tapi
|
13 |
+
suasana bagus dan ini adalah makanan prancis terbaik yang bisa anda temukan di
|
14 |
+
area tersebut makanan perancis
|
15 |
+
- text: para pelayan dan pemilik tidak:para pelayan dan pemilik tidak peduli tentang
|
16 |
+
hal ini dan berjanji untuk memanggil pembasmi tetapi tidak kecewa atau meminta
|
17 |
+
maaf seperti yang saya harapkan.
|
18 |
+
- text: suasana ramai tapi suasana:suasana ramai tapi suasana seperti bistro.
|
19 |
+
- text: menyukai artisanal! tarif perancis:jika anda menyukai anggur dan keju serta
|
20 |
+
hidangan prancis yang lezat, anda akan menyukai artisanal! tarif perancis
|
21 |
+
- text: hebat lagi, harga juga sangat terjangkau:hebat lagi, harga juga sangat terjangkau,
|
22 |
+
dan makanan sangat enak.
|
23 |
+
pipeline_tag: text-classification
|
24 |
+
inference: false
|
25 |
+
base_model: firqaaa/indo-sentence-bert-base
|
26 |
+
model-index:
|
27 |
+
- name: SetFit Polarity Model with firqaaa/indo-sentence-bert-base
|
28 |
+
results:
|
29 |
+
- task:
|
30 |
+
type: text-classification
|
31 |
+
name: Text Classification
|
32 |
+
dataset:
|
33 |
+
name: Unknown
|
34 |
+
type: unknown
|
35 |
+
split: test
|
36 |
+
metrics:
|
37 |
+
- type: accuracy
|
38 |
+
value: 0.6836734693877551
|
39 |
+
name: Accuracy
|
40 |
+
---
|
41 |
+
|
42 |
+
# SetFit Polarity Model with firqaaa/indo-sentence-bert-base
|
43 |
+
|
44 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Aspect Based Sentiment Analysis (ABSA). This SetFit model uses [firqaaa/indo-sentence-bert-base](https://huggingface.co/firqaaa/indo-sentence-bert-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. In particular, this model is in charge of classifying aspect polarities.
|
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 |
+
This model was trained within the context of a larger system for ABSA, which looks like so:
|
52 |
+
|
53 |
+
1. Use a spaCy model to select possible aspect span candidates.
|
54 |
+
2. Use a SetFit model to filter these possible aspect span candidates.
|
55 |
+
3. **Use this SetFit model to classify the filtered aspect span candidates.**
|
56 |
+
|
57 |
+
## Model Details
|
58 |
+
|
59 |
+
### Model Description
|
60 |
+
- **Model Type:** SetFit
|
61 |
+
- **Sentence Transformer body:** [firqaaa/indo-sentence-bert-base](https://huggingface.co/firqaaa/indo-sentence-bert-base)
|
62 |
+
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
63 |
+
- **spaCy Model:** id_core_news_trf
|
64 |
+
- **SetFitABSA Aspect Model:** [firqaaa/indo-setfit-absa-sentence-bert-base-p1-restaurants-aspect](https://huggingface.co/firqaaa/indo-setfit-absa-sentence-bert-base-p1-restaurants-aspect)
|
65 |
+
- **SetFitABSA Polarity Model:** [firqaaa/indo-setfit-absa-sentence-bert-base-p1-restaurants-polarity](https://huggingface.co/firqaaa/indo-setfit-absa-sentence-bert-base-p1-restaurants-polarity)
|
66 |
+
- **Maximum Sequence Length:** 512 tokens
|
67 |
+
- **Number of Classes:** 4 classes
|
68 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
69 |
+
<!-- - **Language:** Unknown -->
|
70 |
+
<!-- - **License:** Unknown -->
|
71 |
+
|
72 |
+
### Model Sources
|
73 |
+
|
74 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
75 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
76 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
77 |
+
|
78 |
+
### Model Labels
|
79 |
+
| Label | Examples |
|
80 |
+
|:--------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
81 |
+
| netral | <ul><li>'sangat kecil sehingga reservasi adalah suatu keharusan:restoran ini sangat kecil sehingga reservasi adalah suatu keharusan.'</li><li>'di dekat seorang busboy dan mendesiskan rapido:di sebelah kanan saya, nyo rumah berdiri di dekat seorang busboy dan mendesiskan rapido, rapido ketika dia mencoba membersihkan dan mengatur ulang meja untuk enam orang.'</li><li>'dan mengatur ulang meja untuk enam orang:di sebelah kanan saya, nyo rumah berdiri di dekat seorang busboy dan mendesiskan rapido, rapido ketika dia mencoba membersihkan dan mengatur ulang meja untuk enam orang.'</li></ul> |
|
82 |
+
| negatif | <ul><li>'untuk enam orang nyonya rumah:di sebelah kanan saya, nyo rumah berdiri di dekat seorang busboy dan mendesiskan rapido, rapido ketika dia mencoba membersihkan dan mengatur ulang meja untuk enam orang nyonya rumah'</li><li>'setelah berurusan dengan pizza di bawah standar:setelah berurusan dengan pizza di bawah standar di seluruh lingkungan kensington - saya menemukan sedikit tonino.'</li><li>'mereka tidak mejikan bir, anda harus:perhatikan bahwa mereka tidak mejikan bir, anda harus membawa sendiri.'</li></ul> |
|
83 |
+
| positif | <ul><li>'saya tidak menyukai gnocchi.:saya tidak menyukai gnocchi.'</li><li>'dari makanan pembuka yang kami makan:dari makanan pembuka yang kami makan, dim sum, dan variasi makanan lain, tidak mungkin untuk mengkritik makanan tersebut.'</li><li>'kami makan, dim sum, dan variasi:dari makanan pembuka yang kami makan, dim sum, dan variasi makanan lain, tidak mungkin untuk mengkritik makanan tersebut.'</li></ul> |
|
84 |
+
| konflik | <ul><li>'makanan enak tapi jangan:makanan enak tapi jangan datang ke sini dengan perut kosong.'</li><li>'milik pihak rumah tagihan:namun, setiap perselisihan tentang ruu itu diimbangi oleh takaran minuman keras yang anda tuangkan sendiri yang merupakan milik pihak rumah tagihan'</li><li>'layanan meja bisa menjadi sedikit:layanan meja bisa menjadi sedikit lebih penuh perhatian tetapi sebagai seseorang yang juga bekerja di industri jasa, saya mengerti mereka sedang sibuk.'</li></ul> |
|
85 |
+
|
86 |
+
## Evaluation
|
87 |
+
|
88 |
+
### Metrics
|
89 |
+
| Label | Accuracy |
|
90 |
+
|:--------|:---------|
|
91 |
+
| **all** | 0.6837 |
|
92 |
+
|
93 |
+
## Uses
|
94 |
+
|
95 |
+
### Direct Use for Inference
|
96 |
+
|
97 |
+
First install the SetFit library:
|
98 |
+
|
99 |
+
```bash
|
100 |
+
pip install setfit
|
101 |
+
```
|
102 |
+
|
103 |
+
Then you can load this model and run inference.
|
104 |
+
|
105 |
+
```python
|
106 |
+
from setfit import AbsaModel
|
107 |
+
|
108 |
+
# Download from the 🤗 Hub
|
109 |
+
model = AbsaModel.from_pretrained(
|
110 |
+
"firqaaa/indo-setfit-absa-sentence-bert-base-p1-restaurants-aspect",
|
111 |
+
"firqaaa/indo-setfit-absa-sentence-bert-base-p1-restaurants-polarity",
|
112 |
+
)
|
113 |
+
# Run inference
|
114 |
+
preds = model("The food was great, but the venue is just way too busy.")
|
115 |
+
```
|
116 |
+
|
117 |
+
<!--
|
118 |
+
### Downstream Use
|
119 |
+
|
120 |
+
*List how someone could finetune this model on their own dataset.*
|
121 |
+
-->
|
122 |
+
|
123 |
+
<!--
|
124 |
+
### Out-of-Scope Use
|
125 |
+
|
126 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
127 |
+
-->
|
128 |
+
|
129 |
+
<!--
|
130 |
+
## Bias, Risks and Limitations
|
131 |
+
|
132 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
133 |
+
-->
|
134 |
+
|
135 |
+
<!--
|
136 |
+
### Recommendations
|
137 |
+
|
138 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
139 |
+
-->
|
140 |
+
|
141 |
+
## Training Details
|
142 |
+
|
143 |
+
### Training Set Metrics
|
144 |
+
| Training set | Min | Median | Max |
|
145 |
+
|:-------------|:----|:--------|:----|
|
146 |
+
| Word count | 3 | 20.9935 | 62 |
|
147 |
+
|
148 |
+
| Label | Training Sample Count |
|
149 |
+
|:--------|:----------------------|
|
150 |
+
| konflik | 21 |
|
151 |
+
| negatif | 243 |
|
152 |
+
| netral | 186 |
|
153 |
+
| positif | 626 |
|
154 |
+
|
155 |
+
### Training Hyperparameters
|
156 |
+
- batch_size: (32, 32)
|
157 |
+
- num_epochs: (1, 1)
|
158 |
+
- max_steps: -1
|
159 |
+
- sampling_strategy: oversampling
|
160 |
+
- body_learning_rate: (2e-05, 1e-05)
|
161 |
+
- head_learning_rate: 0.01
|
162 |
+
- loss: CosineSimilarityLoss
|
163 |
+
- distance_metric: cosine_distance
|
164 |
+
- margin: 0.25
|
165 |
+
- end_to_end: False
|
166 |
+
- use_amp: True
|
167 |
+
- warmup_proportion: 0.1
|
168 |
+
- seed: 42
|
169 |
+
- eval_max_steps: -1
|
170 |
+
- load_best_model_at_end: True
|
171 |
+
|
172 |
+
### Training Results
|
173 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
174 |
+
|:----------:|:-------:|:-------------:|:---------------:|
|
175 |
+
| 0.0000 | 1 | 0.2996 | - |
|
176 |
+
| 0.0024 | 50 | 0.2488 | - |
|
177 |
+
| 0.0048 | 100 | 0.2636 | - |
|
178 |
+
| 0.0071 | 150 | 0.2544 | - |
|
179 |
+
| 0.0095 | 200 | 0.2036 | - |
|
180 |
+
| 0.0119 | 250 | 0.2002 | - |
|
181 |
+
| 0.0143 | 300 | 0.1723 | - |
|
182 |
+
| 0.0167 | 350 | 0.2112 | - |
|
183 |
+
| 0.0191 | 400 | 0.1655 | - |
|
184 |
+
| 0.0214 | 450 | 0.1559 | - |
|
185 |
+
| **0.0238** | **500** | **0.0602** | **0.2033** |
|
186 |
+
| 0.0262 | 550 | 0.1047 | - |
|
187 |
+
| 0.0286 | 600 | 0.1228 | - |
|
188 |
+
| 0.0310 | 650 | 0.1152 | - |
|
189 |
+
| 0.0333 | 700 | 0.0444 | - |
|
190 |
+
| 0.0357 | 750 | 0.0479 | - |
|
191 |
+
| 0.0381 | 800 | 0.065 | - |
|
192 |
+
| 0.0405 | 850 | 0.0417 | - |
|
193 |
+
| 0.0429 | 900 | 0.0647 | - |
|
194 |
+
| 0.0452 | 950 | 0.0517 | - |
|
195 |
+
| 0.0476 | 1000 | 0.0433 | 0.2399 |
|
196 |
+
| 0.0500 | 1050 | 0.0044 | - |
|
197 |
+
| 0.0524 | 1100 | 0.0241 | - |
|
198 |
+
| 0.0548 | 1150 | 0.0204 | - |
|
199 |
+
| 0.0572 | 1200 | 0.0532 | - |
|
200 |
+
| 0.0595 | 1250 | 0.0116 | - |
|
201 |
+
| 0.0619 | 1300 | 0.0288 | - |
|
202 |
+
| 0.0643 | 1350 | 0.0125 | - |
|
203 |
+
| 0.0667 | 1400 | 0.0357 | - |
|
204 |
+
| 0.0691 | 1450 | 0.0028 | - |
|
205 |
+
| 0.0714 | 1500 | 0.027 | 0.2564 |
|
206 |
+
| 0.0738 | 1550 | 0.0032 | - |
|
207 |
+
| 0.0762 | 1600 | 0.0048 | - |
|
208 |
+
| 0.0786 | 1650 | 0.0003 | - |
|
209 |
+
| 0.0810 | 1700 | 0.0008 | - |
|
210 |
+
| 0.0834 | 1750 | 0.0008 | - |
|
211 |
+
| 0.0857 | 1800 | 0.0023 | - |
|
212 |
+
| 0.0881 | 1850 | 0.0003 | - |
|
213 |
+
| 0.0905 | 1900 | 0.0004 | - |
|
214 |
+
| 0.0929 | 1950 | 0.0003 | - |
|
215 |
+
| 0.0953 | 2000 | 0.0054 | 0.2812 |
|
216 |
+
| 0.0976 | 2050 | 0.0005 | - |
|
217 |
+
| 0.1000 | 2100 | 0.0006 | - |
|
218 |
+
| 0.1024 | 2150 | 0.0004 | - |
|
219 |
+
| 0.1048 | 2200 | 0.0019 | - |
|
220 |
+
| 0.1072 | 2250 | 0.0007 | - |
|
221 |
+
| 0.1095 | 2300 | 0.0004 | - |
|
222 |
+
| 0.1119 | 2350 | 0.0001 | - |
|
223 |
+
| 0.1143 | 2400 | 0.0004 | - |
|
224 |
+
| 0.1167 | 2450 | 0.0069 | - |
|
225 |
+
| 0.1191 | 2500 | 0.0001 | 0.2845 |
|
226 |
+
| 0.1215 | 2550 | 0.0 | - |
|
227 |
+
| 0.1238 | 2600 | 0.0002 | - |
|
228 |
+
| 0.1262 | 2650 | 0.0001 | - |
|
229 |
+
| 0.1286 | 2700 | 0.0109 | - |
|
230 |
+
| 0.1310 | 2750 | 0.0037 | - |
|
231 |
+
| 0.1334 | 2800 | 0.0001 | - |
|
232 |
+
| 0.1357 | 2850 | 0.0001 | - |
|
233 |
+
| 0.1381 | 2900 | 0.0001 | - |
|
234 |
+
| 0.1405 | 2950 | 0.0001 | - |
|
235 |
+
| 0.1429 | 3000 | 0.0001 | 0.2839 |
|
236 |
+
|
237 |
+
* The bold row denotes the saved checkpoint.
|
238 |
+
### Framework Versions
|
239 |
+
- Python: 3.10.13
|
240 |
+
- SetFit: 1.0.3
|
241 |
+
- Sentence Transformers: 2.2.2
|
242 |
+
- spaCy: 3.7.4
|
243 |
+
- Transformers: 4.36.2
|
244 |
+
- PyTorch: 2.1.2+cu121
|
245 |
+
- Datasets: 2.16.1
|
246 |
+
- Tokenizers: 0.15.0
|
247 |
+
|
248 |
+
## Citation
|
249 |
+
|
250 |
+
### BibTeX
|
251 |
+
```bibtex
|
252 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
253 |
+
doi = {10.48550/ARXIV.2209.11055},
|
254 |
+
url = {https://arxiv.org/abs/2209.11055},
|
255 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
256 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
257 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
258 |
+
publisher = {arXiv},
|
259 |
+
year = {2022},
|
260 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
261 |
+
}
|
262 |
+
```
|
263 |
+
|
264 |
+
<!--
|
265 |
+
## Glossary
|
266 |
+
|
267 |
+
*Clearly define terms in order to be accessible across audiences.*
|
268 |
+
-->
|
269 |
+
|
270 |
+
<!--
|
271 |
+
## Model Card Authors
|
272 |
+
|
273 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
274 |
+
-->
|
275 |
+
|
276 |
+
<!--
|
277 |
+
## Model Card Contact
|
278 |
+
|
279 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
280 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "models/step_500/",
|
3 |
+
"_num_labels": 5,
|
4 |
+
"architectures": [
|
5 |
+
"BertModel"
|
6 |
+
],
|
7 |
+
"attention_probs_dropout_prob": 0.1,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"directionality": "bidi",
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 768,
|
13 |
+
"id2label": {
|
14 |
+
"0": "LABEL_0",
|
15 |
+
"1": "LABEL_1",
|
16 |
+
"2": "LABEL_2",
|
17 |
+
"3": "LABEL_3",
|
18 |
+
"4": "LABEL_4"
|
19 |
+
},
|
20 |
+
"initializer_range": 0.02,
|
21 |
+
"intermediate_size": 3072,
|
22 |
+
"label2id": {
|
23 |
+
"LABEL_0": 0,
|
24 |
+
"LABEL_1": 1,
|
25 |
+
"LABEL_2": 2,
|
26 |
+
"LABEL_3": 3,
|
27 |
+
"LABEL_4": 4
|
28 |
+
},
|
29 |
+
"layer_norm_eps": 1e-12,
|
30 |
+
"max_position_embeddings": 512,
|
31 |
+
"model_type": "bert",
|
32 |
+
"num_attention_heads": 12,
|
33 |
+
"num_hidden_layers": 12,
|
34 |
+
"output_past": true,
|
35 |
+
"pad_token_id": 0,
|
36 |
+
"pooler_fc_size": 768,
|
37 |
+
"pooler_num_attention_heads": 12,
|
38 |
+
"pooler_num_fc_layers": 3,
|
39 |
+
"pooler_size_per_head": 128,
|
40 |
+
"pooler_type": "first_token_transform",
|
41 |
+
"position_embedding_type": "absolute",
|
42 |
+
"torch_dtype": "float32",
|
43 |
+
"transformers_version": "4.36.2",
|
44 |
+
"type_vocab_size": 2,
|
45 |
+
"use_cache": true,
|
46 |
+
"vocab_size": 50000
|
47 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "2.2.2",
|
4 |
+
"transformers": "4.20.1",
|
5 |
+
"pytorch": "1.11.0"
|
6 |
+
}
|
7 |
+
}
|
config_setfit.json
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"labels": [
|
3 |
+
"konflik",
|
4 |
+
"negatif",
|
5 |
+
"netral",
|
6 |
+
"positif"
|
7 |
+
],
|
8 |
+
"spacy_model": "id_core_news_trf",
|
9 |
+
"span_context": 3,
|
10 |
+
"normalize_embeddings": false
|
11 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e75903b9d43b34a9602d4470583b192ab954eaad3938be8194373d688bd884c
|
3 |
+
size 497787752
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:59f44ec07fb9b9dace9551bb690bc911ad26d46608df4ea725d60dc16975f68e
|
3 |
+
size 25543
|
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": 512,
|
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,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"1": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"4": {
|
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": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_basic_tokenize": true,
|
47 |
+
"do_lower_case": true,
|
48 |
+
"mask_token": "[MASK]",
|
49 |
+
"max_length": 512,
|
50 |
+
"model_max_length": 1000000000000000019884624838656,
|
51 |
+
"never_split": null,
|
52 |
+
"pad_to_multiple_of": null,
|
53 |
+
"pad_token": "[PAD]",
|
54 |
+
"pad_token_type_id": 0,
|
55 |
+
"padding_side": "right",
|
56 |
+
"sep_token": "[SEP]",
|
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 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|