Instructions to use sentence-transformers/all-MiniLM-L6-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use sentence-transformers/all-MiniLM-L6-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2") 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] - Transformers
How to use sentence-transformers/all-MiniLM-L6-v2 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2") model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2") - Inference
- Notebooks
- Google Colab
- Kaggle
Request: DOI
I would like to cite this model for my paper.
What I did in my case (Thesis & scientific article), as there were no available papers at the moment, was:
1st. -Cited the base model (scientific article) : microsoft/MiniLM-L12-H384-uncased ---> https://arxiv.org/abs/2002.10957
2nd - I made a footnote about the fine-tuned version, explained the process of fine-tuning, and referenced it. -> sentence-transformers/all-MiniLM-L6-v2
3rd - Explained how I used it in my case.
I think this should be enough for any model card where there is a base model with a scientific article attached and a fine-tuned version without it.
Hope this helps :)