---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:3396
- loss:SoftmaxLoss
base_model: google/embeddinggemma-300m
widget:
- source_sentence: C[C@H](CCCC(C)(C)O)[C@H]1CC[C@H]2[C@@H]3CC=C4C[C@@H](O)CC[C@]4(C)[C@H]3CC[C@]12C
sentences:
- CC(C)n1c(CC[C@@H](O)C[C@@H](O)CC([O-])=O)c(c(c1C(=O)NCc1ccccn1)-c1ccccc1)-c1ccc(F)cc1
- Cc1cc(OCc2ccccc2)cc(C)c1\C=C\[C@@H]1C[C@@H](O)CC(=O)O1
- Cc1ccc(C2CC3CCC2C=C3)n1CC[C@@H]1C[C@@H](O)CC(=O)O1
- source_sentence: CC[C@H](C)C(=O)O[C@H]1C[C@H](C)C=C2C=C[C@H](C)[C@H](CC[C@@H]3C[C@@H](O)CC(=O)O3)[C@@H]12
sentences:
- CC(C)c1c(\C=C\[C@@H](O)C[C@@H](O)CC([O-])=O)c(c(C)n1-c1ccccc1)-c1ccc(F)cc1
- CC(C)c1c(C(=O)Nc2ccccc2)c(c(-c2ccc(F)cc2)n1CC[C@@H](O)C[C@@H](O)CC(=O)NO)-c1ccccc1
- CC(C)c1c(c(c(-c2ccc(F)cc2)n1CC[C@@H](O)C[C@@H](O)CC([O-])=O)-c1ccc(F)cc1)S(=O)(=O)Nc1ccccc1
- source_sentence: CC[C@H](C)C(=O)O[C@H]1CCC=C2C=C[C@H](C)[C@H](CC[C@@H]3C[C@@H](O)CC(=O)O3)[C@@H]12
sentences:
- Cc1cc(C)c(OCC(O)C[C@@H](O)CC([O-])=O)c(c1)C(C1CCCCC1)c1ccc(F)cc1
- CCC(CC)(c1ccccc1)c1ccc(\C=C\[C@@H](O)C[C@@H](O)CC([O-])=O)c(c1)-c1ccccc1F
- CC(C)[C@H](NC(=O)[C@H](Cc1ccc(O)cc1)NC(=O)CNC(=O)[C@H](Cc1ccccc1)NC(=O)CN)C(=O)N[C@@H](C)C(=O)N[C@@H](CCC(O)=O)C(O)=O
- source_sentence: CC(C)c1nc(c(-c2ccc(F)cc2)n1\C=C\[C@H](O)C[C@@H](O)CC([O-])=O)-c1ccc(F)cc1
sentences:
- Cc1ccc(-c2cccc3ccccc23)n1CC[C@@H]1C[C@@H](O)CC(=O)O1
- CCCCC#CC#CCCCCCC(O)=O
- CC(C)c1c(OC[C@@H](O)C[C@@H](O)CC(O)=O)n(nc1C(=O)NCc1ccccc1Cl)-c1ccc(F)cc1
- source_sentence: CCC(CC)(c1ccccc1)c1ccc(\C=C\[C@@H](O)C[C@@H](O)CC([O-])=O)c(c1)-c1ccccc1F
sentences:
- CC(C)c1c(c(c(-c2ccc(F)cc2)n1CC[C@@H](O)C[C@@H](O)CC([O-])=O)-c1ccccc1)S(=O)(=O)N(C)C
- O[C@H](CCn1c(nc(c1-c1ccc(F)cc1)-c1ccc(F)cc1)C(F)(F)F)C[C@@H](O)CC([O-])=O
- Cc1ccc(C(=C(\C=C\[C@@H](O)C[C@@H](O)CC([O-])=O)c2nnnn2C)c2ccc(C)cc2C)c(C)c1
pipeline_tag: sentence-similarity
library_name: sentence-transformers
---
# SentenceTransformer based on google/embeddinggemma-300m
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [google/embeddinggemma-300m](https://huggingface.co/google/embeddinggemma-300m). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for retrieval.
## Model Details
### Model Description
- **Model Type:** Sentence Transformer
- **Base model:** [google/embeddinggemma-300m](https://huggingface.co/google/embeddinggemma-300m)
- **Maximum Sequence Length:** 128 tokens
- **Output Dimensionality:** 768 dimensions
- **Similarity Function:** Cosine Similarity
- **Supported Modality:** Text
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### Full Model Architecture
```
SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'Gemma3TextModel'})
(1): Pooling({'embedding_dimension': 768, 'pooling_mode': 'mean', 'include_prompt': True})
(2): Dense({'in_features': 768, 'out_features': 3072, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity', 'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
(3): Dense({'in_features': 3072, 'out_features': 768, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity', 'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
(4): Normalize({})
)
```
## 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("cafierom/smiles_embedding_gemma_FT")
# Run inference
queries = [
'CCC(CC)(c1ccccc1)c1ccc(\\C=C\\[C@@H](O)C[C@@H](O)CC([O-])=O)c(c1)-c1ccccc1F',
]
documents = [
'Cc1ccc(C(=C(\\C=C\\[C@@H](O)C[C@@H](O)CC([O-])=O)c2nnnn2C)c2ccc(C)cc2C)c(C)c1',
'O[C@H](CCn1c(nc(c1-c1ccc(F)cc1)-c1ccc(F)cc1)C(F)(F)F)C[C@@H](O)CC([O-])=O',
'CC(C)c1c(c(c(-c2ccc(F)cc2)n1CC[C@@H](O)C[C@@H](O)CC([O-])=O)-c1ccccc1)S(=O)(=O)N(C)C',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 768] [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[0.9356, 0.9019, 0.5159]])
```
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 3,396 training samples
* Columns: premise, hypothesis, and label
* Approximate statistics based on the first 100 samples:
| | premise | hypothesis | label |
|:---------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------|
| type | string | string | int |
| modality | text | text | |
| details |
CC[C@H](C)C(=O)O[C@H]1C[C@H](C[C@@H]2C=C[C@H](C)[C@H](CC[C@@H]3C[C@@H](O)CC(=O)O3)[C@@H]12)\C=C\Cc1ccccc1 | Cc1cc(-c2ccc(Cl)cc2)c(\C=C\[C@@H]2C[C@@H](O)CC(=O)O2)c(C)n1 | 2 |
| CC(C)n1c(CC[C@@H](O)C[C@@H](O)CC([O-])=O)c(c(c1C(=O)Nc1ccccc1)-c1ccccc1)-c1ccc(F)cc1 | CC(C)n1c(CC[C@@H](O)C[C@@H](O)CC([O-])=O)c(c(c1C(=O)NCc1ccccn1)-c1ccccc1)-c1ccc(F)cc1 | 0 |
| CC(C)n1c(CC[C@@H](O)C[C@@H](O)CC([O-])=O)c(c(c1C(=O)N(C)C)-c1ccccc1)-c1ccc(F)cc1 | COc1ccc2ccccc2c1-c1ccc(C(C)C)n1CC[C@@H]1C[C@@H](O)CC(=O)O1 | 2 |
* Loss: [SoftmaxLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#softmaxloss) with these parameters:
```json
{
"num_labels": 3,
"concatenation_sent_rep": true,
"concatenation_sent_difference": true,
"concatenation_sent_multiplication": false
}
```
### Evaluation Dataset
#### Unnamed Dataset
* Size: 600 evaluation samples
* Columns: premise, hypothesis, and label
* Approximate statistics based on the first 100 samples:
| | premise | hypothesis | label |
|:---------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------|
| type | string | string | int |
| modality | text | text | |
| details | CNc1cccc(c1)-c1nc(C(C)C)n(\C=C\[C@@H](O)C[C@@H](O)CC([O-])=O)c1-c1ccc(F)cc1 | CC(C)c1c(CC[C@@H](O)C[C@@H](O)CC([O-])=O)c(cn1-c1ccccc1)-c1ccc(F)cc1 | 0 |
| CC(C)c1nc(nc(-c2ccc(F)cc2)c1\C=C\[C@@H]1C[C@@H](O)CC(OCC(Cl)(Cl)Cl)O1)N(C)S(C)(=O)=O | CC(C)c1nn(-c2nc3ccccc3s2)c(c1\C=C\[C@@H](O)C[C@@H](O)CC([O-])=O)-c1ccc(F)cc1 | 2 |
| Cc1c(\C=C\[C@H](O)C[C@@H](O)CC([O-])=O)c(cn1-c1ccccc1)-c1ccc(F)cc1 | C[C@H](CC\C=C(/C)C(O)=O)[C@H]1CC(=O)[C@@]2(C)C3=C(C(=O)C[C@]12C)[C@@]1(C)CCC(=O)[C@@](C)(COC(=O)C[C@@](C)(O)CC(O)=O)[C@@H]1CC3=O | 2 |
* Loss: [SoftmaxLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#softmaxloss) with these parameters:
```json
{
"num_labels": 3,
"concatenation_sent_rep": true,
"concatenation_sent_difference": true,
"concatenation_sent_multiplication": false
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `warmup_steps`: 10
- `optim`: adafactor
- `weight_decay`: 0.01
- `bf16`: True
- `load_best_model_at_end`: True
- `dataloader_pin_memory`: False
#### All Hyperparameters