Downloads · 30 days
1.1K
38% of all-time downloads
thoddnn/all-MiniLM-L6-v2-4bit
all-MiniLM-L6-v2-4bit is a sentence similarity model from thoddnn. Use it when you need a score for how close two texts are. It is set up for sentence-transformers. The card lists the license as apache-2.0.
The Model mlx-community/all-MiniLM-L6-v2-4bit was converted to MLX format from sentence-transformers/all-MiniLM-L6-v2 using mlx-lm version 0.0.3.
Downloads · 30 days
1.1K
38% of all-time downloads
All-time downloads
2.8K
Public
Parameters
22.7M
12.8 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors12.8 MB · 93%
How the weights are stored.
U3222.7M · 100%
From the Hugging Face model README
The Model mlx-community/all-MiniLM-L6-v2-4bit was converted to MLX format from sentence-transformers/all-MiniLM-L6-v2 using mlx-lm version 0.0.3.
pip install mlx-embeddings
from mlx_embeddings import load, generate
import mlx.core as mx
model, tokenizer = load("mlx-community/all-MiniLM-L6-v2-4bit")
# 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)