CoolFace
Modelpublic

Jimmy-Ooi/Tyrisonase_test_model_1000_10_AdamW

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes61downloads
Model Card

SentenceTransformer based on google-bert/bert-base-cased

This is a sentence-transformers model finetuned from google-bert/bert-base-cased on the csv dataset. 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.

Model Details

Model Description

  • Model Type: Sentence Transformer
  • Base model: google-bert/bert-base-cased <!-- at revision cd5ef92a9fb2f889e972770a36d4ed042daf221e -->
  • Maximum Sequence Length: 512 tokens
  • Output Dimensionality: 768 dimensions
  • Similarity Function: Cosine Similarity
  • Training Dataset:
  • csv <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False, 'architecture': '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, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
)

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

bash
pip install -U sentence-transformers

Then you can load this model and run inference.

python
from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("Jimmy-Ooi/Tyrisonase_test_model_1000_10_AdamW")
# Run inference
sentences = [
    'Oc1cc(O)cc(CC(c2ccc(O)cc2O)c2c(O)cc(/C=C/c3ccc(O)cc3O)cc2O)c1',
    'CCOC(OCC)c1ccc(/C=C2\\CCC/C(=C\\c3ccc(C(OCC)OCC)cc3)C2=O)cc1',
    'COc1cc(C2CC(c3ccccc3O)=NN2C(C)=O)ccc1O',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[ 1.0000, -0.2062,  0.0816],
#         [-0.2062,  1.0000,  0.9290],
#         [ 0.0816,  0.9290,  1.0000]])

<!--

Direct Usage (Transformers)

<details><summary>Click to see the direct usage in Transformers</summary>

</details> -->

<!--

Downstream Usage (Sentence Transformers)

You can finetune this model on your own dataset.

<details><summary>Click to expand</summary>

</details> -->

<!--

Out-of-Scope Use

List how the model may foreseeably be misused and address what users ought not to do with the model. -->

<!--

Bias, Risks and Limitations

What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model. -->

<!--

Recommendations

What are recommendations with respect to the foreseeable issues? For example, filtering explicit content. -->

Training Details

Training Dataset

csv
  • Dataset: csv
  • Size: 188,228 training samples
  • Columns: <code>premise</code>, <code>hypothesis</code>, and <code>label</code>
  • Approximate statistics based on the first 1000 samples: | | premise | hypothesis | label | |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:------------------------------------------------| | type | string | string | int | | details | <ul><li>min: 8 tokens</li><li>mean: 39.65 tokens</li><li>max: 145 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 38.43 tokens</li><li>max: 145 tokens</li></ul> | <ul><li>0: ~50.20%</li><li>2: ~49.80%</li></ul> |
  • Samples: | premise | hypothesis | label | |:-----------------------------------------------------|:-------------------------------------------------------------------------------------------------------------|:---------------| | <code>CCOc1ccc(-c2ccc(/C(C)=N/NC(N)=S)cc2)cc1</code> | <code>NC(=S)N/N=C\c1ccc(O[C@@H]2OCC@@Hc3ccccc3)C@Hc3ccccc3)[C@H]2OC(=O)c2ccccc2)cc1</code> | <code>0</code> | | <code>O=C(c1ccccc1Cl)N1CCN(Cc2ccc(F)cc2)CC1</code> | <code>O=C(OCc1ccc(O)cc1)c1c(O)cc(O)cc1O</code> | <code>2</code> | | <code>Nc1ccc(C(=O)/C=C/c2ccc(O)cc2)cc1</code> | <code>Cn1c2ccccc2c2cc(/C=C/C(=O)c3cccc(N)c3)ccc21</code> | <code>0</code> |
  • Loss: <code>SoftmaxLoss</code>

Evaluation Dataset

