CoolFace
Modelpublic

dogukanvzr/bge-m3-ml-tr-specialized

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes58downloads
Model Card

bge-m3-ml-tr-specialized

bge-m3-ml-tr-specialized is a Sentence Transformer model optimized for scientific and technical machine learning texts in Turkish. Based on BAAI/bge-m3, the model has been fine-tuned for tasks such as sentence similarity, semantic search, conceptual matching, and meaning-based classification.

๐Ÿง  Model Specifications

  • โ€”Model Type: Sentence Transformer
  • โ€”Base Model: BAAI/bge-m3
  • โ€”Use Cases:
  • โ€”Sentence-level semantic similarity
  • โ€”Conceptual and contextual sentence alignment
  • โ€”Information retrieval and semantic search systems
  • โ€”Clustering and ranking of scientific documents
  • โ€”Language: Turkish (especially technical and scientific domain)
  • โ€”Maximum Sequence Length: 8192 tokens
  • โ€”Output Vector Dimension: 1024
  • โ€”Pooling Strategy: CLS token
  • โ€”Similarity Metric: Cosine Similarity

๐Ÿ” Model Architecture

python
SentenceTransformer(
  (0): Transformer({'max_seq_length': 8192, 'architecture': 'XLMRobertaModel'})
  (1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True})
  (2): Normalize()
)

๐Ÿš€ Quick Start

bash
pip install -U sentence-transformers
python
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("dogukanvzr/bge-m3-ml-tr-specialized")

sentences = [
    "Accuracy refers to how close a model's predictions are to the actual values.",
    "Model accuracy indicates how well the predictions align with true labels.",
    "Feature engineering plays a critical role in machine learning pipelines."
]

embeddings = model.encode(sentences)

from sklearn.metrics.pairwise import cosine_similarity
scores = cosine_similarity([embeddings[0]], embeddings[1:])
print(scores)

๐Ÿงช Training Details

  • โ€”Dataset: `ml-paraphrase-tr`
  • โ€”Size: 60,000 sentence pairs
  • โ€”Structure: sentence_0, sentence_1, label (float between 0.0โ€“1.0 indicating similarity)
  • โ€”Loss Function: CosineSimilarityLoss (internally uses MSELoss)
  • โ€”Training Epochs: 3
  • โ€”Batch Size: 64

๐Ÿ“ˆ Training Log

EpochStepAverage Loss
0.55000.0338
1.010000.0188
1.515000.0147
2.020000.0127
2.525000.0105

๐Ÿ“Š Application Areas

This model is particularly well-suited for the following NLP and ML tasks in Turkish:

  • โ€”Semantic alignment in technical documents
  • โ€”Similarity detection in scientific and academic texts
  • โ€”Embedding-based information retrieval
  • โ€”Paraphrase identification (detecting meaning-equivalent sentence pairs)
  • โ€”Semantic clustering for topic grouping
  • โ€”Intent matching in QA and chatbot systems

๐Ÿ’ก Evaluation Example

python
s1 = "Machine learning algorithms learn from past data to make future predictions."
s2 = "The model performs inference based on learned patterns."
s3 = "The size of the dataset can affect the generalization capacity of the model."

embs = model.encode([s1, s2, s3])
from sklearn.metrics.pairwise import cosine_similarity
sim = cosine_similarity([embs[0]], embs[1:])
print(sim)

โš™๏ธ Development Environment

  • โ€”Python: 3.12.7
  • โ€”Sentence Transformers: 5.0.0
  • โ€”Transformers: 4.56.0.dev0
  • โ€”PyTorch: 2.7.1+cu128
  • โ€”Accelerate: 1.9.0
  • โ€”Datasets: 4.0.0
  • โ€”Tokenizers: 0.21.4

๐Ÿ“š Citation

bibtex
@inproceedings{reimers-2019-sentence-bert,
    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
    author = "Reimers, Nils and Gurevych, Iryna",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
    month = "11",
    year = "2019",
    publisher = "Association for Computational Linguistics",
    url = "https://arxiv.org/abs/1908.10084",
}

โš ๏ธ Limitations

  • โ€”The model is trained primarily on scientific/technical Turkish text and may underperform on casual, figurative, or conversational language.
  • โ€”It might struggle with cultural references, idioms, or sarcasm.
  • โ€”Although trained on high-quality paraphrased data, users should still review outputs critically.

๐Ÿ“ฌ Contact & Feedback

For bug reports, suggestions, or contributions: