Downloads · 30 days
45
100% of all-time downloads
kiel2/Kiel-2-Poly
Kiel-2-Poly is a sentence similarity model from kiel2. Use it when you need a score for how close two texts are. It is set up for sentence-transformers.
Kiel-2-Poly is a specialized multilingual text embedding model based on sentence-transformers/paraphrase-multilingual-mpnet-base-v2.
Downloads · 30 days
45
100% of all-time downloads
All-time downloads
45
Public
Parameters
278M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
Kiel-2-Poly is a specialized multilingual text embedding model based on sentence-transformers/paraphrase-multilingual-mpnet-base-v2.
This is a sentence-transformers model that maps sentences and paragraphs across multiple languages into a 768-dimensional dense vector space optimized for cross-lingual semantic similarity, retrieval, and clustering tasks.
SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'XLMRobertaModel'})
(1): Pooling({'embedding_dimension': 768, 'pooling_mode': 'mean', 'include_prompt': True})
)
Direct Usage (Sentence Transformers)
First, install the Sentence Transformers library:
Bash
pip install -U sentence-transformers
Then load your model and run inference:
Python
from sentence_transformers import SentenceTransformer
# Load your model from the Hugging Face Hub
model = SentenceTransformer("kiel2/Kiel-2-Poly")
# Run inference
sentences = [
'" Any decision on Charleroi will have huge implications for regional airports in France , " he said .',
'" A bad decision on Charleroi would have huge implications for state-owned regional airports in France .',
"He said the ferry 's crew will be interviewed and tested for drugs and alcohol .",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
Citation
Code snippet
@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](https://arxiv.org/abs/1908.10084)",
}