File size: 18,215 Bytes
7df54c7 73913dc 7df54c7 73913dc 7df54c7 73913dc 7df54c7 73913dc 7df54c7 73913dc 7df54c7 73913dc 7df54c7 73913dc 7df54c7 73913dc 7df54c7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 |
---
library_name: setfit
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
metrics:
- accuracy
widget:
- text: スマホやタブレットPC、Oculus GOやVIVE、Apple Watchなど新しいデバイス向けアプリの企画・開発を行うスタートアップ。
- text: ベンチャー企業へのハンズオン投資などを行うベンチャーキャピタル。
- text: GoogleカレンダーやZoomと連携してスケジュール調整を自動化する日程調整ツール「Jicoo」を開発、提供するスタートアップ
- text: 住まい探しに特化したウェブサイト「TOKYO APARTMENTS」を提供する企業。
- text: 医療機器、産業機器の研究開発・製造販売を行う企業。
pipeline_tag: text-classification
inference: false
model-index:
- name: SetFit
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: Unknown
type: unknown
split: test
metrics:
- type: accuracy
value: 0.7272727272727273
name: Accuracy
---
# SetFit
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. A OneVsRestClassifier instance is used for classification.
The model has been trained using an efficient few-shot learning technique that involves:
1. Fine-tuning a [Sentence Transformer](https://www.sbert.net) with contrastive learning.
2. Training a classification head with features from the fine-tuned Sentence Transformer.
## Model Details
### Model Description
- **Model Type:** SetFit
<!-- - **Sentence Transformer:** [Unknown](https://huggingface.co/unknown) -->
- **Classification head:** a OneVsRestClassifier instance
- **Maximum Sequence Length:** 512 tokens
<!-- - **Number of Classes:** Unknown -->
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
<!-- - **Language:** Unknown -->
<!-- - **License:** Unknown -->
### Model Sources
- **Repository:** [SetFit on GitHub](https://github.com/huggingface/setfit)
- **Paper:** [Efficient Few-Shot Learning Without Prompts](https://arxiv.org/abs/2209.11055)
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
## Evaluation
### Metrics
| Label | Accuracy |
|:--------|:---------|
| **all** | 0.7273 |
## Uses
### Direct Use for Inference
First install the SetFit library:
```bash
pip install setfit
```
Then you can load this model and run inference.
```python
from setfit import SetFitModel
# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("Ekohe/RevenueStreamJP")
# Run inference
preds = model("医療機器、産業機器の研究開発・製造販売を行う企業。")
```
<!--
### Downstream Use
*List how someone could finetune this model on their own dataset.*
-->
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
<!--
## Bias, Risks and Limitations
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->
<!--
### Recommendations
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->
## Training Details
### Training Set Metrics
| Training set | Min | Median | Max |
|:-------------|:----|:-------|:----|
| Word count | 1 | 1.9824 | 57 |
### Training Hyperparameters
- batch_size: (10, 10)
- num_epochs: (35, 35)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 3
- body_learning_rate: (2e-05, 2e-05)
- head_learning_rate: 2e-05
- loss: CosineSimilarityLoss
- distance_metric: cosine_distance
- margin: 0.25
- end_to_end: False
- use_amp: False
- warmup_proportion: 0.1
- seed: 42
- eval_max_steps: -1
- load_best_model_at_end: False
### Training Results
| Epoch | Step | Training Loss | Validation Loss |
|:-------:|:-----:|:-------------:|:---------------:|
| 0.0029 | 1 | 0.2602 | - |
| 0.1462 | 50 | 0.25 | - |
| 0.2924 | 100 | 0.1712 | - |
| 0.4386 | 150 | 0.2671 | - |
| 0.5848 | 200 | 0.2288 | - |
| 0.7310 | 250 | 0.2253 | - |
| 0.8772 | 300 | 0.2675 | - |
| 1.0234 | 350 | 0.1204 | - |
| 1.1696 | 400 | 0.1185 | - |
| 1.3158 | 450 | 0.1884 | - |
| 1.4620 | 500 | 0.2311 | - |
| 1.6082 | 550 | 0.0659 | - |
| 1.7544 | 600 | 0.1719 | - |
| 1.9006 | 650 | 0.0094 | - |
| 2.0468 | 700 | 0.0237 | - |
| 2.1930 | 750 | 0.0007 | - |
| 2.3392 | 800 | 0.0021 | - |
| 2.4854 | 850 | 0.0013 | - |
| 2.6316 | 900 | 0.1887 | - |
| 2.7778 | 950 | 0.0004 | - |
| 2.9240 | 1000 | 0.0001 | - |
| 3.0702 | 1050 | 0.0003 | - |
| 3.2164 | 1100 | 0.0764 | - |
| 3.3626 | 1150 | 0.0025 | - |
| 3.5088 | 1200 | 0.0001 | - |
| 3.6550 | 1250 | 0.0001 | - |
| 3.8012 | 1300 | 0.0001 | - |
| 3.9474 | 1350 | 0.0001 | - |
| 4.0936 | 1400 | 0.0 | - |
| 4.2398 | 1450 | 0.0001 | - |
| 4.3860 | 1500 | 0.0001 | - |
| 4.5322 | 1550 | 0.0 | - |
| 4.6784 | 1600 | 0.0 | - |
| 4.8246 | 1650 | 0.0 | - |
| 4.9708 | 1700 | 0.0 | - |
| 5.1170 | 1750 | 0.0001 | - |
| 5.2632 | 1800 | 0.0 | - |
| 5.4094 | 1850 | 0.0 | - |
| 5.5556 | 1900 | 0.0 | - |
| 5.7018 | 1950 | 0.0883 | - |
| 5.8480 | 2000 | 0.0 | - |
| 5.9942 | 2050 | 0.0 | - |
| 6.1404 | 2100 | 0.0 | - |
| 6.2865 | 2150 | 0.0 | - |
| 6.4327 | 2200 | 0.0 | - |
| 6.5789 | 2250 | 0.0 | - |
| 6.7251 | 2300 | 0.0 | - |
| 6.8713 | 2350 | 0.0 | - |
| 7.0175 | 2400 | 0.0 | - |
| 7.1637 | 2450 | 0.0 | - |
| 7.3099 | 2500 | 0.0 | - |
| 7.4561 | 2550 | 0.0 | - |
| 7.6023 | 2600 | 0.0 | - |
| 7.7485 | 2650 | 0.0 | - |
| 7.8947 | 2700 | 0.0 | - |
| 8.0409 | 2750 | 0.0 | - |
| 8.1871 | 2800 | 0.0 | - |
| 8.3333 | 2850 | 0.0 | - |
| 8.4795 | 2900 | 0.0 | - |
| 8.6257 | 2950 | 0.0 | - |
| 8.7719 | 3000 | 0.0 | - |
| 8.9181 | 3050 | 0.0 | - |
| 9.0643 | 3100 | 0.0 | - |
| 9.2105 | 3150 | 0.0 | - |
| 9.3567 | 3200 | 0.0 | - |
| 9.5029 | 3250 | 0.0618 | - |
| 9.6491 | 3300 | 0.3522 | - |
| 9.7953 | 3350 | 0.0051 | - |
| 9.9415 | 3400 | 0.0002 | - |
| 10.0877 | 3450 | 0.0018 | - |
| 10.2339 | 3500 | 0.0027 | - |
| 10.3801 | 3550 | 0.0001 | - |
| 10.5263 | 3600 | 0.0 | - |
| 10.6725 | 3650 | 0.0 | - |
| 10.8187 | 3700 | 0.0001 | - |
| 10.9649 | 3750 | 0.0 | - |
| 11.1111 | 3800 | 0.0 | - |
| 11.2573 | 3850 | 0.0001 | - |
| 11.4035 | 3900 | 0.0001 | - |
| 11.5497 | 3950 | 0.0 | - |
| 11.6959 | 4000 | 0.0 | - |
| 11.8421 | 4050 | 0.0 | - |
| 11.9883 | 4100 | 0.0 | - |
| 12.1345 | 4150 | 0.0 | - |
| 12.2807 | 4200 | 0.0001 | - |
| 12.4269 | 4250 | 0.0 | - |
| 12.5731 | 4300 | 0.0 | - |
| 12.7193 | 4350 | 0.0003 | - |
| 12.8655 | 4400 | 0.0 | - |
| 13.0117 | 4450 | 0.0 | - |
| 13.1579 | 4500 | 0.0 | - |
| 13.3041 | 4550 | 0.0 | - |
| 13.4503 | 4600 | 0.0 | - |
| 13.5965 | 4650 | 0.0 | - |
| 13.7427 | 4700 | 0.0 | - |
| 13.8889 | 4750 | 0.0 | - |
| 14.0351 | 4800 | 0.0 | - |
| 14.1813 | 4850 | 0.0 | - |
| 14.3275 | 4900 | 0.0 | - |
| 14.4737 | 4950 | 0.0 | - |
| 14.6199 | 5000 | 0.0 | - |
| 14.7661 | 5050 | 0.0 | - |
| 14.9123 | 5100 | 0.0 | - |
| 15.0585 | 5150 | 0.0 | - |
| 15.2047 | 5200 | 0.0 | - |
| 15.3509 | 5250 | 0.0 | - |
| 15.4971 | 5300 | 0.0 | - |
| 15.6433 | 5350 | 0.0 | - |
| 15.7895 | 5400 | 0.0 | - |
| 15.9357 | 5450 | 0.0 | - |
| 16.0819 | 5500 | 0.0 | - |
| 16.2281 | 5550 | 0.0 | - |
| 16.3743 | 5600 | 0.0 | - |
| 16.5205 | 5650 | 0.0 | - |
| 16.6667 | 5700 | 0.0 | - |
| 16.8129 | 5750 | 0.0 | - |
| 16.9591 | 5800 | 0.0 | - |
| 17.1053 | 5850 | 0.0 | - |
| 17.2515 | 5900 | 0.0 | - |
| 17.3977 | 5950 | 0.0 | - |
| 17.5439 | 6000 | 0.0 | - |
| 17.6901 | 6050 | 0.0 | - |
| 17.8363 | 6100 | 0.0 | - |
| 17.9825 | 6150 | 0.0 | - |
| 18.1287 | 6200 | 0.0 | - |
| 18.2749 | 6250 | 0.0 | - |
| 18.4211 | 6300 | 0.0 | - |
| 18.5673 | 6350 | 0.0 | - |
| 18.7135 | 6400 | 0.0 | - |
| 18.8596 | 6450 | 0.0 | - |
| 19.0058 | 6500 | 0.0 | - |
| 19.1520 | 6550 | 0.0 | - |
| 19.2982 | 6600 | 0.0 | - |
| 19.4444 | 6650 | 0.0 | - |
| 19.5906 | 6700 | 0.0 | - |
| 19.7368 | 6750 | 0.0 | - |
| 19.8830 | 6800 | 0.0 | - |
| 20.0292 | 6850 | 0.0 | - |
| 20.1754 | 6900 | 0.0 | - |
| 20.3216 | 6950 | 0.0 | - |
| 20.4678 | 7000 | 0.0 | - |
| 20.6140 | 7050 | 0.0 | - |
| 20.7602 | 7100 | 0.0 | - |
| 20.9064 | 7150 | 0.0 | - |
| 21.0526 | 7200 | 0.0 | - |
| 21.1988 | 7250 | 0.0 | - |
| 21.3450 | 7300 | 0.0 | - |
| 21.4912 | 7350 | 0.0 | - |
| 21.6374 | 7400 | 0.0 | - |
| 21.7836 | 7450 | 0.0 | - |
| 21.9298 | 7500 | 0.0 | - |
| 22.0760 | 7550 | 0.0 | - |
| 22.2222 | 7600 | 0.0 | - |
| 22.3684 | 7650 | 0.0 | - |
| 22.5146 | 7700 | 0.0 | - |
| 22.6608 | 7750 | 0.0 | - |
| 22.8070 | 7800 | 0.0 | - |
| 22.9532 | 7850 | 0.0 | - |
| 23.0994 | 7900 | 0.0 | - |
| 23.2456 | 7950 | 0.0 | - |
| 23.3918 | 8000 | 0.0 | - |
| 23.5380 | 8050 | 0.0 | - |
| 23.6842 | 8100 | 0.0 | - |
| 23.8304 | 8150 | 0.0 | - |
| 23.9766 | 8200 | 0.0 | - |
| 24.1228 | 8250 | 0.0858 | - |
| 24.2690 | 8300 | 0.0 | - |
| 24.4152 | 8350 | 0.0001 | - |
| 24.5614 | 8400 | 0.0 | - |
| 24.7076 | 8450 | 0.0005 | - |
| 24.8538 | 8500 | 0.0992 | - |
| 25.0 | 8550 | 0.0 | - |
| 25.1462 | 8600 | 0.0 | - |
| 25.2924 | 8650 | 0.0 | - |
| 25.4386 | 8700 | 0.0 | - |
| 25.5848 | 8750 | 0.0 | - |
| 25.7310 | 8800 | 0.0 | - |
| 25.8772 | 8850 | 0.0 | - |
| 26.0234 | 8900 | 0.0 | - |
| 26.1696 | 8950 | 0.0 | - |
| 26.3158 | 9000 | 0.0 | - |
| 26.4620 | 9050 | 0.0 | - |
| 26.6082 | 9100 | 0.0 | - |
| 26.7544 | 9150 | 0.0 | - |
| 26.9006 | 9200 | 0.0 | - |
| 27.0468 | 9250 | 0.0 | - |
| 27.1930 | 9300 | 0.0 | - |
| 27.3392 | 9350 | 0.0 | - |
| 27.4854 | 9400 | 0.0 | - |
| 27.6316 | 9450 | 0.0 | - |
| 27.7778 | 9500 | 0.0 | - |
| 27.9240 | 9550 | 0.0 | - |
| 28.0702 | 9600 | 0.0 | - |
| 28.2164 | 9650 | 0.0 | - |
| 28.3626 | 9700 | 0.0 | - |
| 28.5088 | 9750 | 0.0 | - |
| 28.6550 | 9800 | 0.0 | - |
| 28.8012 | 9850 | 0.0 | - |
| 28.9474 | 9900 | 0.0 | - |
| 29.0936 | 9950 | 0.0 | - |
| 29.2398 | 10000 | 0.0 | - |
| 29.3860 | 10050 | 0.0 | - |
| 29.5322 | 10100 | 0.0 | - |
| 29.6784 | 10150 | 0.0 | - |
| 29.8246 | 10200 | 0.0 | - |
| 29.9708 | 10250 | 0.0 | - |
| 30.1170 | 10300 | 0.0 | - |
| 30.2632 | 10350 | 0.0 | - |
| 30.4094 | 10400 | 0.0 | - |
| 30.5556 | 10450 | 0.0 | - |
| 30.7018 | 10500 | 0.0 | - |
| 30.8480 | 10550 | 0.0 | - |
| 30.9942 | 10600 | 0.0 | - |
| 31.1404 | 10650 | 0.0 | - |
| 31.2865 | 10700 | 0.0 | - |
| 31.4327 | 10750 | 0.0 | - |
| 31.5789 | 10800 | 0.0 | - |
| 31.7251 | 10850 | 0.0 | - |
| 31.8713 | 10900 | 0.0 | - |
| 32.0175 | 10950 | 0.0 | - |
| 32.1637 | 11000 | 0.0 | - |
| 32.3099 | 11050 | 0.0 | - |
| 32.4561 | 11100 | 0.0 | - |
| 32.6023 | 11150 | 0.0 | - |
| 32.7485 | 11200 | 0.0 | - |
| 32.8947 | 11250 | 0.0 | - |
| 33.0409 | 11300 | 0.0 | - |
| 33.1871 | 11350 | 0.0 | - |
| 33.3333 | 11400 | 0.0 | - |
| 33.4795 | 11450 | 0.0 | - |
| 33.6257 | 11500 | 0.0 | - |
| 33.7719 | 11550 | 0.0 | - |
| 33.9181 | 11600 | 0.0 | - |
| 34.0643 | 11650 | 0.0 | - |
| 34.2105 | 11700 | 0.0 | - |
| 34.3567 | 11750 | 0.0 | - |
| 34.5029 | 11800 | 0.0 | - |
| 34.6491 | 11850 | 0.0 | - |
| 34.7953 | 11900 | 0.0 | - |
| 34.9415 | 11950 | 0.0 | - |
### Framework Versions
- Python: 3.10.12
- SetFit: 1.0.1
- Sentence Transformers: 2.2.2
- Transformers: 4.35.2
- PyTorch: 2.1.0+cu118
- Datasets: 2.15.0
- Tokenizers: 0.15.0
## Citation
### BibTeX
```bibtex
@article{https://doi.org/10.48550/arxiv.2209.11055,
doi = {10.48550/ARXIV.2209.11055},
url = {https://arxiv.org/abs/2209.11055},
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {Efficient Few-Shot Learning Without Prompts},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}
```
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
--> |