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: >
As soon as I saw my human pull out my favorite red leash, my tail started
wagging and I started barking enthusiastically. I had been waiting all day
to go to my favorite place in the whole world, outside. When my human
clipped my leash to my collar, I felt my heart sing with joy. Finally! As
soon as I stepped out the door, I felt the cool autumn breeze wash over me
like a wave. The squirrels scattered inside of the trees and the birds
whistled in harmonies that floated through the autumn breeze. The trees
were a deep, rich emerald color that drifted me off into a new universe.
That is what I loved about the outside, it was always so peaceful and
serene. We walked a few blocks admiring nature's beauty until we suddenly
halted to a stop. I looked around but found nothing that looked out of the
ordinary. My human opened the car door and placed me in the back seat. My
heart started to beat so fast I thought it would burst out of my chest and
my mind was racing. Where are we going? Millions of dreadful thoughts
popped into my brain. By the time we arrived, my fur was soaked with
sweat. As soon as I walked out the door, I stopped in my tracks. In front
of me was a place I can only describe as paradise. Behind the white gate,
there were clusters of dogs and rubber balls crowding the green grass.
What more could a dog ever dream of? My heart sang with joy as I stepped
through the gate. I knew then that this would be the best day of my life.
- text: >
Rock bottom interest rates and easy money, maybe. But many of these truly
tech companies like Microsoft, Apple, Facebook and so on have huge cash
reserves. I live in Gatesville, Seattle, and I will offer another
explanation or at least a contributing factor. A senior software engineer
at Microsoft makes anywhere from a new hire at $250K per year with gold
plated benefits up to $500K per year for someone with a few years under
their belt. Microsoft hires numerous "independent contractors" at half or
less than what they pay full time employees also with substantially lesser
benefits who work from home. Look for them to increase their base of
independent contractors as long as the government lets them get away with
it.
- text: >
“Amid this dynamic environment, we delivered record results in fiscal year
2022: We reported $198 billion in revenue and $83 billion in operating
income. And the Microsoft Cloud surpassed $100 billion in annualized
revenue for the first time.”- From Microsoft’s 2022 Annual Report
Shareholder’s Letter
- text: >
Paresh Y Murudkar Hypothesis: Google wants it leaked. OpenAI has by being
public acquired huge amount of attention. Although Google will likely
achieve partity with OpenAI shortly, their immediate danger is to become
the default definition of the technology. Microsoft found out years ago
that even though Bing had reached technical parity with Google, the public
had been convinced to search for something was to "Google It.'Thus, Google
has to ghet out there with its own stuff, before the "GPT It" because the
next generation term for search.
- text: >
Mor -- You sound like someone who has never experienced real hardship.
Your idea that homelessness is a "lifestyle", as if it were freely chosen,
suggests you have never been there. Try to imagine this: Your employer has
a big layoff, and with two week's severance, you lose your job. For a
while, you get by on unemployment and your spouse's part-time income. But
then unemployment runs out because your industry has tanked in your state.
You search fruitlessly for a job, and begin to get really depressed. Your
spouse is diagnosed with cancer, and to pay for their treatment, you sell
your modest home and move in with your brother-in-law and his family,
living in their basement, sharing their one bathroom. Your teenage child
who has been uprooted to a new town and school starts taking drugs and
acting out, getting arrested, coming home really late, making a lot of
noise, being very depressed and angry at everyone. The brother-in-law says
his sister with cancer can stay but your teen cannot. You two move into
another relative's basement, but that doesn't last long. Your teen
disappears, leaves a note "I can't stand it anymore. Sorry, love you,
gotta go." You run out of your last cash sending it to help your wife. The
relative can't afford to feed you. You end up on the street. Open your
mind.
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/my-awesome-setfit-model")
# Run inference
preds = model("“Amid this dynamic environment, we delivered record results in fiscal year 2022: We reported $198 billion in revenue and $83 billion in operating income. And the Microsoft Cloud surpassed $100 billion in annualized revenue for the first time.”- From Microsoft’s 2022 Annual Report Shareholder’s Letter
")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 13 | 132.875 | 296 |
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: 20
- 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.01 | 1 | 0.3469 | - |
0.5 | 50 | 0.0603 | - |
1.0 | 100 | 0.0011 | - |
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}
}