ModernBERT Embed Large Distilled

This is a sentence-transformers model distilled from lightonai/modernbert-embed-large. It maps sentences & paragraphs to a 512-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.

Model Details

Model Description

  • Model Type: Sentence Transformer
  • Base model: lightonai/modernbert-embed-large
  • Maximum Sequence Length: 8 192 tokens
  • Output Dimensionality: 512 dimensions
  • Similarity Function: Cosine Similarity

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): StaticEmbedding(
    (embedding): EmbeddingBag(50368, 512, mode='mean')
  )
)

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

pip install -U sentence-transformers

Then you can load this model and run inference.

from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("adrien-riaux/distill-modernbert-embed-large")
# Run inference
sentences = [
    'The weather is lovely today.',
    "It's so sunny outside!",
    'He drove to the stadium.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 512]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

Training Details

Distillation Process

The model is distilled using Model2Vec framework. It is a new technique for creating extremely fast and small static embedding models from any Sentence Transformer.

Framework Versions

  • Python: 3.11.9
  • Sentence Transformers: 3.4.1
  • Transformers: 4.48.3
  • PyTorch: 2.2.2
  • Tokenizers: 0.21.0
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.

Model tree for adrien-riaux/distill-modernbert-embed-large

Finetuned
(1)
this model

Collection including adrien-riaux/distill-modernbert-embed-large