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
MoganBERT-Embed
MoganBERT-Embed is a 149M-parameter Turkish embedding model built on 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
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.
Retrieval is the relative weak spot — for retrieval-first workloads see Mogan-ColBERT-TR. Full per-task numbers are in the paper.
Model Family
| Model | Params | Purpose |
|---|---|---|
| MoganBERT-TR | 149.4M | Base encoder |
| MoganBERT-Embed | 149M | Single-vector embeddings (this model) |
| Mogan-ColBERT-TR | 148.9M | Multi-vector retrieval |
Citation
@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 ü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
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.
Retrieval göreli zayıf noktadır — retrieval öncelikli işler için Mogan-ColBERT-TR modeline bakın. Görev bazlı tüm sayılar makalede.
Model Ailesi
| Model | Parametre | Amaç |
|---|---|---|
| MoganBERT-TR | 149.4M | Temel encoder |
| MoganBERT-Embed | 149M | Tek vektörlü gömme (bu model) |
| Mogan-ColBERT-TR | 148.9M | Çok vektörlü retrieval |
Atıf
@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}
}
- Downloads last month
- -