File size: 17,840 Bytes
eaa7284 4b1ebb6 eaa7284 4b1ebb6 eaa7284 4b1ebb6 eaa7284 4b1ebb6 eaa7284 4b1ebb6 eaa7284 4b1ebb6 eaa7284 4b1ebb6 eaa7284 4b1ebb6 eaa7284 |
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 |
---
library_name: setfit
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
metrics:
- accuracy
widget:
- text: frais douane import vehicule usa carte usd commission
- text: debit automatique assurance chien fido protect
- text: facture carte du cabinet architecte plan maison est carte
- text: achat le monde des oiseaux carte
- text: abonnement mensuel salle de sport life fitness club carte
pipeline_tag: text-classification
inference: true
model-index:
- name: SetFit
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: Unknown
type: unknown
split: test
metrics:
- type: accuracy
value: 0.18181818181818182
name: Accuracy
---
# SetFit
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. A [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) 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 [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
- **Maximum Sequence Length:** 128 tokens
- **Number of Classes:** 44 classes
<!-- - **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)
### Model Labels
| Label | Examples |
|:-------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|
| Shopping / electronics & multimedia | <ul><li>'achat amazon eu s a r l carte lux'</li><li>'retrait achat b h photo carte usa usd commission'</li></ul> |
| Other / kids | <ul><li>'paiement carte babyland equipements carte'</li><li>'achat carte couture kids atelier carte'</li></ul> |
| Bank services / other | <ul><li>'paiement frais demande rib iban supplémentaires carte'</li><li>'frais emission chequier carte'</li></ul> |
| Housing / rent | <ul><li>'paiement loyer maison campagne carte'</li><li>'prlv sepa sarl habitatplus loyer mars carte'</li></ul> |
| Transportation / other | <ul><li>'abonnement annual parking municipal villetown carte'</li><li>'frais douane import vehicule usa carte usd commission'</li></ul> |
| Bank services / transfers | <ul><li>'reception transfert remboursement prêt amis carte'</li><li>'transfer location vacances famille roux carte'</li></ul> |
| Investment / retirement & savings | <ul><li>'investissement fonds de pension carte'</li><li>'souscription sicav monétaire retraite carte'</li></ul> |
| Other / taxes | <ul><li>'contribution sociales csg crds securite soc frsso'</li><li>'prelevement impots sur le revenu fiscale fr'</li></ul> |
| Healthy & Beauty / other | <ul><li>'achat en ligne produits aromatherapie naturesence carte'</li><li>'session floating therapie apezen carte'</li></ul> |
| Investment / securities | <ul><li>'achat obligations tesla carte usd'</li><li>'transaction opcvm european funds carte'</li></ul> |
| Housing / other | <ul><li>'facture carte du ikea velizy carte'</li><li>'prlv sepa du alarmes securitas direct'</li></ul> |
| Housing / house loan | <ul><li>'prelevement sepa pret habitation hsbc france'</li><li>'remboursement emprunt immobilier caisse d epargne echeance'</li></ul> |
| Housing / utilities & bills | <ul><li>'prlv sepa free mobile'</li><li>'prlv sepa total direct energie elec'</li></ul> |
| Bank services / general fees | <ul><li>'frais operation non europeenne carte'</li><li>'commission intervention depassement decouvert'</li></ul> |
| Leisure & Entertainment / culture & events | <ul><li>'facture carte du opera de paris carte'</li><li>'reservation carte nuit des musees carte'</li></ul> |
| Transportation / taxi & carpool | <ul><li>'prlv sepa lyft carte usa usd commission'</li><li>'facture carte du yandex taxi moscow carte rus rub commission'</li></ul> |
| Shopping / other | <ul><li>'prlv sepa amzn mktp fr mjk amz com bill lu carte'</li><li>'achat arts et decoration bleneau carte'</li></ul> |
| Recurrent Payments / loans | <ul><li>'retrait auto emma pret familial emmaprt carte'</li><li>'virement sortant lcl pret travaux rth'</li></ul> |
| Healthy & Beauty / doctor fees | <ul><li>'paiement cabinet kinesitherapie dubois carte'</li><li>'prlv sepa cabinet dermatologie dupont frzzz cdc hjke'</li></ul> |
| Bank services / withdrawal | <ul><li>'retrait dab banque express toulouse carte fr'</li><li>'retrait dab banque rapide clermont ferrand carte fr commission'</li></ul> |
| Other / other | <ul><li>'achat billets loterie nationale'</li><li>'cotisation associative lumieres de la ville'</li></ul> |
| Healthy & Beauty / pharmacy | <ul><li>'paiement pharmacie du parc carte'</li><li>'achat pharmacie du centre ville carte'</li></ul> |
| Transportation / fuel | <ul><li>'reglement carbu elf bordeaux carte'</li><li>'prlv automatique station total nantes'</li></ul> |
| Shopping / sporting goods | <ul><li>'achat en ligne sport fr carte'</li><li>'achat reebok fitness bordeaux carte'</li></ul> |
| Food & Drinks / groceries | <ul><li>'prlv sepa marche local de provence carte'</li><li>'facture carte du magasin asiatique lee carte'</li></ul> |
| Other / pets | <ul><li>'debit automatique assurance chien fido protect'</li><li>'achat le monde des oiseaux carte'</li></ul> |
| Investment / real estate | <ul><li>'renovation maison nanterre carte'</li><li>'facture carte du cabinet architecte plan maison est carte'</li></ul> |
| Shopping / clothing | <ul><li>'achat primark lyon carte'</li><li>'achat zara carte esp'</li></ul> |
| Shopping / housing equipment | <ul><li>'paiement par carte decathlon pour camping carte'</li><li>'paiement par carte zara home paris carte'</li></ul> |
| Transportation / maitenance | <ul><li>'facture carte batteries et plus marseille carte'</li><li>'prlv sepa atelier mécanique avancée limoges annuelle'</li></ul> |
| Recurrent Payments / other | <ul><li>'cotisation annuelle club échecs rois et pions date'</li><li>'souscription mensuelle plateforme éducative kidlearn carte date'</li></ul> |
| Recurrent Payments / insurance | <ul><li>'prelevement sepa assurance multirisque pro mma'</li><li>'prélèvement mensuel assurance collective cnp'</li></ul> |
| Healthy & Beauty / veterinary | <ul><li>'paiement facture chien veterinaire des lilas carte'</li><li>'soins dentaires cheval equivet clinic strasbourg carte'</li></ul> |
| Transportation / public transportation | <ul><li>'achat titres v ville de lille carte'</li><li>'billet rer versailles ratp carte'</li></ul> |
| Healthy & Beauty / beauty & self-care | <ul><li>'facture carte du salon manucure instant beaute carte'</li><li>'achat parfumerie senteurs du monde carte'</li></ul> |
| Leisure & Entertainment / other | <ul><li>'achat carte du netflix carte'</li><li>'facture carte du hbo max carte usa'</li></ul> |
| Food & Drinks / eating out | <ul><li>'facture carte du cafeteria los amigos carte spa'</li><li>'facture carte du le petit cafe carte'</li></ul> |
| Housing / services & maintenance | <ul><li>'virement recu soldes tuyauterie moderne'</li><li>'prlv sepa chauffage central bernier'</li></ul> |
| Leisure & Entertainment / travel | <ul><li>'prlv sepa eurostar'</li><li>'virement recu airbnb stay paris frzzz date'</li></ul> |
| Leisure & Entertainment / sports & hobbies | <ul><li>'paiement en ligne du nike com carte usd commission'</li><li>'achat en magasin du rebel sport carte aud'</li></ul> |
| Investment / other | <ul><li>'participation crowdfunding waterclean projet'</li><li>'achat actions ia revolution carte'</li></ul> |
| Transportation / car loan & leasing | <ul><li>'prlv sepa dacia lodgy crdit auto'</li><li>'prelevement mensuel mercedes classe a financement frzzzmerce'</li></ul> |
| Recurrent Payments / subscription | <ul><li>'facture carte du amazon prime carte'</li><li>'abonnement mensuel salle de sport life fitness club carte'</li></ul> |
| Food & Drinks / other | <ul><li>'debit epicerie bio vitanature carte'</li><li>'payment carte salon de thé carte'</li></ul> |
## Evaluation
### Metrics
| Label | Accuracy |
|:--------|:---------|
| **all** | 0.1818 |
## 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("HEN10/setfit-particular-transaction-solon-embeddings-labels-large-kaggle-automatisation-v1")
# Run inference
preds = model("achat le monde des oiseaux carte")
```
<!--
### 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 | 3 | 6.2727 | 11 |
| Label | Training Sample Count |
|:-------------------------------------------|:----------------------|
| Housing / rent | 2 |
| Housing / house loan | 2 |
| Housing / utilities & bills | 2 |
| Housing / services & maintenance | 2 |
| Housing / other | 2 |
| Food & Drinks / groceries | 2 |
| Food & Drinks / eating out | 2 |
| Food & Drinks / other | 2 |
| Leisure & Entertainment / sports & hobbies | 2 |
| Leisure & Entertainment / culture & events | 2 |
| Leisure & Entertainment / travel | 2 |
| Leisure & Entertainment / other | 2 |
| Transportation / car loan & leasing | 2 |
| Transportation / fuel | 2 |
| Transportation / public transportation | 2 |
| Transportation / taxi & carpool | 2 |
| Transportation / maitenance | 2 |
| Transportation / other | 2 |
| Recurrent Payments / loans | 2 |
| Recurrent Payments / insurance | 2 |
| Recurrent Payments / subscription | 2 |
| Recurrent Payments / other | 2 |
| Investment / securities | 2 |
| Investment / retirement & savings | 2 |
| Investment / real estate | 2 |
| Investment / other | 2 |
| Shopping / clothing | 2 |
| Shopping / electronics & multimedia | 2 |
| Shopping / sporting goods | 2 |
| Shopping / housing equipment | 2 |
| Shopping / other | 2 |
| Healthy & Beauty / doctor fees | 2 |
| Healthy & Beauty / pharmacy | 2 |
| Healthy & Beauty / beauty & self-care | 2 |
| Healthy & Beauty / veterinary | 2 |
| Healthy & Beauty / other | 2 |
| Bank services / transfers | 2 |
| Bank services / withdrawal | 2 |
| Bank services / general fees | 2 |
| Bank services / other | 2 |
| Other / taxes | 2 |
| Other / kids | 2 |
| Other / pets | 2 |
| Other / other | 2 |
### Training Hyperparameters
- batch_size: (16, 16)
- num_epochs: (1, 1)
- max_steps: -1
- sampling_strategy: oversampling
- body_learning_rate: (2e-05, 1e-05)
- head_learning_rate: 0.01
- loss: CosineSimilarityLoss
- distance_metric: cosine_distance
- margin: 0.25
- end_to_end: True
- use_amp: False
- warmup_proportion: 0.1
- seed: 6
- eval_max_steps: -1
- load_best_model_at_end: False
### Training Results
| Epoch | Step | Training Loss | Validation Loss |
|:------:|:----:|:-------------:|:---------------:|
| 0.0021 | 1 | 0.1221 | - |
| 0.1057 | 50 | 0.1337 | - |
| 0.2114 | 100 | 0.0617 | - |
| 0.3171 | 150 | 0.0397 | - |
| 0.4228 | 200 | 0.0377 | - |
| 0.5285 | 250 | 0.0133 | - |
| 0.6342 | 300 | 0.012 | - |
| 0.7400 | 350 | 0.0191 | - |
| 0.8457 | 400 | 0.0118 | - |
| 0.9514 | 450 | 0.0083 | - |
### Framework Versions
- Python: 3.10.13
- SetFit: 1.0.3
- Sentence Transformers: 2.6.1
- Transformers: 4.39.3
- PyTorch: 2.1.2+cpu
- Datasets: 2.17.0
- Tokenizers: 0.15.2
## 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.*
--> |