---
title: answerdotai-ModernBERT-Large-Instruct-4bit
canonical_url: "https://www.modelscope.cn/models/mlx-community/answerdotai-ModernBERT-Large-Instruct-4bit"
md_url: "https://www.modelscope.cn/models/mlx-community/answerdotai-ModernBERT-Large-Instruct-4bit.md"
repository: mlx-community/answerdotai-ModernBERT-Large-Instruct-4bit
last_updated: 2025-04-02
license: apache-2.0
pipeline_tag: fill-mask
tasks:
  - fill-mask
model_type:
  - modernbert
architectures:
  - ModernBertForMaskedLM
parameters: 70.0M
tensor_type:
  - U32
  - F16
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
language:
  - en
downloads: 445
stars: 0
tags:
  - fill-mask
  - masked-lm
  - long-context
  - classification
  - modernbert
  - mlx
---

# answerdotai-ModernBERT-Large-Instruct-4bit

> answerdotai-ModernBERT-Large-Instruct-4bit - mlx-community 在 ModelScope 开源的模型。mlx-community/answerdotai-ModernBERT-Large-Instruct-4bit

mlx-community/answerdotai-ModernBERT-Large-Instruct-4bit 是 ModelScope 魔搭社区上的 70.0M 参数fill-mask模型，采用 apache-2.0 许可。

- **Repository**: mlx-community/answerdotai-ModernBERT-Large-Instruct-4bit
- **License**: apache-2.0
- **Tasks**: fill-mask
- **Parameters**: 70.0M
- **Tags**: fill-mask, masked-lm, long-context, classification, modernbert, mlx
- **Downloads**: 445
- **Stars**: 0
- **Last updated**: 2025-04-02

Source: https://www.modelscope.cn/models/mlx-community/answerdotai-ModernBERT-Large-Instruct-4bit

---

# mlx-community/answerdotai-ModernBERT-Large-Instruct-4bit

The Model [mlx-community/answerdotai-ModernBERT-Large-Instruct-4bit](https://huggingface.co/mlx-community/answerdotai-ModernBERT-Large-Instruct-4bit) was converted to MLX format from [answerdotai/ModernBERT-Large-Instruct](https://huggingface.co/answerdotai/ModernBERT-Large-Instruct) using mlx-lm version **0.0.3**.

## Use with mlx

```bash
pip install mlx-embeddings
```

```python
from mlx_embeddings import load, generate
import mlx.core as mx

model, tokenizer = load("mlx-community/answerdotai-ModernBERT-Large-Instruct-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)


```
