Feature Extraction
sentence-transformers
Safetensors
MLX
xlm-roberta
mteb
Sentence Transformers
sentence-similarity
Eval Results (legacy)
text-embeddings-inference
Instructions to use mlx-community/multilingual-e5-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use mlx-community/multilingual-e5-large with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mlx-community/multilingual-e5-large") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - MLX
How to use mlx-community/multilingual-e5-large with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir multilingual-e5-large mlx-community/multilingual-e5-large
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
mlx-community/multilingual-e5-large
The Model mlx-community/multilingual-e5-large was converted to MLX format from intfloat/multilingual-e5-large using mlx-lm version 0.0.3.
Use with mlx
pip install mlx-embeddings
from mlx_embeddings import load, generate
import mlx.core as mx
model, tokenizer = load("mlx-community/multilingual-e5-large")
# For text embeddings
output = generate(model, tokenizer, texts=["I like grapes", "I like fruits"])
embeddings = output.text_embeds # Normalized embeddings
# Compute dot product between normalized embeddings
similarity_matrix = mx.matmul(embeddings, embeddings.T)
print("Similarity matrix between texts:")
print(similarity_matrix)
- Downloads last month
- 153
Hardware compatibility
Log In to add your hardware
Quantized
Evaluation results
- accuracy on MTEB AmazonCounterfactualClassification (en)test set self-reported79.060
- ap on MTEB AmazonCounterfactualClassification (en)test set self-reported43.487
- f1 on MTEB AmazonCounterfactualClassification (en)test set self-reported73.327
- accuracy on MTEB AmazonCounterfactualClassification (de)test set self-reported71.221
- ap on MTEB AmazonCounterfactualClassification (de)test set self-reported81.558
- f1 on MTEB AmazonCounterfactualClassification (de)test set self-reported69.283
- accuracy on MTEB AmazonCounterfactualClassification (en-ext)test set self-reported80.420
- ap on MTEB AmazonCounterfactualClassification (en-ext)test set self-reported29.349
- f1 on MTEB AmazonCounterfactualClassification (en-ext)test set self-reported67.625
- accuracy on MTEB AmazonCounterfactualClassification (ja)test set self-reported77.837
- ap on MTEB AmazonCounterfactualClassification (ja)test set self-reported26.558
- f1 on MTEB AmazonCounterfactualClassification (ja)test set self-reported64.966
- accuracy on MTEB AmazonPolarityClassificationtest set self-reported93.490
- ap on MTEB AmazonPolarityClassificationtest set self-reported90.988
- f1 on MTEB AmazonPolarityClassificationtest set self-reported93.486
- accuracy on MTEB AmazonReviewsClassification (en)test set self-reported47.564
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mlx-community/multilingual-e5-large") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3]