mlx-community/all-MiniLM-L6-v2-bf16

The Model mlx-community/all-MiniLM-L6-v2-bf16 was converted to MLX format from sentence-transformers/all-MiniLM-L6-v2 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/all-MiniLM-L6-v2-bf16")

# For text embeddings
output = generate(model, processor, 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
181
Safetensors
Model size
22.7M params
Tensor type
BF16
Β·
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for mlx-community/all-MiniLM-L6-v2-bf16

Adapters
1 model

Datasets used to train mlx-community/all-MiniLM-L6-v2-bf16

Space using mlx-community/all-MiniLM-L6-v2-bf16 1