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
Enrich model card
Browse files
README.md
CHANGED
|
@@ -1,442 +1,57 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
tags:
|
| 3 |
- sentence-transformers
|
| 4 |
- sentence-similarity
|
| 5 |
- feature-extraction
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
- dataset_size:92351
|
| 9 |
-
- loss:MultipleNegativesRankingLoss
|
| 10 |
-
widget:
|
| 11 |
-
- source_sentence: et ego.
|
| 12 |
-
sentences:
|
| 13 |
-
- vidensque Gedeon quod esset angelus Domini ait heu mihi Domine Deus quia vidi
|
| 14 |
-
angelum Domini facie ad faciem
|
| 15 |
-
- mihi autem adherere Deo bonum est ponere in Domino Deo spem meam ut adnuntiem
|
| 16 |
-
omnes praedicationes tuas in portis filiae Sion
|
| 17 |
-
- Hebraei sunt et ego Israhelitae sunt et ego semen Abrahae sunt et ego ministri
|
| 18 |
-
Christi sunt minus sapiens dico plus ego in laboribus plurimis in carceribus abundantius
|
| 19 |
-
in plagis supra modum in mortibus frequenter a Iudaeis quinquies quadragenas una
|
| 20 |
-
minus accepi
|
| 21 |
-
- source_sentence: 'audiuit quippe a deo patre: hic est filius meus dilectus in quo
|
| 22 |
-
mihi complacui.'
|
| 23 |
-
sentences:
|
| 24 |
-
- et ecce vox de caelis dicens hic est Filius meus dilectus in quo mihi conplacui
|
| 25 |
-
- non enim inpossibilis erat omnipotens manus tua quae creavit orbem terrarum ex
|
| 26 |
-
materia invisa inmittere illis multitudinem ursorum aut audaces leones
|
| 27 |
-
- veniat regnum tuum fiat voluntas tua sicut in caelo et in terra
|
| 28 |
-
- source_sentence: mediante namque imagine passionis tuae, christe, cogitatum a nobis
|
| 29 |
-
circa nos bonum tuum repente nos transfert in summi boni affectum cuius faciem
|
| 30 |
-
in opere salutis tuae das nobis uidere, non iam quasi humano conatu extorta intelligentia,
|
| 31 |
-
et trementibus oculis mentis et refugientibus lucem tuam, sed placido amoris sensu
|
| 32 |
-
et bono usu uidendi, et fruendi suauitate, sapientia tua quae nostra sunt disponente
|
| 33 |
-
nobis suauiter.
|
| 34 |
-
sentences:
|
| 35 |
-
- unus autem ex illis ut vidit quia mundatus est regressus est cum magna voce magnificans
|
| 36 |
-
Deum
|
| 37 |
-
- quos cum videret Iesus indigne tulit et ait illis sinite parvulos venire ad me
|
| 38 |
-
et ne prohibueritis eos talium est enim regnum Dei amen dico vobis quisque non
|
| 39 |
-
receperit regnum Dei velut parvulus non intrabit in illud et conplexans eos et
|
| 40 |
-
inponens manus super illos benedicebat eos
|
| 41 |
-
- adtingit enim a fine usque ad finem fortiter et disponit omnia suaviter
|
| 42 |
-
- source_sentence: et ipse nouit locum eius
|
| 43 |
-
sentences:
|
| 44 |
-
- Deus intellegit viam eius et ipse novit locum illius
|
| 45 |
-
- quicumque enim sine lege peccaverunt sine lege et peribunt et quicumque in lege
|
| 46 |
-
peccaverunt per legem iudicabuntur
|
| 47 |
-
- perdix fovit quae non peperit fecit divitias et non in iudicio in dimidio dierum
|
| 48 |
-
suorum derelinquet eas et in novissimo suo erit insipiens
|
| 49 |
-
- source_sentence: 'beati mites, quoniam ipsi hereditate possidebunt terram, illam
|
| 50 |
-
credo terram de qua in psalmis dicitur: spes mea es tu, portio mea in terra uiuentium.'
|
| 51 |
-
sentences:
|
| 52 |
-
- imitatores mei estote sicut et ego Christi
|
| 53 |
-
- beati mites quoniam ipsi possidebunt terram
|
| 54 |
-
- neque cum invidia tabescente iter habebo quoniam ista non erit particeps sapientiae
|
| 55 |
-
pipeline_tag: sentence-similarity
|
| 56 |
-
library_name: sentence-transformers
|
| 57 |
-
metrics:
|
| 58 |
-
- cosine_accuracy
|
| 59 |
-
model-index:
|
| 60 |
-
- name: SentenceTransformer
|
| 61 |
-
results:
|
| 62 |
-
- task:
|
| 63 |
-
type: triplet
|
| 64 |
-
name: Triplet
|
| 65 |
-
dataset:
|
| 66 |
-
name: latin triplet eval
|
| 67 |
-
type: latin-triplet-eval
|
| 68 |
-
metrics:
|
| 69 |
-
- type: cosine_accuracy
|
| 70 |
-
value: 0.9162931442260742
|
| 71 |
-
name: Cosine Accuracy
|
| 72 |
---
|
| 73 |
|
| 74 |
-
#
|
| 75 |
-
|
| 76 |
-
This is a [sentence-transformers](https://www.SBERT.net) model trained. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
| 77 |
-
|
| 78 |
-
## Model Details
|
| 79 |
-
|
| 80 |
-
### Model Description
|
| 81 |
-
- **Model Type:** Sentence Transformer
|
| 82 |
-
<!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->
|
| 83 |
-
- **Maximum Sequence Length:** 256 tokens
|
| 84 |
-
- **Output Dimensionality:** 768 dimensions
|
| 85 |
-
- **Similarity Function:** Cosine Similarity
|
| 86 |
-
<!-- - **Training Dataset:** Unknown -->
|
| 87 |
-
<!-- - **Language:** Unknown -->
|
| 88 |
-
<!-- - **License:** Unknown -->
|
| 89 |
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 93 |
-
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
|
| 94 |
-
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 95 |
-
|
| 96 |
-
### Full Model Architecture
|
| 97 |
-
|
| 98 |
-
```
|
| 99 |
-
SentenceTransformer(
|
| 100 |
-
(0): Transformer({'max_seq_length': 256, 'do_lower_case': False, 'architecture': 'RobertaModel'})
|
| 101 |
-
(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, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
| 102 |
-
)
|
| 103 |
-
```
|
| 104 |
|
| 105 |
## Usage
|
| 106 |
|
| 107 |
-
### Direct Usage (Sentence Transformers)
|
| 108 |
-
|
| 109 |
-
First install the Sentence Transformers library:
|
| 110 |
-
|
| 111 |
-
```bash
|
| 112 |
-
pip install -U sentence-transformers
|
| 113 |
-
```
|
| 114 |
-
|
| 115 |
-
Then you can load this model and run inference.
|
| 116 |
```python
|
| 117 |
-
from sentence_transformers import SentenceTransformer
|
|
|
|
|
|
|
| 118 |
|
| 119 |
-
# Download from the 🤗 Hub
|
| 120 |
-
model = SentenceTransformer("TdelaSelle/PatriSBERT")
|
| 121 |
-
# Run inference
|
| 122 |
sentences = [
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
'neque cum invidia tabescente iter habebo quoniam ista non erit particeps sapientiae',
|
| 126 |
]
|
| 127 |
embeddings = model.encode(sentences)
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
# Get the similarity scores for the embeddings
|
| 132 |
-
similarities = model.similarity(embeddings, embeddings)
|
| 133 |
-
print(similarities)
|
| 134 |
-
# tensor([[ 1.0000, 0.6631, 0.0406],
|
| 135 |
-
# [ 0.6631, 1.0000, -0.0312],
|
| 136 |
-
# [ 0.0406, -0.0312, 1.0000]])
|
| 137 |
```
|
| 138 |
|
| 139 |
-
|
| 140 |
-
### Direct Usage (Transformers)
|
| 141 |
-
|
| 142 |
-
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 143 |
-
|
| 144 |
-
</details>
|
| 145 |
-
-->
|
| 146 |
-
|
| 147 |
-
<!--
|
| 148 |
-
### Downstream Usage (Sentence Transformers)
|
| 149 |
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
</details>
|
| 155 |
-
-->
|
| 156 |
-
|
| 157 |
-
<!--
|
| 158 |
-
### Out-of-Scope Use
|
| 159 |
-
|
| 160 |
-
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 161 |
-
-->
|
| 162 |
|
| 163 |
## Evaluation
|
| 164 |
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
#### Triplet
|
| 168 |
-
|
| 169 |
-
* Dataset: `latin-triplet-eval`
|
| 170 |
-
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
| 171 |
-
|
| 172 |
-
| Metric | Value |
|
| 173 |
-
|:--------------------|:-----------|
|
| 174 |
-
| **cosine_accuracy** | **0.9163** |
|
| 175 |
-
|
| 176 |
-
<!--
|
| 177 |
-
## Bias, Risks and Limitations
|
| 178 |
-
|
| 179 |
-
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 180 |
-
-->
|
| 181 |
-
|
| 182 |
-
<!--
|
| 183 |
-
### Recommendations
|
| 184 |
-
|
| 185 |
-
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 186 |
-
-->
|
| 187 |
-
|
| 188 |
-
## Training Details
|
| 189 |
-
|
| 190 |
-
### Training Dataset
|
| 191 |
-
|
| 192 |
-
#### Unnamed Dataset
|
| 193 |
-
|
| 194 |
-
* Size: 92,351 training samples
|
| 195 |
-
* Columns: <code>sentence_0</code> and <code>sentence_1</code>
|
| 196 |
-
* Approximate statistics based on the first 1000 samples:
|
| 197 |
-
| | sentence_0 | sentence_1 |
|
| 198 |
-
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
|
| 199 |
-
| type | string | string |
|
| 200 |
-
| details | <ul><li>min: 4 tokens</li><li>mean: 25.14 tokens</li><li>max: 256 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 27.76 tokens</li><li>max: 256 tokens</li></ul> |
|
| 201 |
-
* Samples:
|
| 202 |
-
| sentence_0 | sentence_1 |
|
| 203 |
-
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| 204 |
-
| <code>quam angusta porta et arta uia, quae ducitad uitam, et pauci sunt qui inueniunt eam.</code> | <code>intrate per angustam portam quia lata porta et spatiosa via quae ducit ad perditionem et multi sunt qui intrant per eam quam angusta porta et arta via quae ducit ad vitam et pauci sunt qui inveniunt eam adtendite a falsis prophetis qui veniunt ad vos in vestimentis ovium intrinsecus autem sunt lupi rapaces</code> |
|
| 205 |
-
| <code>et cum aliter crucifigi non potuit nisi ex infirmitate, et nisi in manifestatione carnis et distinctione membrorum exhiberet se talem qui crucifigi posset.</code> | <code>nam et si crucifixus est ex infirmitate sed vivit ex virtute Dei nam et nos infirmi sumus in illo sed vivemus cum eo ex virtute Dei in vobis</code> |
|
| 206 |
-
| <code>in ista splendor gloriae est et candor lucis aeternae apud quem non est transmutatio nec uicissi tudinis obumbratio.</code> | <code>qui cum sit splendor gloriae et figura substantiae eius portansque omnia verbo virtutis suae purgationem peccatorum faciens sedit ad dexteram Maiestatis in excelsis</code> |
|
| 207 |
-
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 208 |
-
```json
|
| 209 |
-
{
|
| 210 |
-
"scale": 20.0,
|
| 211 |
-
"similarity_fct": "cos_sim",
|
| 212 |
-
"gather_across_devices": false,
|
| 213 |
-
"directions": [
|
| 214 |
-
"query_to_doc"
|
| 215 |
-
],
|
| 216 |
-
"partition_mode": "joint",
|
| 217 |
-
"hardness_mode": null,
|
| 218 |
-
"hardness_strength": 0.0
|
| 219 |
-
}
|
| 220 |
-
```
|
| 221 |
-
|
| 222 |
-
### Training Hyperparameters
|
| 223 |
-
#### Non-Default Hyperparameters
|
| 224 |
-
|
| 225 |
-
- `eval_strategy`: steps
|
| 226 |
-
- `per_device_train_batch_size`: 32
|
| 227 |
-
- `per_device_eval_batch_size`: 32
|
| 228 |
-
- `num_train_epochs`: 4
|
| 229 |
-
- `multi_dataset_batch_sampler`: round_robin
|
| 230 |
-
|
| 231 |
-
#### All Hyperparameters
|
| 232 |
-
<details><summary>Click to expand</summary>
|
| 233 |
-
|
| 234 |
-
- `overwrite_output_dir`: False
|
| 235 |
-
- `do_predict`: False
|
| 236 |
-
- `eval_strategy`: steps
|
| 237 |
-
- `prediction_loss_only`: True
|
| 238 |
-
- `per_device_train_batch_size`: 32
|
| 239 |
-
- `per_device_eval_batch_size`: 32
|
| 240 |
-
- `per_gpu_train_batch_size`: None
|
| 241 |
-
- `per_gpu_eval_batch_size`: None
|
| 242 |
-
- `gradient_accumulation_steps`: 1
|
| 243 |
-
- `eval_accumulation_steps`: None
|
| 244 |
-
- `torch_empty_cache_steps`: None
|
| 245 |
-
- `learning_rate`: 5e-05
|
| 246 |
-
- `weight_decay`: 0.0
|
| 247 |
-
- `adam_beta1`: 0.9
|
| 248 |
-
- `adam_beta2`: 0.999
|
| 249 |
-
- `adam_epsilon`: 1e-08
|
| 250 |
-
- `max_grad_norm`: 1
|
| 251 |
-
- `num_train_epochs`: 4
|
| 252 |
-
- `max_steps`: -1
|
| 253 |
-
- `lr_scheduler_type`: linear
|
| 254 |
-
- `lr_scheduler_kwargs`: None
|
| 255 |
-
- `warmup_ratio`: 0.0
|
| 256 |
-
- `warmup_steps`: 0
|
| 257 |
-
- `log_level`: passive
|
| 258 |
-
- `log_level_replica`: warning
|
| 259 |
-
- `log_on_each_node`: True
|
| 260 |
-
- `logging_nan_inf_filter`: True
|
| 261 |
-
- `save_safetensors`: True
|
| 262 |
-
- `save_on_each_node`: False
|
| 263 |
-
- `save_only_model`: False
|
| 264 |
-
- `restore_callback_states_from_checkpoint`: False
|
| 265 |
-
- `no_cuda`: False
|
| 266 |
-
- `use_cpu`: False
|
| 267 |
-
- `use_mps_device`: False
|
| 268 |
-
- `seed`: 42
|
| 269 |
-
- `data_seed`: None
|
| 270 |
-
- `jit_mode_eval`: False
|
| 271 |
-
- `bf16`: False
|
| 272 |
-
- `fp16`: False
|
| 273 |
-
- `fp16_opt_level`: O1
|
| 274 |
-
- `half_precision_backend`: auto
|
| 275 |
-
- `bf16_full_eval`: False
|
| 276 |
-
- `fp16_full_eval`: False
|
| 277 |
-
- `tf32`: None
|
| 278 |
-
- `local_rank`: 0
|
| 279 |
-
- `ddp_backend`: None
|
| 280 |
-
- `tpu_num_cores`: None
|
| 281 |
-
- `tpu_metrics_debug`: False
|
| 282 |
-
- `debug`: []
|
| 283 |
-
- `dataloader_drop_last`: False
|
| 284 |
-
- `dataloader_num_workers`: 0
|
| 285 |
-
- `dataloader_prefetch_factor`: None
|
| 286 |
-
- `past_index`: -1
|
| 287 |
-
- `disable_tqdm`: False
|
| 288 |
-
- `remove_unused_columns`: True
|
| 289 |
-
- `label_names`: None
|
| 290 |
-
- `load_best_model_at_end`: False
|
| 291 |
-
- `ignore_data_skip`: False
|
| 292 |
-
- `fsdp`: []
|
| 293 |
-
- `fsdp_min_num_params`: 0
|
| 294 |
-
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 295 |
-
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 296 |
-
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 297 |
-
- `parallelism_config`: None
|
| 298 |
-
- `deepspeed`: None
|
| 299 |
-
- `label_smoothing_factor`: 0.0
|
| 300 |
-
- `optim`: adamw_torch_fused
|
| 301 |
-
- `optim_args`: None
|
| 302 |
-
- `adafactor`: False
|
| 303 |
-
- `group_by_length`: False
|
| 304 |
-
- `length_column_name`: length
|
| 305 |
-
- `project`: huggingface
|
| 306 |
-
- `trackio_space_id`: trackio
|
| 307 |
-
- `ddp_find_unused_parameters`: None
|
| 308 |
-
- `ddp_bucket_cap_mb`: None
|
| 309 |
-
- `ddp_broadcast_buffers`: False
|
| 310 |
-
- `dataloader_pin_memory`: True
|
| 311 |
-
- `dataloader_persistent_workers`: False
|
| 312 |
-
- `skip_memory_metrics`: True
|
| 313 |
-
- `use_legacy_prediction_loop`: False
|
| 314 |
-
- `push_to_hub`: False
|
| 315 |
-
- `resume_from_checkpoint`: None
|
| 316 |
-
- `hub_model_id`: None
|
| 317 |
-
- `hub_strategy`: every_save
|
| 318 |
-
- `hub_private_repo`: None
|
| 319 |
-
- `hub_always_push`: False
|
| 320 |
-
- `hub_revision`: None
|
| 321 |
-
- `gradient_checkpointing`: False
|
| 322 |
-
- `gradient_checkpointing_kwargs`: None
|
| 323 |
-
- `include_inputs_for_metrics`: False
|
| 324 |
-
- `include_for_metrics`: []
|
| 325 |
-
- `eval_do_concat_batches`: True
|
| 326 |
-
- `fp16_backend`: auto
|
| 327 |
-
- `push_to_hub_model_id`: None
|
| 328 |
-
- `push_to_hub_organization`: None
|
| 329 |
-
- `mp_parameters`:
|
| 330 |
-
- `auto_find_batch_size`: False
|
| 331 |
-
- `full_determinism`: False
|
| 332 |
-
- `torchdynamo`: None
|
| 333 |
-
- `ray_scope`: last
|
| 334 |
-
- `ddp_timeout`: 1800
|
| 335 |
-
- `torch_compile`: False
|
| 336 |
-
- `torch_compile_backend`: None
|
| 337 |
-
- `torch_compile_mode`: None
|
| 338 |
-
- `include_tokens_per_second`: False
|
| 339 |
-
- `include_num_input_tokens_seen`: no
|
| 340 |
-
- `neftune_noise_alpha`: None
|
| 341 |
-
- `optim_target_modules`: None
|
| 342 |
-
- `batch_eval_metrics`: False
|
| 343 |
-
- `eval_on_start`: False
|
| 344 |
-
- `use_liger_kernel`: False
|
| 345 |
-
- `liger_kernel_config`: None
|
| 346 |
-
- `eval_use_gather_object`: False
|
| 347 |
-
- `average_tokens_across_devices`: True
|
| 348 |
-
- `prompts`: None
|
| 349 |
-
- `batch_sampler`: batch_sampler
|
| 350 |
-
- `multi_dataset_batch_sampler`: round_robin
|
| 351 |
-
- `router_mapping`: {}
|
| 352 |
-
- `learning_rate_mapping`: {}
|
| 353 |
-
|
| 354 |
-
</details>
|
| 355 |
-
|
| 356 |
-
### Training Logs
|
| 357 |
-
| Epoch | Step | Training Loss | latin-triplet-eval_cosine_accuracy |
|
| 358 |
-
|:------:|:-----:|:-------------:|:----------------------------------:|
|
| 359 |
-
| 0.1733 | 500 | 0.086 | 0.9049 |
|
| 360 |
-
| 0.3465 | 1000 | 0.0896 | 0.9006 |
|
| 361 |
-
| 0.5198 | 1500 | 0.0957 | 0.9015 |
|
| 362 |
-
| 0.6930 | 2000 | 0.0915 | 0.9049 |
|
| 363 |
-
| 0.8663 | 2500 | 0.0932 | 0.9039 |
|
| 364 |
-
| 1.0 | 2886 | - | 0.9034 |
|
| 365 |
-
| 1.0395 | 3000 | 0.0724 | 0.9052 |
|
| 366 |
-
| 1.2128 | 3500 | 0.0522 | 0.9049 |
|
| 367 |
-
| 1.3860 | 4000 | 0.0478 | 0.9054 |
|
| 368 |
-
| 1.5593 | 4500 | 0.0577 | 0.9073 |
|
| 369 |
-
| 1.7325 | 5000 | 0.0492 | 0.9118 |
|
| 370 |
-
| 1.9058 | 5500 | 0.0455 | 0.9108 |
|
| 371 |
-
| 2.0 | 5772 | - | 0.9108 |
|
| 372 |
-
| 2.0790 | 6000 | 0.0383 | 0.9140 |
|
| 373 |
-
| 2.2523 | 6500 | 0.0278 | 0.9138 |
|
| 374 |
-
| 2.4255 | 7000 | 0.0284 | 0.9133 |
|
| 375 |
-
| 2.5988 | 7500 | 0.0266 | 0.9147 |
|
| 376 |
-
| 2.7720 | 8000 | 0.0268 | 0.9155 |
|
| 377 |
-
| 2.9453 | 8500 | 0.0283 | 0.9143 |
|
| 378 |
-
| 3.0 | 8658 | - | 0.9134 |
|
| 379 |
-
| 3.1185 | 9000 | 0.0237 | 0.9159 |
|
| 380 |
-
| 3.2918 | 9500 | 0.0203 | 0.9148 |
|
| 381 |
-
| 3.4650 | 10000 | 0.0201 | 0.9145 |
|
| 382 |
-
| 3.6383 | 10500 | 0.0231 | 0.9154 |
|
| 383 |
-
| 3.8115 | 11000 | 0.0204 | 0.9159 |
|
| 384 |
-
| 3.9848 | 11500 | 0.0199 | 0.9163 |
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
### Framework Versions
|
| 388 |
-
- Python: 3.11.14
|
| 389 |
-
- Sentence Transformers: 5.3.0
|
| 390 |
-
- Transformers: 4.57.6
|
| 391 |
-
- PyTorch: 2.10.0+cu128
|
| 392 |
-
- Accelerate: 1.12.0
|
| 393 |
-
- Datasets: 4.6.0
|
| 394 |
-
- Tokenizers: 0.22.2
|
| 395 |
|
| 396 |
## Citation
|
| 397 |
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
#### Sentence Transformers
|
| 401 |
-
```bibtex
|
| 402 |
-
@inproceedings{reimers-2019-sentence-bert,
|
| 403 |
-
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 404 |
-
author = "Reimers, Nils and Gurevych, Iryna",
|
| 405 |
-
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 406 |
-
month = "11",
|
| 407 |
-
year = "2019",
|
| 408 |
-
publisher = "Association for Computational Linguistics",
|
| 409 |
-
url = "https://arxiv.org/abs/1908.10084",
|
| 410 |
-
}
|
| 411 |
```
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
|
| 418 |
-
year={2019},
|
| 419 |
-
eprint={1807.03748},
|
| 420 |
-
archivePrefix={arXiv},
|
| 421 |
-
primaryClass={cs.LG},
|
| 422 |
-
url={https://arxiv.org/abs/1807.03748},
|
| 423 |
}
|
| 424 |
-
```
|
| 425 |
-
|
| 426 |
-
<!--
|
| 427 |
-
## Glossary
|
| 428 |
-
|
| 429 |
-
*Clearly define terms in order to be accessible across audiences.*
|
| 430 |
-
-->
|
| 431 |
-
|
| 432 |
-
<!--
|
| 433 |
-
## Model Card Authors
|
| 434 |
-
|
| 435 |
-
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 436 |
-
-->
|
| 437 |
-
|
| 438 |
-
<!--
|
| 439 |
-
## Model Card Contact
|
| 440 |
-
|
| 441 |
-
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 442 |
-
-->
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- la
|
| 4 |
+
library_name: sentence-transformers
|
| 5 |
+
license: cc-by-4.0
|
| 6 |
+
model_name: PatriSBERT
|
| 7 |
+
pipeline_tag: sentence-similarity
|
| 8 |
tags:
|
| 9 |
- sentence-transformers
|
| 10 |
- sentence-similarity
|
| 11 |
- feature-extraction
|
| 12 |
+
- patristics
|
| 13 |
+
- biblical-reuse
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# PatriSBERT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
A Sentence-BERT model fine-tuned for semantic textual similarity on patristic and biblical Latin texts.
|
| 19 |
+
It is designed to detect and measure text reuse between early Christian writings and the Vulgate Bible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
## Usage
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
```python
|
| 24 |
+
from sentence_transformers import SentenceTransformer, util
|
| 25 |
+
|
| 26 |
+
model = SentenceTransformer("tdelaselle/PatriSBERT")
|
| 27 |
|
|
|
|
|
|
|
|
|
|
| 28 |
sentences = [
|
| 29 |
+
"In principio erat Verbum",
|
| 30 |
+
"Et Verbum caro factum est",
|
|
|
|
| 31 |
]
|
| 32 |
embeddings = model.encode(sentences)
|
| 33 |
+
similarity = util.cos_sim(embeddings[0], embeddings[1])
|
| 34 |
+
print(f"Cosine similarity: {similarity.item():.4f}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
```
|
| 36 |
|
| 37 |
+
## Training
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
+
- **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)
|
| 40 |
+
- **Task**: Semantic textual similarity (STS) via triplet fine-tuning
|
| 41 |
+
- **Dataset**: Latin biblical reuse triplets
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
## Evaluation
|
| 44 |
|
| 45 |
+
See the `eval/` folder for evaluation metrics on the held-out test set.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
## Citation
|
| 48 |
|
| 49 |
+
If you use this model, please cite:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
```
|
| 51 |
+
@misc{patriSBERT2026,
|
| 52 |
+
author = {TdelaSelle},
|
| 53 |
+
title = {PatriSBERT},
|
| 54 |
+
year = {2026},
|
| 55 |
+
url = {https://huggingface.co/TdelaSelle/PatriSBERT}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
}
|
| 57 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|