Thanks for the great tutorial, it's awesome! Would you please share the google Colab notebook for the videos?
@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?
@TadjouLionelIT2 жыл бұрын
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!
@code4AI2 жыл бұрын
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
@TadjouLionelIT2 жыл бұрын
@@code4AI Thanks for your reply! I'll looked at those links for better understanding.
@MirrorNeuron2 жыл бұрын
@04:17 I am getting this error in Line 4 ImportError: cannot import name 'SetFitModel'
@code4AI2 жыл бұрын
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.
@MirrorNeuron2 жыл бұрын
@@code4AI I am in Py36 in AWS notebook instance
@Opera-15532 жыл бұрын
@@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.
@korilifs2 жыл бұрын
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?
@code4AI2 жыл бұрын
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 Жыл бұрын
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 ?