VOOZH about

URL: https://huggingface.co/mlx-community/tasksource-ModernBERT-base-embed-6bit

⇱ mlx-community/tasksource-ModernBERT-base-embed-6bit · Hugging Face


mlx-community/tasksource-ModernBERT-base-embed-6bit

The Model mlx-community/tasksource-ModernBERT-base-embed-6bit was converted to MLX format from tasksource/ModernBERT-base-embed 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/tasksource-ModernBERT-base-embed-6bit")

# 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
16
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Model tree for mlx-community/tasksource-ModernBERT-base-embed-6bit

Finetuned
(1334)
this model

Datasets used to train mlx-community/tasksource-ModernBERT-base-embed-6bit

Collection including mlx-community/tasksource-ModernBERT-base-embed-6bit