How to use Lajavaness/bilingual-embedding-small with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Lajavaness/bilingual-embedding-small", trust_remote_code=True) sentences = [ "C'est une personne heureuse", "C'est un chien heureux", "C'est une personne très heureuse", "Aujourd'hui est une journée ensoleillée" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4]
How to use Lajavaness/bilingual-embedding-small with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Lajavaness/bilingual-embedding-small", trust_remote_code=True, dtype="auto")
The community tab is the place to discuss and collaborate with the HF community!