Hello there,
I came across this very interesting post (Sentence Transformers in the Hugging Face Hub 14)  that essentially shows a way to extract the embeddings for a given word or sentence
from sentence_transformers import SentenceTransformer
sentences = ["This is an example sentence", "Each sentence is converted"]

model = SentenceTransformer('sentence-transformers/paraphrase-MiniLM-L6-v2')
embeddings = model.encode(sentences)
print(embeddings)

Just a few questions if someone has a few moments:

how are these embeddings different from contextual embeddings that I would get with distilbert and other transformer models?
More importantly, once I have the embeddings I can simply compute a cosine similarity metrics with other sentences to cluster by similarity. If so, what is the need of an API as described here Sentence Transformers in the Hugging Face Hub 14. Am I missing something more subtle here?

Thanks!!