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?
@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.
@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.
@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
Жездуха 41-серия
36:26
Million Show
Рет қаралды 5 МЛН
Attention in transformers, visually explained | DL6
26:10
3Blue1Brown
Рет қаралды 2 МЛН
MULTI CLASS CLASSIFICATION OF TEXT USING MACHINE LEARNING
21:31
AS Learning
Рет қаралды 9 М.
Why Does Diffusion Work Better than Auto-Regression?
20:18
Algorithmic Simplicity
Рет қаралды 423 М.
SetFit: Few Shot Learning for Text Classification
11:36
Rajistics - data science, AI, and machine learning
Рет қаралды 4,1 М.
NEW: Better In-Context Learning ICL, Improved RAG (Harvard)
26:43
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4,3 МЛН
Жездуха 41-серия
36:26
Million Show
Рет қаралды 5 МЛН