Comments (5)
I have reduced the dimensions with UMAP and visualized the embeddings of the training set with all-MiniLM-L12-v2
vs all-MiniLM-L12-v2-setfit
(fitted model). Then I just highlighted every text which includes "acne" and "pimple". The green ones are which do not include "acne" or "pimple". The actual task was a binary classification if a text is related to skincare or not.
It looks like that the model "learned" that "acne" and "pimple" are very close. Their embeddings are closer on average after fitting the model with the training data. I did not calculate the average distance of those embeddings but from a visual point they should be closer together.
That tells me that even after binary classification the embeddings could be used improving the semantic search. I'll do another test with a multi-label classification but creating the training set needs some data wrangling. When I've found some time to do test, I'll post the results here.
from setfit.
I am very interested in this topic too - planning to use only the fine-tuning part and use the embeddings for semantic search. Any thoughts?
from setfit.
This is super neat! Thanks for sharing the UMAP comparison @Raidus!
Tangential question, are you uploading your model to the HF hub or you storing the fine-tuned model locally and then calling it to get the embeddings?
from setfit.
Very interesting experimental results. Out of curiosity, the model_sbert
/all-MiniLM-L12-v2
SentenceTransformer is not finetuned on the data, right?
from setfit.
Hi,
How I can train the model Setfit model for semantic search assuming I don't have labeled data ( let's say I have product descriptions) then how I can use the trainer Setfit trainer to create positive and negative samples, as per the hugging face blog it needs a few labels to train right? (Correct me if I am wrong)
Please, help to understand the process of how I can just use the product description to train setfit model and use that on my queries for semantic search
Thanks
from setfit.
Related Issues (20)
- Can we use Setfit just for finetuning ST Embedding model to create embeddings HOT 2
- MultiGPU support or better intergration for loading models HOT 1
- i found a typo in docs HOT 1
- Methodological error in zero cost, zero time, zero shot notebook HOT 2
- Usage of deprecated `evaluation_strategy` in TrainingArguments HOT 1
- Data validation when using differentiable_head
- Can you please add an example with early stopping based on classification loss?
- how to optimize setfit inference
- exception:enum PyPreTokenizerTypeWrapper, while loading the fine-tuned model for evaluation HOT 7
- Regarding expanding the label column
- Setfit can't doing model prediction after training for MultiClass Classification with hf Trainer HOT 1
- Item taxonomy generation
- The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
- Possibility to monitor head training?
- Model checkpoints saved during the training are unusable
- Example from quick start fails with 'TrainingArguments' object has no attribute 'eval_strategy' HOT 8
- Clarification on end_to_end vs trainer.train_embeddings HOT 1
- Savely save & load SetFitModel with custom differentiable head
- Multiclass Training Error HOT 1
- setfit example does not work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from setfit.