Downloads · 30 days
44
8% of all-time downloads
mlx-community/answerdotai-ModernBERT-base-4bit
answerdotai-ModernBERT-base-4bit is a fill-mask model from mlx-community. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as apache-2.0.
The Model mlx-community/answerdotai-ModernBERT-base-4bit was converted to MLX format from answerdotai/ModernBERT-base using mlx-lm version 0.0.3.
Downloads · 30 days
44
8% of all-time downloads
All-time downloads
572
Public
Parameters
188M
106 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors106 MB · 97%
How the weights are stored.
U32188M · 100%
From the Hugging Face model README
The Model mlx-community/answerdotai-ModernBERT-base-4bit was converted to MLX format from answerdotai/ModernBERT-base 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/answerdotai-ModernBERT-base-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)