csv
  • Dataset: csv
  • Size: 33,217 evaluation samples
  • Columns: <code>premise</code>, <code>hypothesis</code>, and <code>label</code>
  • Approximate statistics based on the first 1000 samples: | | premise | hypothesis | label | |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:------------------------------------------------| | type | string | string | int | | details | <ul><li>min: 8 tokens</li><li>mean: 39.17 tokens</li><li>max: 145 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 38.55 tokens</li><li>max: 145 tokens</li></ul> | <ul><li>0: ~51.70%</li><li>2: ~48.30%</li></ul> |
  • Samples: | premise | hypothesis | label | |:-------------------------------------------------------|:------------------------------------------------------------|:---------------| | <code>O=C1NC(=S)NC(=O)C1=Cc1ccc(O)c(O)c1</code> | <code>O=C(NO)Nc1ccc(O)cc1</code> | <code>0</code> | | <code>Cc1ccc(O)cc1O</code> | <code>O=C(O)CSc1nnc(NC(=S)Nc2ccc(F)cc2)s1</code> | <code>0</code> | | <code>COc1cccc(OC(=O)COC(=O)/C=C/c2ccc(O)cc2)c1</code> | <code>NC(=S)N/N=C/c1cc(O)c2c(c1)C(=O)c1cccc(O)c1C2=O</code> | <code>0</code> |
  • Loss: <code>SoftmaxLoss</code>

Training Hyperparameters

Non-Default Hyperparameters
  • per_device_train_batch_size: 64
  • per_device_eval_batch_size: 64
  • weight_decay: 0.001
  • num_train_epochs: 10
  • warmup_steps: 100
  • fp16: True
  • optim: adamw_torch
All Hyperparameters

<details><summary>Click to expand</summary>

  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: no
  • prediction_loss_only: True
  • per_device_train_batch_size: 64
  • per_device_eval_batch_size: 64
  • per_gpu_train_batch_size: None
  • per_gpu_eval_batch_size: None
  • gradient_accumulation_steps: 1
  • eval_accumulation_steps: None
  • torch_empty_cache_steps: None
  • learning_rate: 5e-05
  • weight_decay: 0.001
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1.0
  • num_train_epochs: 10
  • max_steps: -1
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: {}
  • warmup_ratio: 0.0
  • warmup_steps: 100
  • log_level: passive
  • log_level_replica: warning
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • save_safetensors: True
  • save_on_each_node: False
  • save_only_model: False
  • restore_callback_states_from_checkpoint: False
  • no_cuda: False
  • use_cpu: False
  • use_mps_device: False
  • seed: 42
  • data_seed: None
  • jit_mode_eval: False
  • bf16: False
  • fp16: True
  • fp16_opt_level: O1
  • half_precision_backend: auto
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: None
  • local_rank: 0
  • ddp_backend: None
  • tpu_num_cores: None
  • tpu_metrics_debug: False
  • debug: []
  • dataloader_drop_last: False
  • dataloader_num_workers: 0
  • dataloader_prefetch_factor: None
  • past_index: -1
  • disable_tqdm: False
  • remove_unused_columns: True
  • label_names: None
  • load_best_model_at_end: False
  • ignore_data_skip: False
  • fsdp: []
  • fsdp_min_num_params: 0
  • fsdp_config: {'minnumparams': 0, 'xla': False, 'xlafsdpv2': False, 'xlafsdpgrad_ckpt': False}
  • fsdp_transformer_layer_cls_to_wrap: None
  • accelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': None}
  • parallelism_config: None
  • deepspeed: None
  • label_smoothing_factor: 0.0
  • optim: adamw_torch
  • optim_args: None
  • adafactor: False
  • group_by_length: False
  • length_column_name: length
  • project: huggingface
  • trackio_space_id: trackio
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: False
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • skip_memory_metrics: True
  • use_legacy_prediction_loop: False
  • push_to_hub: False
  • resume_from_checkpoint: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_private_repo: None
  • hub_always_push: False
  • hub_revision: None
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • include_inputs_for_metrics: False
  • include_for_metrics: []
  • eval_do_concat_batches: True
  • fp16_backend: auto
  • push_to_hub_model_id: None
  • push_to_hub_organization: None
  • mp_parameters:
  • auto_find_batch_size: False
  • full_determinism: False
  • torchdynamo: None
  • ray_scope: last
  • ddp_timeout: 1800
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • include_tokens_per_second: False
  • include_num_input_tokens_seen: no
  • neftune_noise_alpha: None
  • optim_target_modules: None
  • batch_eval_metrics: False
  • eval_on_start: False
  • use_liger_kernel: False
  • liger_kernel_config: None
  • eval_use_gather_object: False
  • average_tokens_across_devices: True
  • prompts: None
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: proportional
  • router_mapping: {}
  • learning_rate_mapping: {}

</details>

Training Logs

<details><summary>Click to expand</summary>

EpochStepTraining Loss
0.03401000.7435
0.06802000.6891
0.10203000.6516
0.13604000.6297
0.17005000.613
0.20396000.6012
0.23797000.6011
0.27198000.5852
0.30599000.5897
0.339910000.5759
0.373911000.5643
0.407912000.5771
0.441913000.5633
0.475914000.5652
0.509915000.5671
0.543816000.5626
0.577817000.5585
0.611818000.5651
0.645819000.5543
0.679820000.5588
0.713821000.556
0.747822000.5485
0.781823000.5409
0.815824000.5436
0.849825000.5461
0.883826000.5421
0.917727000.5434
0.951728000.5418
0.985729000.536
1.019730000.5459
1.053731000.5386
1.087732000.5371
1.121733000.5333
1.155734000.5425
1.189735000.5401
1.223736000.536
1.257637000.5256
1.291638000.5303
1.325639000.5377
1.359640000.5444
1.393641000.5308
1.427642000.5375
1.461643000.5294
1.495644000.5358
1.529645000.531
1.563646000.5377
1.597647000.5276
1.631548000.521
1.665549000.5391
1.699550000.529
1.733551000.5406
1.767552000.5288
1.801553000.5266
1.835554000.5356
1.869555000.5316
1.903556000.5216
1.937557000.5213
1.971458000.523
2.005459000.5255
2.039460000.5325
2.073461000.5305
2.107462000.5206
2.141463000.5273
2.175464000.5252
2.209465000.5198
2.243466000.5255
2.277467000.5155
2.311468000.5201
2.345369000.518
2.379370000.5199
2.413371000.5055
2.447372000.5225
2.481373000.5276
2.515374000.5198
2.549375000.5202
2.583376000.5178
2.617377000.5162
2.651378000.5224
2.685279000.5144
2.719280000.5156
2.753281000.5111
2.787282000.5119
2.821283000.5189
2.855284000.5056
2.889285000.5115
2.923286000.5149
2.957287000.5124
2.991288000.5161
3.025289000.5134
3.059190000.5077
3.093191000.5176
3.127192000.5151
3.161193000.5188
3.195194000.5078
3.229195000.52
3.263196000.5146
3.297197000.5111
3.331198000.5034
3.365199000.5166
3.3990100000.5061
3.4330101000.5115
3.4670102000.5073
3.5010103000.5136
3.5350104000.5067
3.5690105000.5045
3.6030106000.5098
3.6370107000.5106
3.6710108000.5126
3.7050109000.5107
3.7390110000.5026
3.7729111000.5065
3.8069112000.507
3.8409113000.51
3.8749114000.5159
3.9089115000.512
3.9429116000.5106
3.9769117000.5013
4.0109118000.5065
4.0449119000.5019
4.0789120000.5039
4.1128121000.501
4.1468122000.501
4.1808123000.499
4.2148124000.5021
4.2488125000.5074
4.2828126000.5056
4.3168127000.5064
4.3508128000.5097
4.3848129000.539
4.4188130000.5117
4.4528131000.5112
4.4867132000.5118
4.5207133000.5147
4.5547134000.501
4.5887135000.51
4.6227136000.5064
4.6567137000.5044
4.6907138000.5103
4.7247139000.5045
4.7587140000.5048
4.7927141000.5034
4.8266142000.5108
4.8606143000.5076
4.8946144000.5041
4.9286145000.5029
4.9626146000.5103
4.9966147000.5063
5.0306148000.4903
5.0646149000.5051
5.0986150000.4943
5.1326151000.4995
5.1666152000.5052
5.2005153000.5101
5.2345154000.5048
5.2685155000.5018
5.3025156000.5013
5.3365157000.4999
5.3705158000.4985
5.4045159000.5038
5.4385160000.4975
5.4725161000.5065
5.5065162000.505
5.5404163000.4979
5.5744164000.4971
5.6084165000.5058
5.6424166000.504
5.6764167000.5017
5.7104168000.4978
5.7444169000.4929
5.7784170000.4996
5.8124171000.4984
5.8464172000.4997
5.8804173000.4987
5.9143174000.5071
5.9483175000.5035
5.9823176000.5094
6.0163177000.4953
6.0503178000.4929
6.0843179000.4862
6.1183180000.502
6.1523181000.4976
6.1863182000.5059
6.2203183000.4976
6.2542184000.5022
6.2882185000.4969
6.3222186000.5013
6.3562187000.5027
6.3902188000.4974
6.4242189000.4957
6.4582190000.4985
6.4922191000.5026
6.5262192000.5
6.5602193000.5074
6.5942194000.4893
6.6281195000.4958
6.6621196000.497
6.6961197000.4985
6.7301198000.497
6.7641199000.49
6.7981200000.5015
6.8321201000.4969
6.8661202000.4956
6.9001203000.5004
6.9341204000.4988
6.9680205000.4986
7.0020206000.5013
7.0360207000.4932
7.0700208000.495
7.1040209000.4962
7.1380210000.4914
7.1720211000.4886
7.2060212000.4995
7.2400213000.4949
7.2740214000.4985
7.3080215000.5085
7.3419216000.4979
7.3759217000.4852
7.4099218000.5015
7.4439219000.4863
7.4779220000.4959
7.5119221000.49
7.5459222000.5013
7.5799223000.4933
7.6139224000.5
7.6479225000.4984
7.6818226000.4887
7.7158227000.4997
7.7498228000.4937
7.7838229000.4997
7.8178230000.4991
7.8518231000.504
7.8858232000.5
7.9198233000.4848
7.9538234000.4957
7.9878235000.4949
8.0218236000.4838
8.0557237000.4918
8.0897238000.4957
8.1237239000.4959
8.1577240000.4949
8.1917241000.4992
8.2257242000.4972
8.2597243000.4933
8.2937244000.49
8.3277245000.493
8.3617246000.4957
8.3956247000.4902
8.4296248000.494
8.4636249000.491
8.4976250000.4954
8.5316251000.5009
8.5656252000.4941
8.5996253000.4988
8.6336254000.492
8.6676255000.4932
8.7016256000.4933
8.7356257000.491
8.7695258000.4944
8.8035259000.4862
8.8375260000.4915
8.8715261000.4963
8.9055262000.4938
8.9395263000.5021
8.9735264000.4893
9.0075265000.4927
9.0415266000.4932
9.0755267000.501
9.1094268000.4921
9.1434269000.4988
9.1774270000.4934
9.2114271000.4968
9.2454272000.4946
9.2794273000.4879
9.3134274000.4886
9.3474275000.4926
9.3814276000.4959
9.4154277000.4885
9.4494278000.501
9.4833279000.4859
9.5173280000.4962
9.5513281000.4968
9.5853282000.4897
9.6193283000.4906
9.6533284000.4879
9.6873285000.4937
9.7213286000.4885
9.7553287000.4922
9.7893288000.4953
9.8232289000.4947
9.8572290000.493
9.8912291000.49
9.9252292000.491
9.9592293000.4889
9.9932294000.4907

</details>

Framework Versions

  • Python: 3.12.12
  • Sentence Transformers: 5.2.0
  • Transformers: 4.57.3
  • PyTorch: 2.9.0+cu126
  • Accelerate: 1.12.0
  • Datasets: 4.0.0
  • Tokenizers: 0.22.1

Citation

BibTeX

Sentence Transformers and SoftmaxLoss
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",
}

<!--

Glossary

Clearly define terms in order to be accessible across audiences. -->

<!--

Model Card Authors

Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction. -->

<!--

Model Card Contact

Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors. -->