Sentence Similarity
sentence-transformers
Safetensors
Transformers.js
MLX
English
modernbert
feature-extraction
mteb
Eval Results (legacy)
text-embeddings-inference
Instructions to use mlx-community/nomicai-modernbert-embed-base-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use mlx-community/nomicai-modernbert-embed-base-4bit with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mlx-community/nomicai-modernbert-embed-base-4bit") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers.js
How to use mlx-community/nomicai-modernbert-embed-base-4bit with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('sentence-similarity', 'mlx-community/nomicai-modernbert-embed-base-4bit'); - MLX
How to use mlx-community/nomicai-modernbert-embed-base-4bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir nomicai-modernbert-embed-base-4bit mlx-community/nomicai-modernbert-embed-base-4bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
File size: 210 Bytes
c908a8e | 1 2 3 4 5 6 7 8 9 10 | {
"__version__": {
"sentence_transformers": "3.3.1",
"transformers": "4.48.0.dev0",
"pytorch": "2.4.1+cu121"
},
"prompts": {},
"default_prompt_name": null,
"similarity_fn_name": "cosine"
} |