metadata
base_model: sentence-transformers/all-mpnet-base-v2
library_name: setfit
metrics:
- accuracy
pipeline_tag: text-classification
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: >
John Ondespot Help me out. So Yellen has to tell the President that they
cannot afford to pay bondholders in the favour of US civil servants and
military and homeless to keep society rolling and let the big banks hold
out for money down the line? To float the entire USA financial system from
collapse but also from societal rioting on Capitol Hill? I am getting
this? Cause the more I read this is quite a debt watched by the major
credit leaders of the US commercial and credit banking system?
- text: >
Independent I disagree that, in your words, Lula "is the biggest thief in
Brazil's history." The excellent Guardian article you cite requires a
careful reading to the end. To me, it seems like the Brazilian
parliamentary system practically encourages corruption and has been rife
with corruption in most administrations. Lula too fell into corruption to
gain political support to enact his social reforms when faced with a
minority in Congress. (This reminds me of the leftist Peruvian president
who tried to dissolve the conservative dominated Congress that block any
of his reforms.) Lula resorted to bribes to get support from minority
parties. From the Guardian article: "Although illegal, this allowed the
Workers’ Party to get things done. Lula’s first term delivered impressive
progress on alleviating poverty, social spending and environmental
controls."At the same time, "it was the Workers’ Party that had put in
place the judicial reforms that allowed the investigation to go ahead.
There would have been no Car Wash if the government had not appointed, in
September 2013, an independent attorney general."So maybe Lula will prove
to be a better president today.
- text: >
The reality is that in Brazil the level of corruption has exceeded all
limits, our system is similar to the American one, but imagine that a
former president convicted of corruption in which he should have served a
sentence of 9 years in 2018 was released for cheating by the judiciary and
could still run for office (which is illegal under our constitution).Lula
is not just a communist, he is the "kingpin" these protests are a sample
of the desperation of people who fear for their freedom and integrity.
- text: >
The ‘Trump of the Tropics’ Goes Bust The definitive challenge for Luiz
Inácio Lula da Silva: to be president for all the people. SÃO PAULO,
Brazil — As a shocked nation watched live on television and social media,
thousands of radical supporters of a defeated president marched on the
seat of the federal government, convinced that an election had been
stolen. The mob ransacked the Congress, the Supreme Court and the
presidential palace. It took the authorities several hours to arrest
hundreds of people and finally restore order. The definitive challenge for
Luiz Inácio Lula da Silva: to be president for all the people.
- text: >
Friends,Speaker McCarthy and Representative Taylor Greene aren't the
problems---WE ARE!!!! And, by we, I mean the people who registered and
voted for them. These clowns aren't in the House of Representatives by
osmosis, our fellow citizens voted them into office. Obviously, some
Americans want the US to be run this way. But if you don't, you can do
something about it. Find out who's going to be running for office in your
area (county, city, state, federal) and start asking them questions? Are
they running to represent you or someone else? Go ahead and ask them
personal questions, tell them you read about it on "deepfake" website. But
more importantly, don't complain online. You can do something to stop
them. It's a simple 4 step process: 1) Clean out your ears! 2) Support the
people you think will actually help you. 3) Register and 4) Vote. Yes,
vote. Vote it like my life depends on it because it does!
inference: true
model-index:
- name: SetFit with sentence-transformers/all-mpnet-base-v2
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: Unknown
type: unknown
split: test
metrics:
- type: accuracy
value: 1
name: Accuracy
SetFit with sentence-transformers/all-mpnet-base-v2
This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/all-mpnet-base-v2 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:
- 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 body: sentence-transformers/all-mpnet-base-v2
- Classification head: a LogisticRegression instance
- Maximum Sequence Length: 384 tokens
- Number of Classes: 2 classes
Model Sources
- Repository: SetFit on GitHub
- Paper: Efficient Few-Shot Learning Without Prompts
- Blogpost: SetFit: Efficient Few-Shot Learning Without Prompts
Model Labels
Label | Examples |
---|---|
yes |
|
no |
|
Evaluation
Metrics
Label | Accuracy |
---|---|
all | 1.0 |
Uses
Direct Use for Inference
First install the SetFit library:
pip install setfit
Then you can load this model and run inference.
from setfit import SetFitModel
# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("davidadamczyk/setfit-model-7")
# Run inference
preds = model("John Ondespot Help me out. So Yellen has to tell the President that they cannot afford to pay bondholders in the favour of US civil servants and military and homeless to keep society rolling and let the big banks hold out for money down the line? To float the entire USA financial system from collapse but also from societal rioting on Capitol Hill? I am getting this? Cause the more I read this is quite a debt watched by the major credit leaders of the US commercial and credit banking system?
")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 23 | 107.2 | 272 |
Label | Training Sample Count |
---|---|
no | 18 |
yes | 22 |
Training Hyperparameters
- batch_size: (16, 16)
- num_epochs: (1, 1)
- max_steps: -1
- sampling_strategy: oversampling
- num_iterations: 120
- body_learning_rate: (2e-05, 2e-05)
- head_learning_rate: 2e-05
- loss: CosineSimilarityLoss
- distance_metric: cosine_distance
- margin: 0.25
- end_to_end: False
- use_amp: False
- warmup_proportion: 0.1
- l2_weight: 0.01
- seed: 42
- eval_max_steps: -1
- load_best_model_at_end: False
Training Results
Epoch | Step | Training Loss | Validation Loss |
---|---|---|---|
0.0017 | 1 | 0.3073 | - |
0.0833 | 50 | 0.1154 | - |
0.1667 | 100 | 0.0012 | - |
0.25 | 150 | 0.0002 | - |
0.3333 | 200 | 0.0002 | - |
0.4167 | 250 | 0.0001 | - |
0.5 | 300 | 0.0001 | - |
0.5833 | 350 | 0.0001 | - |
0.6667 | 400 | 0.0001 | - |
0.75 | 450 | 0.0001 | - |
0.8333 | 500 | 0.0001 | - |
0.9167 | 550 | 0.0001 | - |
1.0 | 600 | 0.0001 | - |
Framework Versions
- Python: 3.10.13
- SetFit: 1.1.0
- Sentence Transformers: 3.0.1
- Transformers: 4.45.2
- PyTorch: 2.4.0+cu124
- Datasets: 2.21.0
- Tokenizers: 0.20.0
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}
}