Skip to content

Instantly share code, notes, and snippets.

@vaibhavpandeyvpz
Created April 30, 2024 03:50
Show Gist options
  • Save vaibhavpandeyvpz/3746538dd11baeb5a775581e78e904f6 to your computer and use it in GitHub Desktop.
Save vaibhavpandeyvpz/3746538dd11baeb5a775581e78e904f6 to your computer and use it in GitHub Desktop.
Generate word embeddings from sentences using "bge-large-en-v1.5" model.
from sentence_transformers import SentenceTransformer
EMBEDDING_MODEL = "BAAI/bge-large-en-v1.5"
model = SentenceTransformer(EMBEDDING_MODEL)
embeddings = model.encode(sentences=["Hey", "How are you?"], normalize_embeddings=True)
sentence-transformers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment