Sentence Similarity
sentence-transformers
Safetensors
Latin
roberta
feature-extraction
patristics
biblical-reuse
text-embeddings-inference
Instructions to use TdelaSelle/PatriSBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use TdelaSelle/PatriSBERT with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("TdelaSelle/PatriSBERT") 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
|
Download README.md from TdelaSelle/PatriSBERT: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/TdelaSelle/PatriSBERT/resolve/main/README.md
- Command line
-
hf download hf://TdelaSelle/PatriSBERT/README.md
-
curl -L -o README.md https://huggingface.co/TdelaSelle/PatriSBERT/resolve/main/README.md
1.42 kB
| language: | |
| - la | |
| library_name: sentence-transformers | |
| license: cc-by-4.0 | |
| model_name: PatriSBERT | |
| pipeline_tag: sentence-similarity | |
| tags: | |
| - sentence-transformers | |
| - sentence-similarity | |
| - feature-extraction | |
| - patristics | |
| - biblical-reuse | |
| # PatriSBERT | |
| A Sentence-BERT model fine-tuned for semantic textual similarity on patristic and biblical Latin texts. | |
| It is designed to detect and measure text reuse between early Christian writings and the Vulgate Bible. | |
| ## Usage | |
| ```python | |
| from sentence_transformers import SentenceTransformer, util | |
| model = SentenceTransformer("tdelaselle/PatriSBERT") | |
| sentences = [ | |
| "In principio erat Verbum", | |
| "Et Verbum caro factum est", | |
| ] | |
| embeddings = model.encode(sentences) | |
| similarity = util.cos_sim(embeddings[0], embeddings[1]) | |
| print(f"Cosine similarity: {similarity.item():.4f}") | |
| ``` | |
| ## Training | |
| - **Base model**: PatriSBERT-NLI (SBERT model trained on NLI-type latin biblical reuses dataset) from the PatriBERT model (BERT pre-trained on latin patristic texts) | |
| - **Task**: Semantic textual similarity (STS) via triplet fine-tuning | |
| - **Dataset**: Latin biblical reuse triplets | |
| ## Evaluation | |
| See the `eval/` folder for evaluation metrics on the held-out test set. | |
| ## Citation | |
| If you use this model, please cite: | |
| ``` | |
| @misc{patriSBERT2026, | |
| author = {TdelaSelle}, | |
| title = {PatriSBERT}, | |
| year = {2026}, | |
| url = {https://huggingface.co/TdelaSelle/PatriSBERT} | |
| } | |
| ``` |