CoolFace
Modelpublic

livinNector/tam-political-classification-setfit

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes2downloads
Model Card

SetFit with microsoft/Multilingual-MiniLM-L12-H384

This is a SetFit model that can be used for Text Classification. This SetFit model uses microsoft/Multilingual-MiniLM-L12-H384 as the Sentence Transformer embedding model. A LogisticRegression instance is used for classification.

The model has been trained using an efficient few-shot learning technique that involves:

  1. 1.Fine-tuning a Sentence Transformer with contrastive learning.
  2. 2.Training a classification head with features from the fine-tuned Sentence Transformer.

Model Details

Model Description

Model Sources

Model Labels

LabelExamples
2<ul><li>'#மக்களின்சின்னம்மைக் \n#MikeVoiceOfPeople \n#Seeman\n\nகனிம வளங்கள் \nயாரு யாரால் கொள்ளை அடிக்க பட்டது ?\n\n#பாசிசபாஜக #திருட்டுதிமுக \n#அடிமைஅதிமுக #செத்துபோனகாங்கிரஸ் '</li><li>'கனவுகளை வெளிப்படுத்தும் \nதலைவர்களுடன் \nஎங்களின்\nசின்னம் 🎙️.\n\n#மக்களின்சின்னம்மைக்.\n\n~\n#சீமானின்சின்னம்ஒலிவாங்கி 🎙️'</li><li>'டேய் உபிஸ், எனக்கு ஒரு\nஉண்மை தெரிஞ்சாகணும்...\n\nஇந்த பொட்டி கோவாலு அப்போ\nபேசுனது பொய்யா இல்ல இப்போ\nபேசுறது பொய்யா!? 😬😂\n#NoVoteToDMK\n\n#Katchatheevu #IPL2024 #2GScam\n#SenthilBalaji #DrugMafiaDMK\n#PappuDiwas #EDRaid #DMKFailsTN '</li></ul>
0<ul><li>'கட்சி மாறிய 19 Ex.MLA க்கள், ஸ்டாலினுக்கு முத்தம், TR பாலுவின் கணக்குFine Time Media\n#congressibrahim #annamalai #mkstalin #dmk #bjp #udhayanidhi #edappadi #admk #pmk #dmdk #modi #Finetimemedia\n\n'</li><li>'#ElectionUpdate“15 சீட்டும், ₹1,000 கோடியும் தருவதாக கூட்டணிக்கு கூப்பிட்டாங்க. ஆனால் நான் போகல..!” -சீமான்\n\n#SunNews#Seeman#ElectionsWithSunNews '</li><li>'பிரதமர் ரோடு ஷோ - செல்லூர் ராஜூ விமர்சனம்\n\n#modi #modiroadshow #chennai #sellurraju #admk #Elections2024 #electionupdatewithsavukkumedia #electionwithSavukkuMedia #savukkumedia '</li></ul>
6<ul><li>'ஜீவநதி ப்ரியன்\xa0 mm ok'</li><li>'Siva Siva\xa0 என்னது'</li><li>'கவலைகள் மறந்து சிரிக்கTMP prank paarunkaEnjoy pannunka'</li></ul>
3<ul><li>'#நாம்தமிழர் கட்சிக்கு ஆதரவாக லண்டன் ஈழதமிழர்கள்..\n\nநாம்தமிழர் என்பது அனைத்து உலக தமிழர்களுக்கானது..\n\n#ParliamentElection2024\n\n#சீமானின்சின்னம்ஒலிவாங்கி\n#NTKSymbolMike '</li><li>'ஒவ்வொரு வாக்கும் நம் இனம் காக்கும்\n#மக்களின்சின்னம்மைக் '</li><li>'சகோதரர் ராகுல் காந்திக்கு ஜூன் 4ல் இனிப்பான வெற்றியை தருவோம்- முதலமைச்சர் மு.க.ஸ்டாலின்\n\n#TNCM #MKStalin #sweetvictory #RahulGandhi #DMK #Congress #Tamilnadunews #Jewellery #Jewelleryseized #Madurai #Siddaramaiah #KarnatakaCM #NDA #Congress #ipl #ipl2024 #PunjabvsRajasthan #Cricket #Sportsnews #MMNews #Maalaimalar'</li></ul>
4<ul><li>'அக் - 17-ம் தேதி 52வது ஆண்டில் அடியெடுத்து வைக்கும் அதிமுகNewsJ \n#admk #admknews #eps #edappadikpalanisamy #edappadi #newsj #newsjtamil \n\n'</li><li>'தமிழகம் முழுவதும் மதுவிற்கு அடிமைகளை உருவாக்கியாச்சி\n \nஇனிமேல் தைரியமா விலையை ஏற்றலாம் என்று நம்பிக்கையுடன் \n1 லட்சம் கோடி வருமானத்தை எதிர்நோக்கி திராவிட மாடல் வெற்றிநடை போடுகிறது...\n\n#திராவிடமாடல்பரிதாபங்கள் \n#டாஸ்மாக்அடிமைகள் \n#மதுவின்அடிமைகள் \n#சாராயமாடல் '</li><li>'கோவையில் முதலமைச்சர் ஸ்டாலின் பிரச்சாரம்\n\n#UpdateNews#DMK#MKStalin#Congress#RahulGandhi#LokSabhaElections2024#Coimbatore#ElectionCampaign#TamilNews#UpdateNews360 '</li></ul>
1<ul><li>'ஜனநாயத்தின் நம் வாக்கு என்பது வலிமைமிக்க ஆயுதம்\nஅதை அநீதிக்கு எதிராக ஏந்துவோம்! \n\n \n\n#மக்களின்சின்னம்ஒலிவாங்கி #MikeThePeoplesChoice \n#Elections2024 \n#எங்கள்வாக்குவிற்பனைக்குஅல்ல \n#MyVoteIsNotForSale '</li><li>'அண்டப்புளுகு ஆகாசப்புளுகு திமுக.\n\nமக்கள எந்தளவுக்கு முட்டாள் பயலுக ன்னு நெனைக்கிறாய்ங்க?\n\n#DMKFailsTN'</li><li>'கோவையில் நடைபெறும் பிரம்மாண்ட பொதுக்கூட்டத்தில் முதலமைச்சர் மு.க.ஸ்டாலின் மற்றும் ராகுல் காந்தி\n\n#Kovai #MKStalin #Rahul_Gandhi #DinakaranNews '</li></ul>
5<ul><li>'MGRன் அதிமுக இன்று இல்லை அதிமுக கோட்டையை தகர்த்த திமுக!\n\nFull video limk : \n\n#Nakkheeran #MKStalin #DMK '</li><li>'ஜெயலலிதா ஆட்சியில் தமிழ்நாட்டிற்கு வர அஞ்சும் மோடி எடப்பாடி ஆட்சிக்காலத்திலும் வந்தது குறைவு..\nஆனால் ஸ்டாலின் ஆட்சிக்காலத்தில் வாரவிடுமுறை போல் அடிக்கடி தமிழ்நாடு வருகிறார். அது மட்டுமல்ல RSS ஊர்வலமும் நடக்கிறது. புரிகிறதா திமுக பிஜேபி கள்ள உறவு…'</li><li>'கோவையில் முதலமைச்சர் மு.க.ஸ்டாலின், காங்கிரஸ் எம்.பி. ராகுல் காந்தி கூட்டாக தேர்தல் பரப்புரை!\n\n#Theekkathir#Coimbatore#INDIAAlliance#RahulGandhi#MKStalin '</li></ul>

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/tam-political-classification-setfit")
# Run inference
preds = model("\"பயனற்ற MP-யாக மாறன் இருக்கிறார்\"
#VinojPSelvam #dayanidhimaran #dmk
#bjp #CentralChennai ")

<!--

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 setMinMedianMax
Word count117.8534348
LabelTraining Sample Count
01361
1790
2637
3575
4412
5406
6171

Training Hyperparameters

  • —batch_size: (32, 32)
  • —num_epochs: (1, 1)
  • —max_steps: -1
  • —sampling_strategy: oversampling
  • —num_iterations: 1
  • —bodylearningrate: (2e-05, 1e-05)
  • —headlearningrate: 0.01
  • —loss: CosineSimilarityLoss
  • —distancemetric: cosinedistance
  • —margin: 0.25
  • —endtoend: True
  • —use_amp: False
  • —warmup_proportion: 0.1
  • —l2_weight: 0.01
  • —seed: 42
  • —evalmaxsteps: -1
  • —loadbestmodelatend: True

Training Results

EpochStepTraining LossValidation Loss
0.007410.438-
0.3676500.3051-
0.73531000.26480.2556

Framework Versions

  • —Python: 3.10.12
  • —SetFit: 1.1.0
  • —Sentence Transformers: 3.3.1
  • —Transformers: 4.45.2
  • —PyTorch: 2.4.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. -->