---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- dense
- generated_from_trainer
- dataset_size:39308
- loss:CosineSimilarityLoss
base_model: srirangamuc/roberta-dapt-pathology
widget:
- source_sentence: does this image show lymph node, mycobacterium avium-intracellulae
mai?
sentences:
- good example either chest
- 'yes'
- cut surface both testicles on normal and one quite small typical probably due
to mumps
- source_sentence: is the prominent cell in the center field intact?
sentences:
- 'yes'
- 'no'
- cardiovascular
- source_sentence: what is present?
sentences:
- vasculature
- both legs
- hodgkins disease
- source_sentence: does this image show fractures brain which is slide and close-up
view of these fractures is slide?
sentences:
- 'no'
- 'yes'
- 'no'
- source_sentence: is macerated stillborn present?
sentences:
- 'yes'
- islet inflammation
- been to show multiloculated nature
pipeline_tag: sentence-similarity
library_name: sentence-transformers
---
# SentenceTransformer based on srirangamuc/roberta-dapt-pathology
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [srirangamuc/roberta-dapt-pathology](https://huggingface.co/srirangamuc/roberta-dapt-pathology). 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:** [srirangamuc/roberta-dapt-pathology](https://huggingface.co/srirangamuc/roberta-dapt-pathology)
- **Maximum Sequence Length:** 514 tokens
- **Output Dimensionality:** 768 dimensions
- **Similarity Function:** Cosine Similarity
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### Full Model Architecture
```
SentenceTransformer(
(0): Transformer({'max_seq_length': 514, 'do_lower_case': False, 'architecture': 'RobertaModel'})
(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("srirangamuc/pathology-sbert-finetuned")
# Run inference
sentences = [
'is macerated stillborn present?',
'yes',
'been to show multiloculated nature',
]
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.7341, 0.0858],
# [0.7341, 1.0000, 0.1051],
# [0.0858, 0.1051, 1.0000]])
```
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 39,308 training samples
* Columns: sentence_0
, sentence_1
, and label
* Approximate statistics based on the first 1000 samples:
| | sentence_0 | sentence_1 | label |
|:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------|
| type | string | string | float |
| details |
where is this from?
| gastrointestinal system
| 0.9
|
| what is present?
| gastrointestinal
| 0.1
|
| is gastrointestinal present?
| yes
| 0.9
|
* Loss: [CosineSimilarityLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
```json
{
"loss_fct": "torch.nn.modules.loss.MSELoss"
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `per_device_train_batch_size`: 16
- `per_device_eval_batch_size`: 16
- `num_train_epochs`: 1
- `multi_dataset_batch_sampler`: round_robin
#### All Hyperparameters