RevenueStreamJP / README.md
MaiDD's picture
Add SetFit model
7df54c7
|
raw
history blame
17.1 kB
---
library_name: setfit
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
metrics:
- accuracy
widget:
- text: 多要素認証エンジンである「LOCKED」と、セキュリティコンサルティングを通じて、国内企業のゼロトラスト対応を支援しているスタートアップ。
- text: Hotel rooms on the wheelsをコンセプトにした、自社生産のキャンピングカーレンタルサービスを展開するスタートアップ。
- text: バイオ新薬事業やバイオシミラー事業などバイオに関わる研究開発を行う企業。2021年7月にジーンテクノサイエンスからキッズウェル・バイオに社名変更をしている。
- text: 業務用冷凍食品の企画・開発・販売を行い、自社商品の調理方法などを公開する企業。
- text: がん治療機器「集束超音波(HIFU)治療装置」の開発を行う東北大学発のスタートアップ。「集束超音波」は、超音波を一点に集中させてがん組織に照射し、加熱効果などで切らずに治療する方法。放射線被曝が無いことから繰り返し治療ができ、がんに対する次世代治療として期待されている。2022年12月には、ニッセイ・キャピタル、野村スパークス・インベストメント、大和企業投資、りそなキャピタル、Carbon
Ventures、QRインベストメント、JA三井リース、ファストトラックイニシアティブ、SBIインベストメント、三菱UFJキャピタル、FFGベンチャービジネスパートナーズ、肥銀キャピタルを引受先とする総額23億5,000万円の資金調達を発表した。今後は、膵癌の国内治験および海外展開を含めた事業拡大に充当し、同社のビジョンである“音響工学(超音波)でがん患者さんに新たな未来をもたらす”を1日でも早く実現することを目指す。
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.7902097902097902
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.7902 |
## 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.8981 | 57 |
### Training Hyperparameters
- batch_size: (8, 8)
- num_epochs: (35, 35)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 2
- 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.0035 | 1 | 0.3068 | - |
| 0.1754 | 50 | 0.2708 | - |
| 0.3509 | 100 | 0.2253 | - |
| 0.5263 | 150 | 0.2705 | - |
| 0.7018 | 200 | 0.1665 | - |
| 0.8772 | 250 | 0.2609 | - |
| 1.0526 | 300 | 0.2681 | - |
| 1.2281 | 350 | 0.2614 | - |
| 1.4035 | 400 | 0.2151 | - |
| 1.5789 | 450 | 0.1952 | - |
| 1.7544 | 500 | 0.2275 | - |
| 1.9298 | 550 | 0.3111 | - |
| 2.1053 | 600 | 0.1036 | - |
| 2.2807 | 650 | 0.1038 | - |
| 2.4561 | 700 | 0.0081 | - |
| 2.6316 | 750 | 0.0906 | - |
| 2.8070 | 800 | 0.0002 | - |
| 2.9825 | 850 | 0.0928 | - |
| 3.1579 | 900 | 0.0004 | - |
| 3.3333 | 950 | 0.0011 | - |
| 3.5088 | 1000 | 0.0013 | - |
| 3.6842 | 1050 | 0.0004 | - |
| 3.8596 | 1100 | 0.0012 | - |
| 4.0351 | 1150 | 0.0002 | - |
| 4.2105 | 1200 | 0.0004 | - |
| 4.3860 | 1250 | 0.0003 | - |
| 4.5614 | 1300 | 0.0 | - |
| 4.7368 | 1350 | 0.0001 | - |
| 4.9123 | 1400 | 0.0002 | - |
| 5.0877 | 1450 | 0.0 | - |
| 5.2632 | 1500 | 0.0002 | - |
| 5.4386 | 1550 | 0.0 | - |
| 5.6140 | 1600 | 0.0 | - |
| 5.7895 | 1650 | 0.0 | - |
| 5.9649 | 1700 | 0.1017 | - |
| 6.1404 | 1750 | 0.0012 | - |
| 6.3158 | 1800 | 0.0 | - |
| 6.4912 | 1850 | 0.0001 | - |
| 6.6667 | 1900 | 0.0 | - |
| 6.8421 | 1950 | 0.0003 | - |
| 7.0175 | 2000 | 0.0 | - |
| 7.1930 | 2050 | 0.0 | - |
| 7.3684 | 2100 | 0.0 | - |
| 7.5439 | 2150 | 0.0 | - |
| 7.7193 | 2200 | 0.0 | - |
| 7.8947 | 2250 | 0.0 | - |
| 8.0702 | 2300 | 0.0 | - |
| 8.2456 | 2350 | 0.0 | - |
| 8.4211 | 2400 | 0.0019 | - |
| 8.5965 | 2450 | 0.0017 | - |
| 8.7719 | 2500 | 0.0 | - |
| 8.9474 | 2550 | 0.0034 | - |
| 9.1228 | 2600 | 0.0 | - |
| 9.2982 | 2650 | 0.0 | - |
| 9.4737 | 2700 | 0.0 | - |
| 9.6491 | 2750 | 0.0 | - |
| 9.8246 | 2800 | 0.0 | - |
| 10.0 | 2850 | 0.0 | - |
| 10.1754 | 2900 | 0.0 | - |
| 10.3509 | 2950 | 0.0 | - |
| 10.5263 | 3000 | 0.0 | - |
| 10.7018 | 3050 | 0.0 | - |
| 10.8772 | 3100 | 0.0001 | - |
| 11.0526 | 3150 | 0.0 | - |
| 11.2281 | 3200 | 0.0 | - |
| 11.4035 | 3250 | 0.0 | - |
| 11.5789 | 3300 | 0.0 | - |
| 11.7544 | 3350 | 0.0 | - |
| 11.9298 | 3400 | 0.0 | - |
| 12.1053 | 3450 | 0.0 | - |
| 12.2807 | 3500 | 0.0 | - |
| 12.4561 | 3550 | 0.0 | - |
| 12.6316 | 3600 | 0.0 | - |
| 12.8070 | 3650 | 0.0 | - |
| 12.9825 | 3700 | 0.0 | - |
| 13.1579 | 3750 | 0.0 | - |
| 13.3333 | 3800 | 0.0 | - |
| 13.5088 | 3850 | 0.0 | - |
| 13.6842 | 3900 | 0.0 | - |
| 13.8596 | 3950 | 0.0 | - |
| 14.0351 | 4000 | 0.0 | - |
| 14.2105 | 4050 | 0.0 | - |
| 14.3860 | 4100 | 0.0 | - |
| 14.5614 | 4150 | 0.0 | - |
| 14.7368 | 4200 | 0.0 | - |
| 14.9123 | 4250 | 0.0 | - |
| 15.0877 | 4300 | 0.0 | - |
| 15.2632 | 4350 | 0.0 | - |
| 15.4386 | 4400 | 0.0 | - |
| 15.6140 | 4450 | 0.0 | - |
| 15.7895 | 4500 | 0.0 | - |
| 15.9649 | 4550 | 0.1016 | - |
| 16.1404 | 4600 | 0.1214 | - |
| 16.3158 | 4650 | 0.0 | - |
| 16.4912 | 4700 | 0.0 | - |
| 16.6667 | 4750 | 0.0 | - |
| 16.8421 | 4800 | 0.0 | - |
| 17.0175 | 4850 | 0.0 | - |
| 17.1930 | 4900 | 0.0 | - |
| 17.3684 | 4950 | 0.0 | - |
| 17.5439 | 5000 | 0.0 | - |
| 17.7193 | 5050 | 0.0 | - |
| 17.8947 | 5100 | 0.0 | - |
| 18.0702 | 5150 | 0.0 | - |
| 18.2456 | 5200 | 0.0 | - |
| 18.4211 | 5250 | 0.0 | - |
| 18.5965 | 5300 | 0.0 | - |
| 18.7719 | 5350 | 0.0 | - |
| 18.9474 | 5400 | 0.0 | - |
| 19.1228 | 5450 | 0.0 | - |
| 19.2982 | 5500 | 0.0001 | - |
| 19.4737 | 5550 | 0.0 | - |
| 19.6491 | 5600 | 0.0001 | - |
| 19.8246 | 5650 | 0.0174 | - |
| 20.0 | 5700 | 0.0 | - |
| 20.1754 | 5750 | 0.0 | - |
| 20.3509 | 5800 | 0.0 | - |
| 20.5263 | 5850 | 0.0 | - |
| 20.7018 | 5900 | 0.0 | - |
| 20.8772 | 5950 | 0.0 | - |
| 21.0526 | 6000 | 0.0 | - |
| 21.2281 | 6050 | 0.0 | - |
| 21.4035 | 6100 | 0.0 | - |
| 21.5789 | 6150 | 0.0 | - |
| 21.7544 | 6200 | 0.0 | - |
| 21.9298 | 6250 | 0.0 | - |
| 22.1053 | 6300 | 0.0 | - |
| 22.2807 | 6350 | 0.0 | - |
| 22.4561 | 6400 | 0.0 | - |
| 22.6316 | 6450 | 0.0 | - |
| 22.8070 | 6500 | 0.0 | - |
| 22.9825 | 6550 | 0.0 | - |
| 23.1579 | 6600 | 0.0 | - |
| 23.3333 | 6650 | 0.0 | - |
| 23.5088 | 6700 | 0.0 | - |
| 23.6842 | 6750 | 0.0 | - |
| 23.8596 | 6800 | 0.0 | - |
| 24.0351 | 6850 | 0.0 | - |
| 24.2105 | 6900 | 0.0 | - |
| 24.3860 | 6950 | 0.0 | - |
| 24.5614 | 7000 | 0.0 | - |
| 24.7368 | 7050 | 0.0 | - |
| 24.9123 | 7100 | 0.0 | - |
| 25.0877 | 7150 | 0.0 | - |
| 25.2632 | 7200 | 0.0 | - |
| 25.4386 | 7250 | 0.0816 | - |
| 25.6140 | 7300 | 0.0005 | - |
| 25.7895 | 7350 | 0.0 | - |
| 25.9649 | 7400 | 0.0001 | - |
| 26.1404 | 7450 | 0.0001 | - |
| 26.3158 | 7500 | 0.0 | - |
| 26.4912 | 7550 | 0.0 | - |
| 26.6667 | 7600 | 0.0 | - |
| 26.8421 | 7650 | 0.0 | - |
| 27.0175 | 7700 | 0.0 | - |
| 27.1930 | 7750 | 0.0 | - |
| 27.3684 | 7800 | 0.0 | - |
| 27.5439 | 7850 | 0.0 | - |
| 27.7193 | 7900 | 0.0 | - |
| 27.8947 | 7950 | 0.0 | - |
| 28.0702 | 8000 | 0.0 | - |
| 28.2456 | 8050 | 0.0 | - |
| 28.4211 | 8100 | 0.0 | - |
| 28.5965 | 8150 | 0.0 | - |
| 28.7719 | 8200 | 0.0 | - |
| 28.9474 | 8250 | 0.0 | - |
| 29.1228 | 8300 | 0.0 | - |
| 29.2982 | 8350 | 0.0 | - |
| 29.4737 | 8400 | 0.0 | - |
| 29.6491 | 8450 | 0.0 | - |
| 29.8246 | 8500 | 0.0 | - |
| 30.0 | 8550 | 0.0 | - |
| 30.1754 | 8600 | 0.0 | - |
| 30.3509 | 8650 | 0.0 | - |
| 30.5263 | 8700 | 0.0 | - |
| 30.7018 | 8750 | 0.0 | - |
| 30.8772 | 8800 | 0.0 | - |
| 31.0526 | 8850 | 0.0 | - |
| 31.2281 | 8900 | 0.0 | - |
| 31.4035 | 8950 | 0.0 | - |
| 31.5789 | 9000 | 0.0 | - |
| 31.7544 | 9050 | 0.0 | - |
| 31.9298 | 9100 | 0.0 | - |
| 32.1053 | 9150 | 0.0 | - |
| 32.2807 | 9200 | 0.0 | - |
| 32.4561 | 9250 | 0.0 | - |
| 32.6316 | 9300 | 0.0 | - |
| 32.8070 | 9350 | 0.0 | - |
| 32.9825 | 9400 | 0.0 | - |
| 33.1579 | 9450 | 0.0 | - |
| 33.3333 | 9500 | 0.0 | - |
| 33.5088 | 9550 | 0.0 | - |
| 33.6842 | 9600 | 0.0 | - |
| 33.8596 | 9650 | 0.0 | - |
| 34.0351 | 9700 | 0.0 | - |
| 34.2105 | 9750 | 0.0 | - |
| 34.3860 | 9800 | 0.0 | - |
| 34.5614 | 9850 | 0.0 | - |
| 34.7368 | 9900 | 0.0 | - |
| 34.9123 | 9950 | 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.*
-->