emrecan_bert-base-turkish-cased-mean-nli-stsb-tr
emrecan · View on Hugging Face ↗
Model card
The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.
language:
- tr pipeline_tag: sentence-similarity license: apache-2.0 tags:
- sentence-transformers
- feature-extraction
- sentence-similarity
- transformers datasets:
- nli_tr
- emrecan/stsb-mt-turkish
widget:
source_sentence: "Bu çok mutlu bir kişi"
sentences:
- "Bu mutlu bir köpek"
- "Bu sevincinden havalara uçan bir insan"
- "Çok kar yağıyor"
emrecan/bert-base-turkish-cased-mean-nli-stsb-tr
This is a sentence-transformers model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. The model was trained on Turkish machine translated versions of NLI and STS-b datasets, using example training scripts from sentence-transformers GitHub repository.
Usage (Sentence-Transformers)
Using this model becomes easy when you have sentence-transformers installed:
pip install -U sentence-transformers
Then you can use the model like this:
from sentence_transformers import SentenceTransformer
sentences = ["Bu örnek bir cümle", "Her cümle vektöre çevriliyor"]
model = SentenceTransformer('emrecan/bert-base-turkish-cased-mean-nli-stsb-tr')
embeddings = model.encode(sentences)
print(embeddings)
Usage (HuggingFace Transformers)
Without sentence-transformers, you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
from transformers import AutoTokenizer, AutoModel
import torch
#Mean Pooling - Take attention mask into account for correct averaging
def mean_pooling(model_output, attention_mask):
token_embeddings = model_output[0] #First element of model_output contains all token embeddings
input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
# Sentences we want sentence embeddings for
sentences = ["Bu örnek bir cümle", "Her cümle vektöre çevriliyor"]
# Load model from HuggingFace Hub
tokenizer = AutoTokenizer.from_pretrained('emrecan/bert-base-turkish-cased-mean-nli-stsb-tr')
model = AutoModel.from_pretrained('emrecan/bert-base-turkish-cased-mean-nli-stsb-tr')
# Tokenize sentences
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
# Compute token embeddings
with torch.no_grad():
model_output = model(**encoded_input)
# Perform pooling. In this case, mean pooling.
sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])
print("Sentence embeddings:")
print(sentence_embeddings)
Evaluation Results
Evaluation results on test and development sets are given below:
| Split | Epoch | cosine_pearson | cosine_spearman | euclidean_pearson | euclidean_spearman | manhattan_pearson | manhattan_spearman | dot_pearson | dot_spearman |
|---|---|---|---|---|---|---|---|---|---|
| test | - | 0.834 | 0.830 | 0.820 | 0.819 | 0.819 | 0.818 | 0.799 | 0.789 |
| validation | 1 | 0.850 | 0.848 | 0.831 | 0.835 | 0.83 | 0.83 | 0.80 | 0.806 |
| validation | 2 | 0.857 | 0.857 | 0.844 | 0.848 | 0.844 | 0.848 | 0.813 | 0.810 |
| validation | 3 | 0.860 | 0.859 | 0.846 | 0.851 | 0.846 | 0.850 | 0.825 | 0.822 |
| validation | 4 | 0.859 | 0.860 | 0.846 | 0.851 | 0.846 | 0.851 | 0.825 | 0.823 |
Training
Training scripts training_nli_v2.py and training_stsbenchmark_continue_training.py were used to train the model.
The model was trained with the parameters:
DataLoader:
torch.utils.data.dataloader.DataLoader of length 360 with parameters:
{'batch_size': 16, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
Loss:
sentence_transformers.losses.CosineSimilarityLoss.CosineSimilarityLoss
Parameters of the fit()-Method:
{
"epochs": 4,
"evaluation_steps": 200,
"evaluator": "sentence_transformers.evaluation.EmbeddingSimilarityEvaluator.EmbeddingSimilarityEvaluator",
"max_grad_norm": 1,
"optimizer_class": "<class 'transformers.optimization.AdamW'>",
"optimizer_params": {
"lr": 2e-05
},
"scheduler": "WarmupLinear",
"steps_per_epoch": null,
"warmup_steps": 144,
"weight_decay": 0.01
}
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 75, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
)
Citing & Authors
Magnet link
Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:
magnet:?xt=urn:btih:ad59bdbec6299852cb8610b127a1931e07036744&dn=emrecan_bert-base-turkish-cased-mean-nli-stsb-trOpen magnet in torrent client · infohash ad59bdbec6299852cb8610b127a1931e07036744
Files & hashes
| Path | Size | sha1 | sha256 |
|---|---|---|---|
| 1_Pooling/config.json | 190 B (190 B) | 4e09f293dfe90bba49f87cfe7996271f07be2666 | a37f83ada23e7887be6b88f4998927dbeac0038af301553c7cd5461413bf1a56 |
| README.md | 5.8 KB (5,889 B) | 7b7f8b27d8987f31f0fc6621fffa6504543a5bd5 | 51302a4c0f03d4032f24517d9ec3747a03021cdebebc58a84462e008df190479 |
| config.json | 693 B (693 B) | 3780a6d2bac98bd5706621944f2efbfa49af068f | b70a35e14e8e0564510367e17ed7854924e78f6eb578a8a8bc2de8e6063121ec |
| config_sentence_transformers.json | 123 B (123 B) | a227ef5e8a5ba87335df745b1cf722c9f44fb538 | faad7d2748b0e34bb7f4f3927a35a614f6295ff99dfd18717e9ba6e1a9a5a884 |
| model.safetensors | 422.0 MB (442,495,928 B) | f25d075653f072a9159f46937bedbc785d27fea7 | 39b891768ef11e811a3a11e740a2ccc0e226e5d9e5a5c842ada27dcae7585781 |
| modules.json | 229 B (229 B) | f7640f94e81bb7f4f04daf1668850b38763a13d9 | 8f4b264b80206c830bebbdcae377e137925650a433b689343a63bdc9b3145460 |
| pytorch_model.bin | 422.0 MB (442,547,953 B) | 9a0e803971280b5ef8e1dadfffcd946a7092916c | 8dd40b03f32431acaa4a5456e9ef9a25ae3c52ca6cdcb18b33d815bf7d7f69fc |
| sentence_bert_config.json | 52 B (52 B) | a4b5ede0ec427c9db298fe86576b309b2c983b34 | 10565cc7e408bf2a1260d7e15d3638f7cad3522797e062bacb4607255d0fc0cb |
| special_tokens_map.json | 112 B (112 B) | e7b0375001f109a6b8873d756ad4f7bbb15fbaa5 | 303df45a03609e4ead04bc3dc1536d0ab19b5358db685b6f3da123d05ec200e3 |
| tokenizer.json | 485.9 KB (497,553 B) | cf9fac028611fa77e1f38eb3a22c055c3563d6ac | 903d98ede7f86afeeb73b74c895538b6032a885eb6f1b151dc24361fe676c65a |
| tokenizer_config.json | 431 B (431 B) | c94fba3e88da250831bda680c8a5962dab502450 | 3f188956769e8bf74fb1f4394ef4af9bcd905aa02ea0e4099f8968e4638a5275 |
| vocab.txt | 245.1 KB (251,003 B) | 6779f120fb06b92396fddda4cffc63a3d01493e8 | ca72d2012b1e46ed42f5df2dc9675f9da0b37a481601785cb4dff91f67fcca65 |
Cite this release
- Canonical URL
- https://aiseedbank.org/models/emrecan_bert-base-turkish-cased-mean-nli-stsb-tr/
- Slug
- emrecan_bert-base-turkish-cased-mean-nli-stsb-tr
- Infohash
- ad59bdbec6299852cb8610b127a1931e07036744
- License
- apache-2.0
- Signing key fingerprint
- 85a3b32c3712427b
Every file carries a locally computed sha256 — verify a download against the signed sums: emrecan_bert-base-turkish-cased-mean-nli-stsb-tr.SHA256SUMS (+ minisign signature).
Provenance
| Upstream repository | emrecan/bert-base-turkish-cased-mean-nli-stsb-tr |
|---|---|
| Revision (pinned) | 6392c1ca4fee8f17a2376c235cb62a06e3e8b1ff |
| Fetched at | 2026-09-03T22:24:34Z |
| License at fetch | apache-2.0 |
| Snapshot tool | huggingface · seedbank 0.1.0 |
Trackers
- udp://announce.aitorrent.org:6969/announce
- http://announce.aitorrent.org:7070/announce
- udp://announce2.aitorrent.org:6970/announce
- http://announce2.aitorrent.org:7071/announce
- udp://tracker.opentrackr.org:1337/announce
- udp://open.demonii.com:1337/announce
- udp://open.stealth.si:80/announce
- udp://exodus.desync.com:6969/announce
- udp://tracker.torrent.eu.org:451/announce
✓ verified · rehash-vs-hf-metadata at 2026-09-03T22:24:44Z
apache-2.0844.8 MB (885,800,156 bytes)sentence-transformerspytorchsafetensorsbertfeature-extractionsentence-similaritytransformerstext-embeddings-inferenceendpoints_compatible1 language (tr)