File size: 5,021 Bytes
e071e0a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d7ba154
e071e0a
d7ba154
e071e0a
 
 
 
 
 
 
 
 
 
 
d7ba154
e071e0a
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
language:
- en
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:6661966
- loss:MultipleNegativesRankingLoss
- loss:CachedMultipleNegativesRankingLoss
- loss:SoftmaxLoss
- loss:AnglELoss
- loss:CoSENTLoss
- loss:CosineSimilarityLoss
- mlx
base_model: answerdotai/ModernBERT-base
widget:
- source_sentence: Daniel went to the kitchen. Sandra went back to the kitchen. Daniel
    moved to the garden. Sandra grabbed the apple. Sandra went back to the office.
    Sandra dropped the apple. Sandra went to the garden. Sandra went back to the bedroom.
    Sandra went back to the office. Mary went back to the office. Daniel moved to
    the bathroom. Sandra grabbed the apple. Sandra travelled to the garden. Sandra
    put down the apple there. Mary went back to the bathroom. Daniel travelled to
    the garden. Mary took the milk. Sandra grabbed the apple. Mary left the milk there.
    Sandra journeyed to the bedroom. John travelled to the office. John went back
    to the garden. Sandra journeyed to the garden. Mary grabbed the milk. Mary left
    the milk. Mary grabbed the milk. Mary went to the hallway. John moved to the hallway.
    Mary picked up the football. Sandra journeyed to the kitchen. Sandra left the
    apple. Mary discarded the milk. John journeyed to the garden. Mary dropped the
    football. Daniel moved to the bathroom. Daniel journeyed to the kitchen. Mary
    travelled to the bathroom. Daniel went to the bedroom. Mary went to the hallway.
    Sandra got the apple. Sandra went back to the hallway. Mary moved to the kitchen.
    Sandra dropped the apple there. Sandra grabbed the milk. Sandra journeyed to the
    bathroom. John went back to the kitchen. Sandra went to the kitchen. Sandra travelled
    to the bathroom. Daniel went to the garden. Daniel moved to the kitchen. Sandra
    dropped the milk. Sandra got the milk. Sandra put down the milk. John journeyed
    to the garden. Sandra went back to the hallway. Sandra picked up the apple. Sandra
    got the football. Sandra moved to the garden. Daniel moved to the bathroom. Daniel
    travelled to the garden. Sandra went back to the bathroom. Sandra discarded the
    football.
  sentences:
  - In the adulthood stage, it can jump, walk, run
  - The chocolate is bigger than the container.
  - The football before the bathroom was in the garden.
- source_sentence: Almost everywhere the series converges then .
  sentences:
  - The series then converges almost everywhere .
  - Scrivener dated the manuscript to the 12th century , C. R. Gregory to the 13th
    century . Currently the manuscript is dated by the INTF to the 12th century .
  - Both daughters died before he did , Tosca in 1976 and Janear in 1981 .
- source_sentence: how are you  i'm doing good thank you you  im not good having cough
    and colg
  sentences:
  - 'This example tweet expresses the emotion: happiness'
  - This example utterance is about cooking recipies.
  - This example text from a US presidential speech is about macroeconomics
- source_sentence: A man is doing pull-ups
  sentences:
  - The man is doing exercises in a gym
  - A black and white dog with a large branch is running in the field
  - There is no man drawing
- source_sentence: A chef is preparing some food
  sentences:
  - The man is lifting weights
  - A chef is preparing a meal
  - A dog is in a sandy area with the sand that is being stirred up into the air and
    several plants are in the background
datasets:
- tomaarsen/natural-questions-hard-negatives
- tomaarsen/gooaq-hard-negatives
- bclavie/msmarco-500k-triplets
- sentence-transformers/all-nli
- sentence-transformers/msmarco-co-condenser-margin-mse-sym-mnrl-mean-v1
- sentence-transformers/gooaq
- sentence-transformers/natural-questions
- tasksource/merged-2l-nli
- tasksource/merged-3l-nli
- tasksource/zero-shot-label-nli
- MoritzLaurer/dataset_train_nli
- google-research-datasets/paws
- nyu-mll/glue
- mwong/fever-evidence-related
- tasksource/sts-companion
pipeline_tag: sentence-similarity
library_name: sentence-transformers
---

# mlx-community/tasksource-ModernBERT-base-embed-8bit

The Model [mlx-community/tasksource-ModernBERT-base-embed-8bit](https://huggingface.co/mlx-community/tasksource-ModernBERT-base-embed-8bit) was converted to MLX format from [tasksource/ModernBERT-base-embed](https://huggingface.co/tasksource/ModernBERT-base-embed) 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/tasksource-ModernBERT-base-embed-8bit")

# 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)


```