Paralel TR-EN Embedder

A bilingual Turkish-English sentence embedding model fine-tuned on 882K parallel translation pairs. Built on BAAI/bge-small-en-v1.5.

Model Overview

Property Value
Base Model BAAI/bge-small-en-v1.5
Embedding Dimension 384
Max Sequence Length 64 tokens
Parameters 33M
Training Data 882,555 parallel TR-EN pairs
Loss Function MultipleNegativesRankingLoss
GGUF Size 64 MB (F16)

Quick Start

Install and load the model:

pip install sentence-transformers

Then in Python:

from sentence_transformers import SentenceTransformer
model = SentenceTransformer("Legenddefsx/paralel-tr-en-embedder")
tr_emb = model.encode("Merhaba, nasilsin?")
en_emb = model.encode("Hello, how are you?")
similarity = model.similarity(tr_emb, en_emb)

GGUF Format

Download and use with llama.cpp:

wget https://huggingface.co/Legenddefsx/paralel-tr-en-embedder/resolve/main/model.gguf
from llama_cpp import Llama
import numpy as np
model = Llama(model_path="./model.gguf", embedding=True)
emb = model.create_embedding("Hello world")["data"][0]["embedding"]

Performance

Evaluated on a held-out set (not seen during training), including correct translations, hard negatives (structurally similar but semantically wrong translations - e.g. wrong tense, wrong pronoun, negation flipped), and unrelated sentence pairs as a control group.

Category Avg. Cosine Similarity
Correct translations (held-out) ~0.82
Hard negatives (similar structure, wrong meaning) ~0.68
Unrelated sentence pairs ~0.12

Known limitation: the model separates unrelated content well, but fine-grained distinctions (pronoun swaps, tense flips, negation) are not yet fully reliable - some hard-negative pairs score close to or above correct-translation pairs. Treat similarity scores as a relevance signal for coarse retrieval/clustering rather than a precise correctness check. Further hard-negative training is in progress.

Use Cases

  • Cross-lingual semantic search (coarse retrieval)
  • Parallel corpus alignment
  • Bilingual document clustering
  • Multilingual RAG (as a first-pass retriever, ideally paired with a reranker)

Not recommended as-is for tasks requiring fine-grained correctness judgments (e.g. automatic translation quality scoring).

License

MIT License


Model fine-tuned: 2026-07-29

Downloads last month
-
Safetensors
Model size
33.4M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support