How to use SetFit/MiniLM_L3_clinc_oos_plus_distilled with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("SetFit/MiniLM_L3_clinc_oos_plus_distilled") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4]
How to use SetFit/MiniLM_L3_clinc_oos_plus_distilled with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("SetFit/MiniLM_L3_clinc_oos_plus_distilled") model = AutoModel.from_pretrained("SetFit/MiniLM_L3_clinc_oos_plus_distilled")
hi, If i want to train the model with my own dataset how do i prepare the dataset ? I am passing the train and eval data as dictionary but its not able to read the colnames. how do I prepare my own data to train this model ?
· Sign up or log in to comment