Collab-uniba/nlbse-multi-class-setfit
SetFit
This is a SetFit model that can be used for Text Classification. A LogisticRegression instance is used for classification.
The model has been trained using an efficient few-shot learning technique that involves:
- Fine-tuning a Sentence Transformer with contrastive learning.
- Training a classification head with features from the fine-tuned Sentence Transformer.
Model Details
Model Description
- Model Type: SetFit <!-- - Sentence Transformer: Unknown -->
- Classification head: a LogisticRegression instance
- Maximum Sequence Length: 384 tokens
- Number of Classes: 4 classes <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->
Model Sources
- Repository: SetFit on GitHub
- Paper: Efficient Few-Shot Learning Without Prompts
- Blogpost: SetFit: Efficient Few-Shot Learning Without Prompts
Model Labels
Uses
Direct Use for Inference
First install the SetFit library:
pip install setfitThen you can load this model and run inference.
from setfit import SetFitModel
# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("setfit_model_id")
# Run inference
preds = model("Read the Docs
Implement read the docs for documentation")<!--
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 Hyperparameters
- batch_size: (16, 2)
- num_epochs: (1, 1)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 20
- bodylearningrate: (2e-05, 1e-05)
- headlearningrate: 0.01
- loss: CosineSimilarityLoss
- distancemetric: cosinedistance
- margin: 0.25
- endtoend: False
- use_amp: False
- warmup_proportion: 0.1
- l2_weight: 0.01
- seed: 42
- evalmaxsteps: -1
- loadbestmodelatend: False
Training Results
Framework Versions
- Python: 3.11.6
- SetFit: 1.1.0
- Sentence Transformers: 3.0.1
- Transformers: 4.44.2
- PyTorch: 2.4.1+cu121
- Datasets: 2.21.0
- Tokenizers: 0.19.1
Citation
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. -->

\r\n\r\nTensorRT Version:TensorRT 8.4EA \r\nNVIDIA GPU: NVIDIA 2080T\r\nCUDA Version: cuda10.2\r\nOperating System: windows \r\n\r\nI made this error when I increased the input tensor size to (1,65536,6). Does Softmax need larger memory to run, or is it caused by some fusion operations\r\n'</li><li>'Terraform 0.14.x not supported\nHi,\r\nI am trying to do a terraform init inside the complete example folder and this is the output I get:\r\n\r\n> terraform init\r\n> Initializing modules...\r\n> - jenkins in ../..\r\n> Downloading cloudposse/cicd/aws 0.11.1 for jenkins.cicd...\r\n> - jenkins.cicd in .terraform/modules/jenkins.cicd\r\n> Downloading cloudposse/codebuild/aws 0.27.0 for jenkins.cicd.codebuild...\r\n> - jenkins.cicd.codebuild in .terraform/modules/jenkins.cicd.codebuild\r\n> Downloading git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.21.0 for jenkins.cicd.codebuild.this...\r\n> - jenkins.cicd.codebuild.this in .terraform/modules/jenkins.cicd.codebuild.this\r\n> Downloading cloudposse/label/null 0.22.1 for jenkins.cicd.this...\r\n> - jenkins.cicd.this in .terraform/modules/jenkins.cicd.this\r\n> Downloading cloudposse/ecr/aws 0.29.1 for jenkins.ecr...\r\n> - jenkins.ecr in .terraform/modules/jenkins.ecr\r\n> Downloading git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.21.0 for jenkins.ecr.this...\r\n> - jenkins.ecr.this in .terraform/modules/jenkins.ecr.this\r\n> Downloading cloudposse/efs/aws 0.25.0 for jenkins.efs...\r\n> - jenkins.efs in .terraform/modules/jenkins.efs\r\n> Downloading cloudposse/route53-cluster-hostname/aws 0.9.0 for jenkins.efs.dns...\r\n> - jenkins.efs.dns in .terraform/modules/jenkins.efs.dns\r\n> Downloading cloudposse/label/null 0.22.1 for jenkins.efs.dns.this...\r\n> - jenkins.efs.dns.this in .terraform/modules/jenkins.efs.dns.this\r\n> Downloading cloudposse/label/null 0.22.1 for jenkins.efs.this...\r\n> - jenkins.efs.this in .terraform/modules/jenkins.efs.this\r\n> Downloading cloudposse/backup/aws 0.4.0 for jenkins.efsbackup...\r\n> - jenkins.efsbackup in .terraform/modules/jenkins.efsbackup\r\n> Downloading git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.19.2 for jenkins.efsbackup.labelbackuprole...\r\n> - jenkins.efsbackup.labelbackuprole in .terraform/modules/jenkins.efsbackup.labelbackuprole\r\n> Downloading git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.19.2 for jenkins.efsbackup.this...\r\n> - jenkins.efsbackup.this in .terraform/modules/jenkins.efsbackup.this\r\n> Downloading cloudposse/elastic-beanstalk-application/aws 0.9.0 for jenkins.elasticbeanstalkapplication...\r\n> - jenkins.elasticbeanstalkapplication in .terraform/modules/jenkins.elasticbeanstalkapplication\r\n> Downloading cloudposse/label/null 0.22.1 for jenkins.elasticbeanstalkapplication.this...\r\n> - jenkins.elasticbeanstalkapplication.this in .terraform/modules/jenkins.elasticbeanstalkapplication.this\r\n> Downloading cloudposse/elastic-beanstalk-environment/aws 0.32.0 for jenkins.elasticbeanstalkenvironment...\r\n> - jenkins.elasticbeanstalkenvironment in .terraform/modules/jenkins.elasticbeanstalkenvironment\r\n> Downloading cloudposse/route53-cluster-hostname/aws 0.9.0 for jenkins.elasticbeanstalkenvironment.dnshostname...\r\n> - jenkins.elasticbeanstalkenvironment.dnshostname in .terraform/modules/jenkins.elasticbeanstalkenvironment.dnshostname\r\n> Downloading cloudposse/label/null 0.22.1 for jenkins.elasticbeanstalkenvironment.dnshostname.this...\r\n> - jenkins.elasticbeanstalkenvironment.dnshostname.this in .terraform/modules/jenkins.elasticbeanstalkenvironment.dnshostname.this\r\n> Downloading cloudposse/label/null 0.22.1 for jenkins.elasticbeanstalkenvironment.this...\r\n> - jenkins.elasticbeanstalkenvironment.this in .terraform/modules/jenkins.elasticbeanstalkenvironment.this\r\n> Downloading cloudposse/label/null 0.22.1 for jenkins.labelslaves...\r\n> - jenkins.labelslaves in .terraform/modules/jenkins.labelslaves\r\n> Downloading cloudposse/label/null 0.22.1 for jenkins.this...\r\n> - jenkins.this in .terraform/modules/jenkins.this\r\n> Downloading cloudposse/dynamic-subnets/aws 0.33.0 for subnets...\r\n> - subnets in .terraform/modules/subnets\r\n> Downloading cloudposse/label/null 0.22.0 for subnets.natinstancelabel...\r\n> - subnets.natinstancelabel in .terraform/modules/subnets.natinstancelabel\r\n> Downloading cloudposse/label/null 0.22.0 for subnets.natlabel...\r\n> - subnets.natlabel in .terraform/modules/subnets.natlabel\r\n> Downloading cloudposse/label/null 0.22.0 for subnets.privatelabel...\r\n> - subnets.privatelabel in .terraform/modules/subnets.privatelabel\r\n> Downloading cloudposse/label/null 0.22.0 for subnets.publiclabel...\r\n> - subnets.publiclabel in .terraform/modules/subnets.publiclabel\r\n> Downloading cloudposse/label/null 0.22.0 for subnets.this...\r\n> - subnets.this in .terraform/modules/subnets.this\r\n> Downloading cloudposse/utils/aws 0.2.0 for subnets.utils...\r\n> - subnets.utils in .terraform/modules/subnets.utils\r\n> Downloading cloudposse/label/null 0.22.0 for subnets.utils.this...\r\n> - subnets.utils.this in .terraform/modules/subnets.utils.this\r\n> Downloading cloudposse/label/null 0.22.1 for this...\r\n> - this in .terraform/modules/this\r\n> Downloading cloudposse/vpc/aws 0.18.1 for vpc...\r\n> - vpc in .terraform/modules/vpc\r\n> Downloading cloudposse/label/null 0.22.0 for vpc.label...\r\n> - vpc.label in .terraform/modules/vpc.label\r\n> Downloading cloudposse/label/null 0.22.0 for vpc.this...\r\n> - vpc.this in .terraform/modules/vpc.this\r\n> \r\n> Error: Unsupported Terraform Core version\r\n> \r\n> on .terraform/modules/jenkins.efsbackup.labelbackuprole/versions.tf line 2, in terraform:\r\n> 2: requiredversion = ">= 0.12.0, < 0.14.0"\r\n> \r\n> Module module.jenkins.module.efsbackup.module.labelbackuprole (from\r\n> git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.19.2)\r\n> does not support Terraform version 0.14.4. To proceed, either choose another\r\n> supported Terraform version or update this version constraint. Version\r\n> constraints are normally set for good reason, so updating the constraint may\r\n> lead to other errors or unexpected behavior.\r\n> \r\n> \r\n> Error: Unsupported Terraform Core version\r\n> \r\n> on .terraform/modules/jenkins.efsbackup.this/versions.tf line 2, in terraform:\r\n> 2: requiredversion = ">= 0.12.0, < 0.14.0"\r\n> \r\n> Module module.jenkins.module.efsbackup.module.this (from\r\n> git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.19.2)\r\n> does not support Terraform version 0.14.4. To proceed, either choose another\r\n> supported Terraform version or update this version constraint. Version\r\n> constraints are normally set for good reason, so updating the constraint may\r\n> lead to other errors or unexpected behavior.\r\n\r\nBasically the efsbackup submodule doesn\'t seem to support 0.14.x since it is locked in <0.14.0\r\n\r\nI have terraform 0.14.4\r\n\r\nAppreciate your help with this'</li><li>'Constant propagation computes wrong values\nGiven the following test file, computing the constant values for