metadata
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- dense
- generated_from_trainer
- dataset_size:286816
- loss:SoftmaxLoss
base_model: google-bert/bert-base-cased
widget:
- source_sentence: CC(C)C[C@H](NC(=O)[C@@H](N)Cc1ccccc1)C(=O)NCc1cc(=O)c(O)c[nH]1
sentences:
- CC(=O)N1CCC(Cc2ccc(F)cc2)CC1
- C=CC(C)(C)c1cc(CCCc2cc(O)c(O)c(CC3OC3(C)C)c2CC=C(C)C)c(O)cc1O
- COc1cc([N+](=O)[O-])ccc1/C=C/C(=N\O)c1cc2ccccc2cc1O
- source_sentence: O=C(OCc1ccc(O)cc1)c1cc(O)c(O)c(O)c1
sentences:
- COc1ccc(/C=C/C(=O)NCCCNC(=O)/C=C/c2ccc(OC)c(O)c2)cc1O
- CCCCCCCCSCc1cc(=O)c(O)co1
- O=C(NCCc1c[nH]c2ccc(O)cc12)c1ccc(O)cc1O
- source_sentence: O=C(/C=C/c1ccc(O)cc1)c1ccc(NS(=O)(=O)c2ccc([N+](=O)[O-])cc2)cc1
sentences:
- Nc1ccc(S(=O)(=O)Nc2ccc(C(=O)/C=C/c3ccc(O)cc3)cc2)cc1
- O=C(NO)Nc1ccc(O)cc1
- COc1ccc(C(C)=O)c(OC(=O)/C=C/c2ccc(F)cc2)c1
- source_sentence: O=C(c1ccc2ccccc2c1)N1CCC(N2CCCCC2)CC1
sentences:
- N[C@@H](Cc1ccccc1)C(=O)N[C@@H](Cc1ccccc1)C(=O)OCc1cc(=O)c(O)c[nH]1
- '[C-]#N'
- COc1ccc(/C=C/C(=O)NCCCNC(=O)/C=C/c2ccc(OC)c(O)c2)cc1O
- source_sentence: NC(=S)c1cccnc1
sentences:
- COc1ccc(/C=C/C(=N\O)c2cc3ccccc3cc2O)c(OC)c1
- C/C(=N\NC(N)=S)c1cccc(NC(=O)C(F)(F)F)c1
- Cc1ccc(C(C)C)c(OC(=O)/C=C/c2ccc(O)cc2)c1
pipeline_tag: sentence-similarity
library_name: sentence-transformers
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
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 768 dimensions
- Similarity Function: Cosine Similarity
- Training Dataset:
- csv
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
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:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("Jimmy-Ooi/Tyrisonase_test_model")
# Run inference
sentences = [
'NC(=S)c1cccnc1',
'Cc1ccc(C(C)C)c(OC(=O)/C=C/c2ccc(O)cc2)c1',
'C/C(=N\\NC(N)=S)c1cccc(NC(=O)C(F)(F)F)c1',
]
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.9019, 0.8925],
# [0.9019, 1.0000, 0.9356],
# [0.8925, 0.9356, 1.0000]])
Training Details
Training Dataset
csv
- Dataset: csv
- Size: 286,816 training samples
- Columns:
premise,hypothesis, andlabel - Approximate statistics based on the first 1000 samples:
premise hypothesis label type string string int details - min: 8 tokens
- mean: 38.33 tokens
- max: 213 tokens
- min: 8 tokens
- mean: 37.78 tokens
- max: 213 tokens
- 0: ~50.50%
- 2: ~49.50%
- Samples:
premise hypothesis label NC(=O)C@HNC(=O)OCc1cc(=O)c(O)co1CNC(=S)N/N=C(\C)c1ccc(OC)cc1O2CC/C(=N\NC(N)=S)c1ccc(C2CCCCC2)cc1COc1cccc(C(=O)N2CCN(Cc3ccc(F)cc3)CC2)c12O=C(O)CSc1nnc(NC(=S)Nc2cccc(C(F)(F)F)c2)s1CCCCOc1cccc2c1C(=O)c1c(OCCCC)cc(CO)cc1C2=O0 - Loss:
SoftmaxLoss
Evaluation Dataset
csv
- Dataset: csv
- Size: 50,615 evaluation samples
- Columns:
premise,hypothesis, andlabel - Approximate statistics based on the first 1000 samples:
premise hypothesis label type string string int details - min: 8 tokens
- mean: 38.78 tokens
- max: 213 tokens
- min: 8 tokens
- mean: 39.23 tokens
- max: 213 tokens
- 0: ~47.40%
- 2: ~52.60%
- Samples:
premise hypothesis label O=Cc1ccoc1Cn1c2ccccc2c2cc(/C=C/C(=O)c3cccc(NC(=O)c4ccccc4F)c3)ccc212COc1cc(C=O)ccc1OC(=O)CN1CCN(C)CC1Oc1ccc(O)cc12O=C(c1cccc(N+[O-])c1)N1CCN(Cc2ccc(F)cc2)CC1CNC(=S)N/N=C(\C)c1ccc(OC)cc1O2 - Loss:
SoftmaxLoss
Framework Versions
- Python: 3.12.11
- Sentence Transformers: 5.1.1
- Transformers: 4.56.1
- PyTorch: 2.8.0+cu126
- Accelerate: 1.10.1
- Datasets: 4.0.0
- Tokenizers: 0.22.0
Citation
BibTeX
Sentence Transformers and SoftmaxLoss
@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",
}