Model reference · open weights

modernbert-tr-embed

Embeddings ytu-ce-cosmos Embeddings 1 build Open weights 1k dl/mo

modernbert-tr-embed is an open-weight embedding model from ytu-ce-cosmos. modernbert-tr-embed (FP32) weighs 297 MB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • modernbert-tr-embed is a 149M-parameter text-embedding model developed by ytu-ce-cosmos for the sentence-similarity task.
  • It supports Turkish and has a context length of 8192 tokens.
  • The model is released under the apache-2.0 license.

Summary of the ytu-ce-cosmos/modernbert-tr-embed model card, 2026-10-01

What it is

Released byytu-ce-cosmos
Released2026-06-28
Parameters149M
VRAM297 MB for the weights

What it runs on

Memory and cards for modernbert-tr-embed (FP32)

297 MBweights, file size
1.1 GBruntime overhead
CardRunsMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What ytu-ce-cosmos says about modernbert-tr-embed

Read the model card

A 150M-parameter Turkish text-embedding model.

Results

ModelParamsRetrClassifPairClsClusterSTSBitextMean
ModernBERT-TR-Embed (ours)150M59.476.569.263.377.694.168.14
ytu-ce-cosmos/turkish-e5-large560M61.572.662.860.980.099.367.17
microsoft/harrier-oss-v1-0.6b600M60.171.158.663.374.598.665.57
intfloat/multilingual-e5-large560M61.769.265.660.881.099.066.56
Qwen/Qwen3-Embedding-4B4B63.170.260.161.377.097.866.69

How was this model trained?

  1. We embedded ~7.9M Turkish passages with the teacher, then trained our model to reproduce those embeddings. A projector maps the teacher's 4096-d vectors down to our model's 768 dimensions. Following Jasper/Stella distillation recipe, a three-term loss aligns the embeddings from both: a per-passage cosine loss, a similarity-matrix loss matching the student's and teacher's Gram matrices within batch, and a CoSENT-style hinge that reproduces the teacher's pairwise-similarity ordering.

  2. From the distilled model we ran three fine-tunings, all supervised by teacher embeddings:

    • Retrieval: the student ranks the correct passage above hard negatives for a given query. Trained with an InfoNCE contrastive loss over in-batch and hard negatives, plus a KL term matching the teacher's softmax ranking over each query's candidates.
    • Multi-task: the retrieval objective plus Turkish language-understanding tasks: NLI, STS as in CoSENT on teacher cosine, supervised contrastive classification as in SupCon, and a replay of the cosine distillation on classification text.
    • Cross-lingual: the multi-task recipe with rebalanced task weights and added English retrieval passages, to improve English-Turkish alignment.
  3. We weight-average the checkpoints described above into a single model.

Usage

sentence-transformers

from sentence_transformers import SentenceTransformer
model = SentenceTransformer("mrbesher/modernbert-tr-embed")

emb = model.encode(["bir cümle", "başka bir cümle"], normalize_embeddings=True)

q = model.encode(["soru"], prompt_name="query", normalize_embeddings=True)
d = model.encode(["döküman"], normalize_embeddings=True)

The retrieval (see config_sentence_transformers.json): Instruct: Given a web search query, retrieve relevant passages that answer the query\nQuery:{text}.

ONNX Runtime

The onnx/ folder has the grapgh for the token embeddings, it includes 3 graphs: token embeddings, mean-pool and L2-norm.

from sentence_transformers import SentenceTransformer
model = SentenceTransformer("mrbesher/modernbert-tr-embed", backend="onnx",
                            model_kwargs={"file_name": "onnx/model_fp16.onnx"})

Text Embeddings Inference (TEI)

TEI is L2-normalizes by default. Pass per-request prompts for retrieval queries.

text-embeddings-router --model-id mrbesher/modernbert-tr-embed --dtype float16

Encoderfile

See the companion encoderfile repo.

Training data

Turkish retrieval (msmarco-tr, Squad-TR train/dev), Turkish NLI (boun-tabi/nli_tr train), Turkish STS-B (train), and Turkish classification-domain text (product reviews, news, social), all teacher-supervised. We check for leaks with text-hash against every MTEB(Turkish) test split.

License & attribution

  • License: apache-2.0.

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

Benchmarks

Reported results

As published on the model card: the maker's own numbers, not measured by AxForge.

TaskDatasetMetricScore
ArguAnaTRMTEB ArguAnaTRndcg_at_1050.010
CQADupstackGamingRetrievalTRMTEB CQADupstackGamingRetrievalTRndcg_at_1056.370
FiQA2018TRMTEB FiQA2018TRndcg_at_1046.200
MSMarcoTRRetrievalMTEB MSMarcoTRRetrievalndcg_at_1057.870
MnliTrMTEB MnliTrmax_ap65.920
NFCorpusTRMTEB NFCorpusTRndcg_at_109.470
QuoraRetrievalTRMTEB QuoraRetrievalTRndcg_at_1095.180
SCIDOCSTRMTEB SCIDOCSTRndcg_at_103.370
STSbTRMTEB STSbTRcosine_spearman77.620
SciFactTRMTEB SciFactTRndcg_at_1077.060
SnliTrMTEB SnliTrmax_ap67.290
SquadTRRetrievalMTEB SquadTRRetrievalndcg_at_1075.930
THYSentimentClassificationMTEB THYSentimentClassificationaccuracy68.140
TQuadRetrievalMTEB TQuadRetrievalndcg_at_1087.140
TSTimelineNewsCategoryClassificationMTEB TSTimelineNewsCategoryClassificationaccuracy67.910
Turkish75NewsClassificationMTEB Turkish75NewsClassificationaccuracy93.330
TurkishAbstractCorpusClusteringMTEB TurkishAbstractCorpusClusteringv_measure62.220
TurkishColumnWritingClusteringMTEB TurkishColumnWritingClusteringv_measure64.420
TurkishIronyClassificationMTEB TurkishIronyClassificationaccuracy57.670
TurkishMovieSentimentClassificationMTEB TurkishMovieSentimentClassificationaccuracy89.340
TurkishNewsCategoryClassificationMTEB TurkishNewsCategoryClassificationaccuracy93.640
TurkishOffensiveLanguageClassificationMTEB TurkishOffensiveLanguageClassificationaccuracy71.510
TurkishProductSentimentClassificationMTEB TurkishProductSentimentClassificationaccuracy70.510
WMT16BitextMiningMTEB WMT16BitextMiningf194.090
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms