Text Classification
setfit
Safetensors
sentence-transformers
bert
generated_from_setfit_trainer
Eval Results (legacy)
text-embeddings-inference
Run this model with HF Jobs
Run Finnish-actions/SetFit-FinBERT1-Avg-question on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Finnish-actions/SetFit-FinBERT1-Avg-question. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Finnish-actions/SetFit-FinBERT1-Avg-question on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Finnish-actions/SetFit-FinBERT1-Avg-question with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use Finnish-actions/SetFit-FinBERT1-Avg-question with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("Finnish-actions/SetFit-FinBERT1-Avg-question") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use Finnish-actions/SetFit-FinBERT1-Avg-question with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Finnish-actions/SetFit-FinBERT1-Avg-question") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files43 unmodified lines4445464748495051527 unmodified lines606162636465666768697071727374757677787980818283848586878816 unmodified lines10510610710810911011111211311411525 unmodified lines14114214314414514673 unmodified lines2202212222232242257 unmodified lines23323423523623723823924024124224324424524624724843 unmodified linesname: Metric---# SetFit with TurkuNLP/bert-base-finnish-cased-v1This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification. This SetFit model uses [TurkuNLP/bert-base-finnish-cased-v1](https://huggingface.co/TurkuNLP/bert-base-finnish-cased-v1) as the Sentence Transformer embedding model. 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:7 unmodified lines- **Sentence Transformer body:** [TurkuNLP/bert-base-finnish-cased-v1](https://huggingface.co/TurkuNLP/bert-base-finnish-cased-v1)- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) 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 ||:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|| 1 | <ul><li>'Etunimi Sukunimi miten luulet tilanteen parantuneen kun sairaala- ja tehohoito potilaiden määrä on vain kasvanut silloisesta?\nOlet niin totaalisen puusilmäinen ja hallirusvihan vallassa, että tätä on turha jatkaa pitemmälle. Pysy terveenä ja rauhallista joulua!'</li><li>'Takaisin hiilivoimaan?'</li><li>'Ja miksei tulisi'</li></ul> || 0 | <ul><li>'"Hylkiö" unionin toimesta johon ei kuulu.'</li><li>'Etunimi Almonkari-Kuikka en nyt varsinaisesti pelkästään tuota aihetta tarkoittanutkaan. Sekin on kuitenkin vähintään kyseenalaista, koska kyseessä ei ole valmis tuote, vaan hätämyyntiluvalla käytössä oleva ruiske, ja sen seurauksena on niinikään perusoikeudellinen terveydenhuollon taso turvaamattomalla tasolla.'</li><li>'Etunimi Sukunimi perustuslakia ei ole rikottu niissä asioissa mitä convoypellet väitti, kaikki mitä kaverit väittää ei ole totta .'</li></ul> |## Evaluation### Metrics| Label | Metric ||:--------|:-------|| **all** | 0.9671 |## Uses16 unmodified linespreds = model("Kohta on lisää lapsia sairaalassa koronan vuoksi ☹")```<!--### Downstream Use*List how someone could finetune this model on their own dataset.*--><!--### Out-of-Scope Use25 unmodified lines| 0 | 671 || 1 | 171 |### Training Hyperparameters- batch_size: (16, 16)- num_epochs: (4, 4)73 unmodified lines| 3.9557 | 2500 | 0.0031 | - || 4.0 | 2528 | - | 0.0565 |### Framework Versions- Python: 3.11.9- SetFit: 1.1.37 unmodified lines### 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}}```<!--43 unmodified lines44454647484950515253547 unmodified lines6263646566676869707172737475767778798081828384858687888916 unmodified lines10610710810911011111211311411511611711811912012112212312412512625 unmodified lines15215315415515615715873 unmodified lines2322332342352362372382397 unmodified lines24724824925025125225325425525625725825926026126226343 unmodified linesname: Metric---# Detect Questions in Asynchronous Conversation Comments## SetFit with TurkuNLP/bert-base-finnish-cased-v1This is a [SetFit](https://github.com/huggingface/setfit) model that can be used for Text Classification of actions in asynchronous conversation. This particular model detects if a comment includes a question or not. The configuration of the model is that the model is based on only one annotator's annotations (annotator A3). Metric evaluations are based on conservative ground truth (see paper). This SetFit model uses TurkuNLP/bert-base-finnish-cased-v1 as the Sentence Transformer embedding model (using word embeddings). A LogisticRegression instance is used for classification.The model has been trained using an efficient few-shot learning technique that involves:7 unmodified lines- **Sentence Transformer body:** [TurkuNLP/bert-base-finnish-cased-v1](https://huggingface.co/TurkuNLP/bert-base-finnish-cased-v1)- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance- **Maximum Sequence Length:** 512 tokens- **Number of Classes:** 2 classes (action present yes/no)<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) --><!-- - **Language:** Unknown --><!-- - **License:** Unknown -->### Model Sources- **Repository:** [GitHub](https://github.com/henniina/Detecting-paired-actions)- **Paper:** Paakki, H., Toivanen, P. and Kajava K. (2025). Implicit and Indirect: Detecting Face-threatening and Paired Actions in Asynchronous Online Conversations. Northern European Journal of Language Technology (NEJLT), 11(1), pp. 58-83.### Model Labels| Label | Examples ||:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|| 1 | <ul><li>'Etunimi Sukunimi miten luulet tilanteen parantuneen kun sairaala- ja tehohoito potilaiden määrä on vain kasvanut silloisesta?\nOlet niin totaalisen puusilmäinen ja hallirusvihan vallassa, että tätä on turha jatkaa pitemmälle. Pysy terveenä ja rauhallista joulua!'</li><li>'Takaisin hiilivoimaan?'</li><li>'Ja miksei tulisi'</li></ul> || 0 | <ul><li>'"Hylkiö" unionin toimesta johon ei kuulu.'</li><li>'Etunimi Sukunimi en nyt varsinaisesti pelkästään tuota aihetta tarkoittanutkaan. Sekin on kuitenkin vähintään kyseenalaista, koska kyseessä ei ole valmis tuote, vaan hätämyyntiluvalla käytössä oleva ruiske, ja sen seurauksena on niinikään perusoikeudellinen terveydenhuollon taso turvaamattomalla tasolla.'</li><li>'Etunimi Sukunimi perustuslakia ei ole rikottu niissä asioissa mitä convoypellet väitti, kaikki mitä kaverit väittää ei ole totta .'</li></ul> |## Evaluation### Metrics| Label | Metric ||:--------|:-------|| **5-fold cross-validated F1** | 0.96 |## Uses16 unmodified linespreds = model("Kohta on lisää lapsia sairaalassa koronan vuoksi ☹")```### Downstream UseNB. This model has been trained on data coming from Finnish language asynchronous conversations under crisis related news on Facebook. This specific model has been trained to detect whether a comment includes a question or not. It reflects only one of our annotators' label interpretations, so the best use of our models (see our paper) would be to combine a set of models we provide on our Huggingface (Finnish-actions), and use a model ensemble to provide label predictions. It needs to be noted also that the model may not be well applicable outside of its empirical context, so in downstream applications, one should always conduct an evaluation of the model applicability using manually annotated data from that specific context (see our paper for annotation instructions).## Out-of-Scope UsePlease use this model only for action detection and analysis. Uses of this model and the involved data for generative purposes (e.g. NLG) is prohibited.### Bias, Risks and LimitationsNote that the model may produce errors. Due to the size of the training dataset, model may not generalize very well even for other novel topics within the same context. Note that model predictions should not be regarded as final judgments e.g. for online moderation purposes, but each case should also be regarded individually if using model predictions to support moderation. Also, the annotations only reflect three (though experienced) annotators' interpretations, so there might be perspectives on data intepretation that have not been taken into account here.If model is used to support moderation on social media, we recommend that final judgments should always be left for human moderators.<!--### Out-of-Scope Use25 unmodified lines| 0 | 671 || 1 | 171 |<!--### Training Hyperparameters- batch_size: (16, 16)- num_epochs: (4, 4)73 unmodified lines| 3.9557 | 2500 | 0.0031 | - || 4.0 | 2528 | - | 0.0565 |-->### Framework Versions- Python: 3.11.9- SetFit: 1.1.37 unmodified lines### BibTeX```bibtex@article{paakki-implicit-indirect,doi = {https://doi.org/10.3384/nejlt.2000-1533.2025.5980},url = {https://nejlt.ep.liu.se/article/view/5980},author = {Paakki, Henna and Toivanen, Pihla and Kajava, Kaisla},title = {Implicit and Indirect: Detecting Face-threatening and Paired Actions in Asynchronous Online Conversations},publisher = {Northern European Journal of Language Technology (NEJLT)},volume= {11},number= {1},year = {2025}}```<!--
README.md+35-20