Sentence Similarity
sentence-transformers
Safetensors
Turkish
modernbert
feature-extraction
turkish
mteb
text-embeddings-inference
Instructions to use moganai/MoganBERT-Embed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use moganai/MoganBERT-Embed with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("moganai/MoganBERT-Embed") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
File size: 5,812 Bytes
24b8beb c1e49a8 24b8beb c1e49a8 24b8beb c1e49a8 24b8beb c1e49a8 24b8beb b52f322 24b8beb c1e49a8 24b8beb c1e49a8 24b8beb c1e49a8 24b8beb c1e49a8 24b8beb c1e49a8 24b8beb b52f322 24b8beb c1e49a8 24b8beb c1e49a8 24b8beb | 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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | ---
license: apache-2.0
language:
- tr
library_name: sentence-transformers
pipeline_tag: sentence-similarity
base_model: moganai/MoganBERT-TR
tags:
- arxiv:2608.25768
- sentence-transformers
- feature-extraction
- sentence-similarity
- turkish
- mteb
---
<p align="center">
<img src="banner.png" alt="MoganBERT-Embed" width="600"/>
</p>
<p align="center">
<a href="https://huggingface.co/papers/2608.25768"><img src="https://img.shields.io/badge/📄_Paper-arXiv-B31B1B?style=flat-square" alt="Paper"/></a>
<a href="https://moganai.github.io/"><img src="https://img.shields.io/badge/🌐_Blog-MoganAI-2E7D5B?style=flat-square" alt="Blog"/></a>
<a href="https://huggingface.co/collections/moganai/moganbert"><img src="https://img.shields.io/badge/🤗_Model_Collection-2C3E50?style=flat-square" alt="Model Collection"/></a>
</p>
# MoganBERT-Embed
MoganBERT-Embed is a 149M-parameter Turkish embedding model built on [MoganBERT-TR](https://huggingface.co/moganai/MoganBERT-TR). It maps text to 768-dimensional vectors with mean pooling and L2 normalization, for semantic search, clustering, classification and STS. No prompt or task instruction is needed.
## Usage
```python
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("moganai/MoganBERT-Embed")
sentences = [
"Türkiye'nin başkenti Ankara'dır.",
"Ankara, Türkiye'nin idari merkezidir.",
"Bugün hava çok güzel.",
]
embeddings = model.encode(sentences)
print(model.similarity(embeddings, embeddings))
```
## Training
Two phases on top of the base encoder, whose raw representations are anisotropic (`cos_raw` = 0.9841) and unusable for cosine similarity.
**Phase 1 — teacher distillation** from Qwen3-Embedding-8B, with the student projected up into the teacher's 3072-dimensional space and a GOR anisotropy-regularization term in the loss. This alone takes `cos_raw` to 0.0851 and zero-shot IR from 0.2361 to 0.5927.
**Phase 2 — contrastive fine-tuning** with hard-negative InfoNCE, adding NLI, graded STS (CoSENT), classification labels, QA and parallel-text signals to the retrieval pairs.
The released checkpoint is a weighted average of Phase 1 and two Phase 2 runs.
## Results
Evaluated on MTEB(Turkish) — 26 tasks, fp16, cosine similarity, max 2,048 tokens.
<img src="assets/mteb_en.jpg" alt="MTEB(Turkish)" width="850"/>
Retrieval is the relative weak spot — for retrieval-first workloads see [Mogan-ColBERT-TR](https://huggingface.co/moganai/Mogan-ColBERT-TR). Full per-task numbers are in the [paper](https://huggingface.co/papers/2608.25768).
## Model Family
| Model | Params | Purpose |
|---|---:|---|
| [MoganBERT-TR](https://huggingface.co/moganai/MoganBERT-TR) | 149.4M | Base encoder |
| [**MoganBERT-Embed**](https://huggingface.co/moganai/MoganBERT-Embed) | 149M | Single-vector embeddings (this model) |
| [Mogan-ColBERT-TR](https://huggingface.co/moganai/Mogan-ColBERT-TR) | 148.9M | Multi-vector retrieval |
## Citation
```bibtex
@article{yilmaz2026moganbert,
title = {MoganBert-TR: A Turkish Encoder Foundation Model Trained from Scratch with a CLM-MLM Curriculum},
author = {Furkan Yilmaz and Habibe Aleyna Tasdemir and Muhammed Faruk Gozay},
journal = {arXiv preprint arXiv:2608.25768},
year = {2026}
}
```
---
---
# MoganBERT-Embed (Türkçe)
MoganBERT-Embed, [MoganBERT-TR](https://huggingface.co/moganai/MoganBERT-TR) üzerine kurulmuş 149M parametreli bir Türkçe gömme modelidir. Metni ortalama havuzlama ve L2 normalizasyon ile 768 boyutlu vektörlere eşler; anlamsal arama, kümeleme, sınıflandırma ve STS için kullanılır. Önek veya görev talimatı gerekmez.
## Kullanım
```python
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("moganai/MoganBERT-Embed")
cumleler = [
"Türkiye'nin başkenti Ankara'dır.",
"Ankara, Türkiye'nin idari merkezidir.",
"Bugün hava çok güzel.",
]
gomme = model.encode(cumleler)
print(model.similarity(gomme, gomme))
```
## Eğitim
Temel encoder üzerine iki faz; ham temsiller anizotropiktir (`cos_raw` = 0.9841) ve kosinüs benzerliğinde kullanılamaz.
**Faz 1 — öğretmen damıtma**, Qwen3-Embedding-8B'den; öğrenci öğretmenin 3072 boyutlu uzayına yukarı izdüşürülür ve kayba bir GOR anizotropi düzenlileştirme terimi eklenir. Tek başına bu faz `cos_raw`'ı 0.0851'e, sıfır-atış IR'yi 0.2361'den 0.5927'ye taşır.
**Faz 2 — kontrastif ince ayar**, zor negatifli InfoNCE ile; retrieval çiftlerine NLI, dereceli STS (CoSENT), sınıflandırma etiketleri, soru-cevap ve paralel metin sinyalleri eklenir.
Yayınlanan checkpoint, Faz 1 ve iki Faz 2 koşusunun ağırlıklı ortalamasıdır.
## Sonuçlar
MTEB(Turkish) üzerinde ölçüldü — 26 görev, fp16, kosinüs benzerliği, azami 2.048 token.
<img src="assets/mteb.jpg" alt="MTEB(Turkish)" width="850"/>
Retrieval göreli zayıf noktadır — retrieval öncelikli işler için [Mogan-ColBERT-TR](https://huggingface.co/moganai/Mogan-ColBERT-TR) modeline bakın. Görev bazlı tüm sayılar [makalede](https://huggingface.co/papers/2608.25768).
## Model Ailesi
| Model | Parametre | Amaç |
|---|---:|---|
| [MoganBERT-TR](https://huggingface.co/moganai/MoganBERT-TR) | 149.4M | Temel encoder |
| [**MoganBERT-Embed**](https://huggingface.co/moganai/MoganBERT-Embed) | 149M | Tek vektörlü gömme (bu model) |
| [Mogan-ColBERT-TR](https://huggingface.co/moganai/Mogan-ColBERT-TR) | 148.9M | Çok vektörlü retrieval |
## Atıf
```bibtex
@article{yilmaz2026moganbert,
title = {MoganBert-TR: A Turkish Encoder Foundation Model Trained from Scratch with a CLM-MLM Curriculum},
author = {Furkan Yilmaz and Habibe Aleyna Tasdemir and Muhammed Faruk Gozay},
journal = {arXiv preprint arXiv:2608.25768},
year = {2026}
}
```
|