Add SetFit model
Browse files- 1_Pooling/config.json +7 -0
- README.md +331 -0
- config.json +47 -0
- config_sentence_transformers.json +7 -0
- config_setfit.json +10 -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,331 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: setfit
|
3 |
+
tags:
|
4 |
+
- setfit
|
5 |
+
- sentence-transformers
|
6 |
+
- text-classification
|
7 |
+
- generated_from_setfit_trainer
|
8 |
+
metrics:
|
9 |
+
- accuracy
|
10 |
+
widget:
|
11 |
+
- text: aku hanya menyukai setiap menit film ini.
|
12 |
+
- text: bioskop orang dalam kondisi terbaiknya.
|
13 |
+
- text: bukan untuk orang yang mudah tersinggung atau mudah tersinggung, ini adalah
|
14 |
+
pemeriksaan yang berani dan berkepanjangan terhadap budaya yang diidolakan, kebencian
|
15 |
+
terhadap diri sendiri, dan politik seksual.
|
16 |
+
- text: itu curang.
|
17 |
+
- text: Meskipun penduduk setempat akan senang melihat situs-situs Cleveland, seluruh
|
18 |
+
dunia akan menikmati komedi bertempo cepat dengan keunikan yang mungkin membuat
|
19 |
+
iri para coen bersaudara yang telah memenangkan penghargaan.
|
20 |
+
pipeline_tag: text-classification
|
21 |
+
inference: true
|
22 |
+
base_model: firqaaa/indo-sentence-bert-base
|
23 |
+
model-index:
|
24 |
+
- name: SetFit with firqaaa/indo-sentence-bert-base
|
25 |
+
results:
|
26 |
+
- task:
|
27 |
+
type: text-classification
|
28 |
+
name: Text Classification
|
29 |
+
dataset:
|
30 |
+
name: Unknown
|
31 |
+
type: unknown
|
32 |
+
split: test
|
33 |
+
metrics:
|
34 |
+
- type: accuracy
|
35 |
+
value: 0.3425339366515837
|
36 |
+
name: Accuracy
|
37 |
+
---
|
38 |
+
|
39 |
+
# SetFit with firqaaa/indo-sentence-bert-base
|
40 |
+
|
41 |
+
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [firqaaa/indo-sentence-bert-base](https://huggingface.co/firqaaa/indo-sentence-bert-base) as the Sentence Transformer embedding model. A [SetFitHead](huggingface.co/docs/setfit/reference/main#setfit.SetFitHead) instance is used for classification.
|
42 |
+
|
43 |
+
The model has been trained using an efficient few-shot learning technique that involves:
|
44 |
+
|
45 |
+
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
|
46 |
+
2. Training a classification head with features from the fine-tuned Sentence Transformer.
|
47 |
+
|
48 |
+
## Model Details
|
49 |
+
|
50 |
+
### Model Description
|
51 |
+
- **Model Type:** SetFit
|
52 |
+
- **Sentence Transformer body:** [firqaaa/indo-sentence-bert-base](https://huggingface.co/firqaaa/indo-sentence-bert-base)
|
53 |
+
- **Classification head:** a [SetFitHead](huggingface.co/docs/setfit/reference/main#setfit.SetFitHead) instance
|
54 |
+
- **Maximum Sequence Length:** 512 tokens
|
55 |
+
- **Number of Classes:** 5 classes
|
56 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
57 |
+
<!-- - **Language:** Unknown -->
|
58 |
+
<!-- - **License:** Unknown -->
|
59 |
+
|
60 |
+
### Model Sources
|
61 |
+
|
62 |
+
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
|
63 |
+
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
|
64 |
+
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
65 |
+
|
66 |
+
### Model Labels
|
67 |
+
| Label | Examples |
|
68 |
+
|:---------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
69 |
+
| sangat positif | <ul><li>"tema universal untuk menjadi orang yang lebih baik melalui cinta belum pernah difilmkan dengan cara yang lebih menarik daripada di `baran. '"</li><li>'hangat dalam penggambaran manusia sehari-hari yang penuh kasih namun tidak konsisten, santai dalam langkah tenang yang sempurna, dan bangga dalam pesannya.'</li><li>'kecerdasan yang mendalam serta kasih sayang yang hangat dan menyelimuti terhembus dari setiap bingkainya.'</li></ul> |
|
70 |
+
| sangat negatif | <ul><li>'sebuah film kejam yang dibuat oleh seseorang yang pasti membaca catcher in the rye tetapi jelas-jelas menderita disleksia'</li><li>"all the queen's men adalah film perang kemunduran yang gagal dalam berbagai tingkatan, sehingga harus membayar ganti rugi kepada pemirsa."</li><li>'... ini bahkan bukan film yang bisa kita nikmati sebagai pelarian ringan; ini adalah ketakutan dan frustrasi yang dipicu hingga tingkat yang tidak dapat ditoleransi.'</li></ul> |
|
71 |
+
| positif | <ul><li>'direktur kredit ramsay karena mengambil cerita yang terkadang mustahil dan membuatnya terasa realistis.'</li><li>'patut diberi hormat hanya karena mencoba menjadi lebih kompleks daripada film rata-rata Anda.'</li><li>'tapi secara keseluruhan, Anda akan menyukai film ini.'</li></ul> |
|
72 |
+
| negatif | <ul><li>'semua orang harus disalahkan di sini.'</li><li>'tontonan hingar bingar -lrb- di acara TV -rrb- biasanya telah diragi oleh pesona yang secara mencolok hilang dari ledakan layar lebar gadis-gadis itu.'</li><li>'alur cerita, karakter, drama, emosi, ide – semuanya tidak relevan dengan pengalaman melihat raja kalajengking.'</li></ul> |
|
73 |
+
| netral | <ul><li>'affleck hanya menciptakan garis besar untuk sebuah peran yang masih perlu ia kembangkan, sebuah peran yang dengan mudah dipenuhi dengan otoritas.'</li><li>'sutradara oliver parker bekerja keras untuk mengubah kehidupan menjadi pentingnya bersikap sungguh-sungguh sehingga dia mungkin menarik satu atau dua otot.'</li><li>'clayburgh dan tambor adalah pemain yang menawan; tak satu pun dari mereka pantas menerima Eric Schaeffer.'</li></ul> |
|
74 |
+
|
75 |
+
## Evaluation
|
76 |
+
|
77 |
+
### Metrics
|
78 |
+
| Label | Accuracy |
|
79 |
+
|:--------|:---------|
|
80 |
+
| **all** | 0.3425 |
|
81 |
+
|
82 |
+
## Uses
|
83 |
+
|
84 |
+
### Direct Use for Inference
|
85 |
+
|
86 |
+
First install the SetFit library:
|
87 |
+
|
88 |
+
```bash
|
89 |
+
pip install setfit
|
90 |
+
```
|
91 |
+
|
92 |
+
Then you can load this model and run inference.
|
93 |
+
|
94 |
+
```python
|
95 |
+
from setfit import SetFitModel
|
96 |
+
|
97 |
+
# Download from the 🤗 Hub
|
98 |
+
model = SetFitModel.from_pretrained("firqaaa/indo-setfit-bert-base-p2")
|
99 |
+
# Run inference
|
100 |
+
preds = model("itu curang.")
|
101 |
+
```
|
102 |
+
|
103 |
+
<!--
|
104 |
+
### Downstream Use
|
105 |
+
|
106 |
+
*List how someone could finetune this model on their own dataset.*
|
107 |
+
-->
|
108 |
+
|
109 |
+
<!--
|
110 |
+
### Out-of-Scope Use
|
111 |
+
|
112 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
113 |
+
-->
|
114 |
+
|
115 |
+
<!--
|
116 |
+
## Bias, Risks and Limitations
|
117 |
+
|
118 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
119 |
+
-->
|
120 |
+
|
121 |
+
<!--
|
122 |
+
### Recommendations
|
123 |
+
|
124 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
125 |
+
-->
|
126 |
+
|
127 |
+
## Training Details
|
128 |
+
|
129 |
+
### Training Set Metrics
|
130 |
+
| Training set | Min | Median | Max |
|
131 |
+
|:-------------|:----|:-------|:----|
|
132 |
+
| Word count | 2 | 15.476 | 46 |
|
133 |
+
|
134 |
+
| Label | Training Sample Count |
|
135 |
+
|:---------------|:----------------------|
|
136 |
+
| sangat negatif | 200 |
|
137 |
+
| negatif | 200 |
|
138 |
+
| netral | 200 |
|
139 |
+
| positif | 200 |
|
140 |
+
| sangat positif | 200 |
|
141 |
+
|
142 |
+
### Training Hyperparameters
|
143 |
+
- batch_size: (128, 32)
|
144 |
+
- num_epochs: (1, 8)
|
145 |
+
- max_steps: -1
|
146 |
+
- sampling_strategy: oversampling
|
147 |
+
- body_learning_rate: (2e-05, 5e-06)
|
148 |
+
- head_learning_rate: 2e-05
|
149 |
+
- loss: CosineSimilarityLoss
|
150 |
+
- distance_metric: cosine_distance
|
151 |
+
- margin: 0.25
|
152 |
+
- end_to_end: False
|
153 |
+
- use_amp: False
|
154 |
+
- warmup_proportion: 0.1
|
155 |
+
- seed: 42
|
156 |
+
- eval_max_steps: -1
|
157 |
+
- load_best_model_at_end: True
|
158 |
+
|
159 |
+
### Training Results
|
160 |
+
| Epoch | Step | Training Loss | Validation Loss |
|
161 |
+
|:-------:|:--------:|:-------------:|:---------------:|
|
162 |
+
| 0.0002 | 1 | 0.3317 | - |
|
163 |
+
| 0.008 | 50 | 0.2883 | - |
|
164 |
+
| 0.016 | 100 | 0.2625 | - |
|
165 |
+
| 0.024 | 150 | 0.2516 | - |
|
166 |
+
| 0.032 | 200 | 0.2075 | - |
|
167 |
+
| 0.04 | 250 | 0.184 | - |
|
168 |
+
| 0.048 | 300 | 0.1632 | - |
|
169 |
+
| 0.056 | 350 | 0.1105 | - |
|
170 |
+
| 0.064 | 400 | 0.1109 | - |
|
171 |
+
| 0.072 | 450 | 0.0934 | - |
|
172 |
+
| 0.08 | 500 | 0.0518 | - |
|
173 |
+
| 0.088 | 550 | 0.0246 | - |
|
174 |
+
| 0.096 | 600 | 0.0133 | - |
|
175 |
+
| 0.104 | 650 | 0.0056 | - |
|
176 |
+
| 0.112 | 700 | 0.006 | - |
|
177 |
+
| 0.12 | 750 | 0.0072 | - |
|
178 |
+
| 0.128 | 800 | 0.0179 | - |
|
179 |
+
| 0.136 | 850 | 0.0025 | - |
|
180 |
+
| 0.144 | 900 | 0.0019 | - |
|
181 |
+
| 0.152 | 950 | 0.0008 | - |
|
182 |
+
| 0.16 | 1000 | 0.0009 | - |
|
183 |
+
| 0.168 | 1050 | 0.0016 | - |
|
184 |
+
| 0.176 | 1100 | 0.0008 | - |
|
185 |
+
| 0.184 | 1150 | 0.0009 | - |
|
186 |
+
| 0.192 | 1200 | 0.0006 | - |
|
187 |
+
| 0.2 | 1250 | 0.0112 | - |
|
188 |
+
| 0.208 | 1300 | 0.0007 | - |
|
189 |
+
| 0.216 | 1350 | 0.0005 | - |
|
190 |
+
| 0.224 | 1400 | 0.0006 | - |
|
191 |
+
| 0.232 | 1450 | 0.0004 | - |
|
192 |
+
| 0.24 | 1500 | 0.0003 | - |
|
193 |
+
| 0.248 | 1550 | 0.0111 | - |
|
194 |
+
| 0.256 | 1600 | 0.0007 | - |
|
195 |
+
| 0.264 | 1650 | 0.0004 | - |
|
196 |
+
| 0.272 | 1700 | 0.0068 | - |
|
197 |
+
| 0.28 | 1750 | 0.0006 | - |
|
198 |
+
| 0.288 | 1800 | 0.008 | - |
|
199 |
+
| 0.296 | 1850 | 0.0004 | - |
|
200 |
+
| 0.304 | 1900 | 0.0009 | - |
|
201 |
+
| 0.312 | 1950 | 0.0004 | - |
|
202 |
+
| 0.32 | 2000 | 0.0003 | - |
|
203 |
+
| 0.328 | 2050 | 0.0034 | - |
|
204 |
+
| 0.336 | 2100 | 0.0003 | - |
|
205 |
+
| 0.344 | 2150 | 0.0002 | - |
|
206 |
+
| 0.352 | 2200 | 0.0002 | - |
|
207 |
+
| 0.36 | 2250 | 0.0002 | - |
|
208 |
+
| 0.368 | 2300 | 0.0002 | - |
|
209 |
+
| 0.376 | 2350 | 0.0002 | - |
|
210 |
+
| 0.384 | 2400 | 0.0002 | - |
|
211 |
+
| 0.392 | 2450 | 0.0001 | - |
|
212 |
+
| 0.4 | 2500 | 0.0002 | - |
|
213 |
+
| 0.408 | 2550 | 0.0001 | - |
|
214 |
+
| 0.416 | 2600 | 0.0001 | - |
|
215 |
+
| 0.424 | 2650 | 0.0002 | - |
|
216 |
+
| 0.432 | 2700 | 0.0001 | - |
|
217 |
+
| 0.44 | 2750 | 0.0001 | - |
|
218 |
+
| 0.448 | 2800 | 0.0001 | - |
|
219 |
+
| 0.456 | 2850 | 0.0003 | - |
|
220 |
+
| 0.464 | 2900 | 0.0001 | - |
|
221 |
+
| 0.472 | 2950 | 0.0001 | - |
|
222 |
+
| 0.48 | 3000 | 0.0004 | - |
|
223 |
+
| 0.488 | 3050 | 0.0002 | - |
|
224 |
+
| 0.496 | 3100 | 0.0001 | - |
|
225 |
+
| 0.504 | 3150 | 0.0003 | - |
|
226 |
+
| 0.512 | 3200 | 0.0001 | - |
|
227 |
+
| 0.52 | 3250 | 0.0001 | - |
|
228 |
+
| 0.528 | 3300 | 0.0002 | - |
|
229 |
+
| 0.536 | 3350 | 0.0001 | - |
|
230 |
+
| 0.544 | 3400 | 0.0001 | - |
|
231 |
+
| 0.552 | 3450 | 0.0001 | - |
|
232 |
+
| 0.56 | 3500 | 0.0001 | - |
|
233 |
+
| 0.568 | 3550 | 0.0001 | - |
|
234 |
+
| 0.576 | 3600 | 0.0001 | - |
|
235 |
+
| 0.584 | 3650 | 0.0001 | - |
|
236 |
+
| 0.592 | 3700 | 0.0001 | - |
|
237 |
+
| 0.6 | 3750 | 0.0 | - |
|
238 |
+
| 0.608 | 3800 | 0.0001 | - |
|
239 |
+
| 0.616 | 3850 | 0.0001 | - |
|
240 |
+
| 0.624 | 3900 | 0.0001 | - |
|
241 |
+
| 0.632 | 3950 | 0.0001 | - |
|
242 |
+
| 0.64 | 4000 | 0.0003 | - |
|
243 |
+
| 0.648 | 4050 | 0.0001 | - |
|
244 |
+
| 0.656 | 4100 | 0.0001 | - |
|
245 |
+
| 0.664 | 4150 | 0.0001 | - |
|
246 |
+
| 0.672 | 4200 | 0.0001 | - |
|
247 |
+
| 0.68 | 4250 | 0.0001 | - |
|
248 |
+
| 0.688 | 4300 | 0.0001 | - |
|
249 |
+
| 0.696 | 4350 | 0.0001 | - |
|
250 |
+
| 0.704 | 4400 | 0.0001 | - |
|
251 |
+
| 0.712 | 4450 | 0.0001 | - |
|
252 |
+
| 0.72 | 4500 | 0.0001 | - |
|
253 |
+
| 0.728 | 4550 | 0.0001 | - |
|
254 |
+
| 0.736 | 4600 | 0.0001 | - |
|
255 |
+
| 0.744 | 4650 | 0.0001 | - |
|
256 |
+
| 0.752 | 4700 | 0.0001 | - |
|
257 |
+
| 0.76 | 4750 | 0.0001 | - |
|
258 |
+
| 0.768 | 4800 | 0.0001 | - |
|
259 |
+
| 0.776 | 4850 | 0.0001 | - |
|
260 |
+
| 0.784 | 4900 | 0.0001 | - |
|
261 |
+
| 0.792 | 4950 | 0.0001 | - |
|
262 |
+
| 0.8 | 5000 | 0.0 | - |
|
263 |
+
| 0.808 | 5050 | 0.0001 | - |
|
264 |
+
| 0.816 | 5100 | 0.0001 | - |
|
265 |
+
| 0.824 | 5150 | 0.0001 | - |
|
266 |
+
| 0.832 | 5200 | 0.0 | - |
|
267 |
+
| 0.84 | 5250 | 0.0001 | - |
|
268 |
+
| 0.848 | 5300 | 0.0001 | - |
|
269 |
+
| 0.856 | 5350 | 0.0 | - |
|
270 |
+
| 0.864 | 5400 | 0.0001 | - |
|
271 |
+
| 0.872 | 5450 | 0.0001 | - |
|
272 |
+
| 0.88 | 5500 | 0.0001 | - |
|
273 |
+
| 0.888 | 5550 | 0.0001 | - |
|
274 |
+
| 0.896 | 5600 | 0.0 | - |
|
275 |
+
| 0.904 | 5650 | 0.0001 | - |
|
276 |
+
| 0.912 | 5700 | 0.0001 | - |
|
277 |
+
| 0.92 | 5750 | 0.0001 | - |
|
278 |
+
| 0.928 | 5800 | 0.0 | - |
|
279 |
+
| 0.936 | 5850 | 0.0 | - |
|
280 |
+
| 0.944 | 5900 | 0.0 | - |
|
281 |
+
| 0.952 | 5950 | 0.0 | - |
|
282 |
+
| 0.96 | 6000 | 0.0 | - |
|
283 |
+
| 0.968 | 6050 | 0.0 | - |
|
284 |
+
| 0.976 | 6100 | 0.0001 | - |
|
285 |
+
| 0.984 | 6150 | 0.0 | - |
|
286 |
+
| 0.992 | 6200 | 0.0 | - |
|
287 |
+
| **1.0** | **6250** | **0.0** | **0.3546** |
|
288 |
+
|
289 |
+
* The bold row denotes the saved checkpoint.
|
290 |
+
### Framework Versions
|
291 |
+
- Python: 3.10.13
|
292 |
+
- SetFit: 1.0.3
|
293 |
+
- Sentence Transformers: 2.2.2
|
294 |
+
- Transformers: 4.36.2
|
295 |
+
- PyTorch: 2.1.2+cu121
|
296 |
+
- Datasets: 2.16.1
|
297 |
+
- Tokenizers: 0.15.0
|
298 |
+
|
299 |
+
## Citation
|
300 |
+
|
301 |
+
### BibTeX
|
302 |
+
```bibtex
|
303 |
+
@article{https://doi.org/10.48550/arxiv.2209.11055,
|
304 |
+
doi = {10.48550/ARXIV.2209.11055},
|
305 |
+
url = {https://arxiv.org/abs/2209.11055},
|
306 |
+
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
|
307 |
+
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
308 |
+
title = {Efficient Few-Shot Learning Without Prompts},
|
309 |
+
publisher = {arXiv},
|
310 |
+
year = {2022},
|
311 |
+
copyright = {Creative Commons Attribution 4.0 International}
|
312 |
+
}
|
313 |
+
```
|
314 |
+
|
315 |
+
<!--
|
316 |
+
## Glossary
|
317 |
+
|
318 |
+
*Clearly define terms in order to be accessible across audiences.*
|
319 |
+
-->
|
320 |
+
|
321 |
+
<!--
|
322 |
+
## Model Card Authors
|
323 |
+
|
324 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
325 |
+
-->
|
326 |
+
|
327 |
+
<!--
|
328 |
+
## Model Card Contact
|
329 |
+
|
330 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
331 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "checkpoints/step_6250/",
|
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,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"labels": [
|
3 |
+
"sangat negatif",
|
4 |
+
"negatif",
|
5 |
+
"netral",
|
6 |
+
"positif",
|
7 |
+
"sangat positif"
|
8 |
+
],
|
9 |
+
"normalize_embeddings": false
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0d2a8f42ec04b816aaf02e1a21e70d2eb0b68871bdceaa58c7c07a9c72d1ead1
|
3 |
+
size 497787752
|
model_head.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4c4cc1a3430422fff821dbd9e1f63b23e94091b0d597bc104c7a48fa18920aba
|
3 |
+
size 16912
|
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
|
|