CODE SetFit w/ SBERT for Text Classification (Few-Shot Learning) multi-class multi-label (SBERT 44)

  Рет қаралды 3,636

Discover AI

Discover AI

Күн бұрын

Пікірлер: 13
@azinposhtyar9222
@azinposhtyar9222 Жыл бұрын
Thanks for the great tutorial, it's awesome! Would you please share the google Colab notebook for the videos?
@MirrorNeuron
@MirrorNeuron 2 жыл бұрын
@04:17 I am getting this error in Line 4 ImportError: cannot import name 'SetFitModel'
@code4AI
@code4AI 2 жыл бұрын
It works just fine. After you "pip install setfit" and import the model, it works (as seen in the live video) ... May depend on your specific virtual environment, I just used the free COLAB NB form Google.
@MirrorNeuron
@MirrorNeuron 2 жыл бұрын
@@code4AI I am in Py36 in AWS notebook instance
@Opera-1553
@Opera-1553 2 жыл бұрын
@@MirrorNeuron you need to create a virtual environment (say pytho3.8.5) and use that to add a new kernel in your AWS Sagemaker, and it will work.
@korilifs
@korilifs 2 жыл бұрын
Can I only get a similarity scores of my set to a certain prompt with this system rather then classifying sentences according to predefined labels?
@code4AI
@code4AI 2 жыл бұрын
SetFit being a few-shot learning approach, I showed in the video at about 11 min that when you run inference on your trained model, you get a classification for your prompt. We trained it on a sentiment classifier and when we prompt two sentences, we do not get a similarity score to a set, but a classification: either sentiment "good" or sentiment "bad", according to our predefined labels (eg 0 or 1) in our training dataset. So you end up with a trained model, that you can apply in any familiar way you want.
@brianmvukwe5506
@brianmvukwe5506 Жыл бұрын
How do you use this with an input of 2 sentence(for duplicate detection). How do the parameters in the SetFitTrainer's column_mapping change?
@TadjouLionelIT
@TadjouLionelIT 2 жыл бұрын
Thansk for your video about SetFit. I've also try playing with it for Multiclass (10 classes) classifier on speech acts recognition (MRDA dataset) with 78% of accurary. But I tried to use SoftMaxLoss for the same multiclass finetuning and I got some errors. Could please make a video explaining when and how to use SoftMaxLoss and TripletLoss with Setfit. Thanks in advance!
@code4AI
@code4AI 2 жыл бұрын
Will take some time for new videos ... For immediate clarification two sources of information: towardsdatascience.com/triplet-loss-advanced-intro-49a07b7d8905 and Classification Loss Functions: Comparing SoftMax, Cross Entropy, and More: wandb.ai/capecape/classification-techniques/reports/Classification-Loss-Functions-Comparing-SoftMax-Cross-Entropy-and-More--VmlldzoxODEwNTM5 with referenced: Losses Learned -- Optimizing Negative Log-Likelihood and Cross-Entropy in PyTorch (Part 1) sebastianraschka.com/blog/2022/losses-learned-part1.html
@TadjouLionelIT
@TadjouLionelIT 2 жыл бұрын
@@code4AI Thanks for your reply! I'll looked at those links for better understanding.
@BatBallBites
@BatBallBites Жыл бұрын
Initially you choose 32 samples for few shot learning but in your training loop it is showing that you are using 3480 samples for training ?
@Hipno70
@Hipno70 9 ай бұрын
its a crapy tutorial
Finally: Grokking Solved - It's Not What You Think
27:02
Discover AI
Рет қаралды 3,5 М.
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
She wanted to set me up #shorts by Tsuriki Show
0:56
Tsuriki Show
Рет қаралды 8 МЛН
Multi-Class Language Classification With BERT in TensorFlow
43:24
James Briggs
Рет қаралды 19 М.
SetFit: Few Shot Learning for Text Classification
11:36
Rajistics - data science, AI, and machine learning
Рет қаралды 4,1 М.
Attention in transformers, visually explained | DL6
26:10
3Blue1Brown
Рет қаралды 2 МЛН
MULTI-LABEL TEXT CLASSIFICATION USING 🤗 BERT AND PYTORCH
49:55
The Artificial Guy
Рет қаралды 52 М.
Efficient Few-Shot Learning with Sentence Transformers
1:06:43
HuggingFace
Рет қаралды 15 М.