Edit model card

SetFit with sentence-transformers/paraphrase-mpnet-base-v2

This is a SetFit model that can be used for Text Classification. This SetFit model uses sentence-transformers/paraphrase-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:

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

Model Details

Model Description

Model Sources

Model Labels

Label Examples
3
  • "I can relate to a lot of what you've described here. I call myself a beer snob because I enjoy trying new craft beers but won't usually go for any thing else, and I know what I like when it comes to beer. I'm currently on a hiatus because while I was doing well at having less for a couple of weeks, last weekend I went for 8/day two weekend days in a row. My doctor told me recently that 3 is a healthy limit, and I more than doubled that on those days so ... When it becomes a problem for you; When you're too sick the next day to do anything, etc, that's what eventually made me decide I want to shift my focus from drinking beer to everything else in life. It was fun while it lasted, may not be over for me entirely I just don't like where I was headed. Hope this helps."
  • 'I’ve been trying out NA beer. They’re significantly lower calories and, well, non-alcoholic. It scratches the itch for me.'
  • "Yeah, I weigh myself daily and definitely notice how much even a couple hundred extra calories can stall my weight loss. It's been helpful in motivating myself: while a couple of beers after work doesn't seem like much, it's not worth it when I hop on the scale the next few days. Being strict also helped me choose healthier options. If I know a slice of cake has the same calories as a high-protein wrap but is more likely to make me feel tired and hungry later, it naturally becomes a lot less appealing."
1
  • "These things happen sometimes, and that's what rescue meds are for. Today is the day I try to get out of the house and meet up with friends at a bar. Part of why I'm not drinking right now is because I'd skip going out and just drink beers at home. I want to socialize more. I'm a bit hesitant to go today though."
  • "Beer and boardgames in Heidelberg. It's an Event you can find on Meetup. Just 20 to 40 mostly international people meeting to play boardgames. No drinking beer needed, I drink apple juice. There is also a boardgame group meeting at the kolosseum in Heidelberg Thursdays at 17 uhr Hope you like those options"
  • 'I go to a lot of motorcycle meetups, they are often at bars or breweries. My usual m.o. is to have one regular beer, and then switch over to Athletic Brews, a Non alcoholic beer. I like the taste, and it’s nice to be able to chill and drink with the other guys. I just really don’t want to risk riding home after having more than one alcoholic beer.'
4
  • 'Like the title says, what are your ways of keeping track of bourbons and other spirits you’ve tried over the years? When it comes to beer I’ve used the app untappd to rate and discover new craft beers in the past and I’ve really enjoyed using something like that.'
  • 'Enjoy it. S-189 is a great yeast. I would not call it a Cold IPA. I would just call it a tasty noble-dry-hopped pilsner. Prost! Click to expand...'
  • "I've got some super high gravity homebrews that are over 20 years old - some over 25. They've been kept properly. Last one I cracked was a few years ago (over 20 years old - an imperial stout with elderberries from my sister's farm) and it was sublime. I wouldn't bother with commercial American light lagers that are over six months old (they are so underhopped anyway and those hop oils deteriorate), but whatever floats your goat."
2
  • "Taking one beer or glass of wine or so helps me relax and calm my thoughts. And it's tasty."
  • "Every person I know who works night shift has a drink or two after their shift just to fall asleep lol it might be a common thing. If it's in moderation and it's not ruining your health or interfering with your life, I'd say there's nothing wrong with having a beer or two to relax after work. After all you worked for it."
  • 'Yes rdr2 is a really good game if you just want to relax, i come back from work sometimes order 2 beers, a burger, and fries and just enjoy the good music, scenery, and story'
5
  • 'Having a beer at a wine farm, ah bo gintsa bona will never leave me ????'
  • "As a java lover, I determined to locate out which quickly meals chain in Canada made the fine coffee... and the reply certainly took me via surprise. To get an concept of the great espresso in Canada, I tried the brew from three of the most famous espresso chains in the country. I stored it easy by means of sampling a small black espresso from Starbucks, Tim Hortons and McDonald's to discover out which one reigns supreme."
  • "Despite it being only 92 with 35% humidity, a notably comfortable summer evening, my beer is gone and I'd better go cook up some supper . Y'all have fun!"
0
  • 'It is 6:00 am. I’m preparing to head to the Muni with my father to celebrate the lives of my lifelong Browns fan uncle and grandfather who both passed away last week. Beers will be had, good times will be celebrated, and the Browns will kick ass. It is written. IT IS GAMEDAY MY DUDES.'
  • 'I live in the "boonies" and beer is $14+ a can at any sporting event or concert I go to. Its wild.'
  • 'Love it everytime! Best wings ever in my opinion especially the Carolina sweet & tangy. Bar quesadillas are to die for , lots of beer options for beer lovers like myself. & ALWAYS has the games on that I want to watch whether it’s basketball , baseball or football . My go to bar on the island .'

Evaluation

Metrics

Label Accuracy
all 0.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("bhaskars113/beer-model")
# Run inference
preds = model("@GayChemist @TylerDinucci It's Wisconsin. I assume that \"drinking fountains\" mean beer there.")

Training Details

Training Set Metrics

Training set Min Median Max
Word count 3 60.6875 260
Label Training Sample Count
0 16
1 16
2 16
3 16
4 16
5 16

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
  • seed: 42
  • eval_max_steps: -1
  • load_best_model_at_end: False

Training Results

Epoch Step Training Loss Validation Loss
0.0042 1 0.2324 -
0.2083 50 0.1497 -
0.4167 100 0.0141 -
0.625 150 0.002 -
0.8333 200 0.0013 -

Framework Versions

  • Python: 3.10.12
  • SetFit: 1.0.3
  • Sentence Transformers: 2.2.2
  • Transformers: 4.35.2
  • PyTorch: 2.1.0+cu121
  • Datasets: 2.16.1
  • Tokenizers: 0.15.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}
}
Downloads last month
9
Safetensors
Model size
109M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for bhaskars113/beer-model

Finetuned
(246)
this model

Evaluation results