|
--- |
|
tags: |
|
- setfit |
|
- sentence-transformers |
|
- text-classification |
|
- generated_from_setfit_trainer |
|
widget: |
|
- text: '"ഒരുപാട് ഇഷ്ട്ടപെട്ട പോലെ ഒരുപാട് വെറുത്ത് പോയി, ഡോക്ടറെ കിട്ടാനുള്ള ഭാഗ്യം |
|
ഇല്ല"' |
|
- text: ഒരു കരുണയും ഇല്ലാതെ ഒരാളുടെ ഫീലിംഗ് വെച്ച് കളിക്കുക... ആത്മാർഥതക്ക് ഒരു വിലയും |
|
കൊടുക്കാതെ അയാളെ തൂത്തെറിയുക.... എല്ലാവർക്കും എല്ലാം മനസ്സിൽ ആയി.. ഇനി കൂടുതൽ |
|
ഒന്നും പറയണ്ട... |
|
- text: சொத்துக்கே வழி இல்லாம இங்க கஸ்டப்பற்றாங்க இதுங்களுக்கு அறிப்பு பிடிச்சி அலைதுங்க |
|
தூ தூ மூதேவிங்களா |
|
- text: അടിപൊളി കൊള്ളാം സൂപ്പർ ഡയലോഗ് ആരാണ് ഈ അമ്മമാരും ചേച്ചിമാരും ചേട്ടന്മാരും ഞങ്ങൾക്കറിയില്ല |
|
- text: 24×7 എല്ലാം കാണണം കേട്ടോ. അപ്പോൾ അറിയാം. അവിടെ എന്തൊക്കെയാ കാട്ടികൂട്ടിയതെന്ന്. |
|
എങ്കിലുംഡോക്റ്റരോട് നീ ഇത് ചെയ്യും എന്ന് ഞങ്ങൾ ആരും കരുതിയില്ല. |
|
metrics: |
|
- accuracy |
|
pipeline_tag: text-classification |
|
library_name: setfit |
|
inference: true |
|
base_model: microsoft/Multilingual-MiniLM-L12-H384 |
|
model-index: |
|
- name: SetFit with microsoft/Multilingual-MiniLM-L12-H384 |
|
results: |
|
- task: |
|
type: text-classification |
|
name: Text Classification |
|
dataset: |
|
name: Unknown |
|
type: unknown |
|
split: test |
|
metrics: |
|
- type: accuracy |
|
value: 0.6875 |
|
name: Accuracy |
|
--- |
|
|
|
# SetFit with microsoft/Multilingual-MiniLM-L12-H384 |
|
|
|
This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [microsoft/Multilingual-MiniLM-L12-H384](https://huggingface.co/microsoft/Multilingual-MiniLM-L12-H384) as the Sentence Transformer embedding model. A [SetFitHead](huggingface.co/docs/setfit/reference/main#setfit.SetFitHead) 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 body:** [microsoft/Multilingual-MiniLM-L12-H384](https://huggingface.co/microsoft/Multilingual-MiniLM-L12-H384) |
|
- **Classification head:** a [SetFitHead](huggingface.co/docs/setfit/reference/main#setfit.SetFitHead) instance |
|
- **Maximum Sequence Length:** 512 tokens |
|
- **Number of Classes:** 2 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 | |
|
|:------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
|
| 0 | <ul><li>'Madam divyaக்கு 1கிலோ colgate paste வாங்கி கொடுங்க videoவில் வாய் நாற்றம் தாங்கல'</li><li>'ഇനി ഇതുപോലുള്ള സാദനം ആയി വന്നാൽ ഞാൻ ഡിസ്ക്രൈബ് ചെയ്യും'</li><li>'ஏன்பா behindwoods தயவு செய்து இப்படி கேவலமான programme ஐ telecast பண்ணாதீங்க ராஜா'</li></ul> | |
|
| 1 | <ul><li>'கம்பிய பழுக்க வச்சு சூத்துல வைங்க சார்'</li><li>'ഇനി റെഡ് സ്ട്രീറ്റ്റിലും കൂടി പോയി ഇന്റർവ്യൂ എടുക്ക് ചേച്ചി'</li><li>'നിങ്ങൾ പണ്ടേ വിവരക്കേടാണ്. ബോധം ഇല്ലായ്മ കാണിക്കാതെ സ്ത്രീ. മറ്റുള്ളവരുടെ കിഡ്ണി കളയിപ്പിച്ചിട്ടുവേണോ നിന്റെ കഞ്ഞി കുടിക്കൽ.'</li></ul> | |
|
|
|
## Evaluation |
|
|
|
### Metrics |
|
| Label | Accuracy | |
|
|:--------|:---------| |
|
| **all** | 0.6875 | |
|
|
|
## 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("livinNector/m-minilm-l12-h384-dra-tam-mal-aw-setfit-finetune") |
|
# 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 | 2 | 15.4375 | 123 | |
|
|
|
| Label | Training Sample Count | |
|
|:------|:----------------------| |
|
| 0 | 132 | |
|
| 1 | 124 | |
|
|
|
### Training Hyperparameters |
|
- batch_size: (64, 64) |
|
- num_epochs: (10, 10) |
|
- max_steps: -1 |
|
- sampling_strategy: oversampling |
|
- num_iterations: 2 |
|
- 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 |
|
- l2_weight: 0.01 |
|
- seed: 42 |
|
- eval_max_steps: -1 |
|
- load_best_model_at_end: True |
|
|
|
### Training Results |
|
| Epoch | Step | Training Loss | Validation Loss | |
|
|:------:|:----:|:-------------:|:---------------:| |
|
| 0.0625 | 1 | 0.422 | - | |
|
| 0.625 | 10 | - | 0.4029 | |
|
| 1.25 | 20 | - | 0.2799 | |
|
| 1.875 | 30 | - | 0.2464 | |
|
| 2.5 | 40 | - | 0.2480 | |
|
| 3.125 | 50 | 0.2964 | 0.2451 | |
|
| 3.75 | 60 | - | 0.2368 | |
|
| 4.375 | 70 | - | 0.2444 | |
|
| 5.0 | 80 | - | 0.2393 | |
|
| 5.625 | 90 | - | 0.2382 | |
|
| 6.25 | 100 | 0.1825 | 0.2395 | |
|
| 6.875 | 110 | - | 0.2405 | |
|
| 7.5 | 120 | - | 0.2424 | |
|
| 8.125 | 130 | - | 0.2468 | |
|
| 8.75 | 140 | - | 0.2432 | |
|
| 9.375 | 150 | 0.1308 | 0.2451 | |
|
| 10.0 | 160 | - | 0.2454 | |
|
|
|
### Framework Versions |
|
- Python: 3.10.12 |
|
- SetFit: 1.1.0 |
|
- Sentence Transformers: 3.3.1 |
|
- Transformers: 4.45.2 |
|
- PyTorch: 2.5.1+cu121 |
|
- Datasets: 3.2.0 |
|
- Tokenizers: 0.20.3 |
|
|
|
## 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.* |
|
--> |