---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:10053
- loss:MultipleNegativesRankingLoss
base_model: allenai/specter2_base
widget:
- source_sentence: Fluorescence quenching of tryptophan residues
sentences:
- 'Fluorescence of buried tyrosine residues in proteins. '
- 'A fluorescence quenching study of tryptophanyl residues of (Ca2+ + Mg2+)-ATPase
from sarcoplasmic reticulum. '
- 'Some hormonal influences on the acetylation of sulfanilamide in vivo. '
- source_sentence: Human migration to the Americas
sentences:
- 'Homo sapiens in the Americas. Overview of the earliest human expansion in the
New World. '
- 'Profiles of College Drinkers Defined by Alcohol Behaviors at the Week Level:
Replication Across Semesters and Prospective Associations With Hazardous Drinking
and Dependence-Related Symptoms. '
- 'Human migration. '
- source_sentence: Human Mobility Prediction
sentences:
- 'Human mobility prediction from region functions with taxi trajectories. '
- 'Understanding Human Mobility from Twitter. '
- 'Ovarian cancer gene therapy using HPV-16 pseudovirion carrying the HSV-tk gene. '
- source_sentence: Nevirapine Resistance
sentences:
- 'Nevirapine toxicity. '
- 'Recognizing rhenium. '
- 'Update on nevirapine: quest for a niche. '
- source_sentence: EHL tendon reconstruction
sentences:
- 'A Combined Surgical Approach for Extensor Hallucis Longus Reconstruction: Two
Case Reports. '
- 'Flexor tendon reconstruction. '
- 'Noble gases and neuroprotection: summary of current evidence. '
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- cosine_accuracy
- dot_accuracy
- manhattan_accuracy
- euclidean_accuracy
- max_accuracy
model-index:
- name: SentenceTransformer based on allenai/specter2_base
results:
- task:
type: triplet
name: Triplet
dataset:
name: triplet dev
type: triplet-dev
metrics:
- type: cosine_accuracy
value: 0.573
name: Cosine Accuracy
- type: dot_accuracy
value: 0.455
name: Dot Accuracy
- type: manhattan_accuracy
value: 0.576
name: Manhattan Accuracy
- type: euclidean_accuracy
value: 0.577
name: Euclidean Accuracy
- type: max_accuracy
value: 0.577
name: Max Accuracy
---
# SentenceTransformer based on allenai/specter2_base
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [allenai/specter2_base](https://huggingface.co/allenai/specter2_base) on the json 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:** [allenai/specter2_base](https://huggingface.co/allenai/specter2_base)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 768 tokens
- **Similarity Function:** Cosine Similarity
- **Training Dataset:**
- json
### 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': 512, 'do_lower_case': False}) with Transformer model: PeftModelForFeatureExtraction
(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("sentence_transformers_model_id")
# Run inference
sentences = [
'EHL tendon reconstruction',
'A Combined Surgical Approach for Extensor Hallucis Longus Reconstruction: Two Case Reports. ',
'Flexor tendon reconstruction. ',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```
## Evaluation
### Metrics
#### Triplet
* Dataset: `triplet-dev`
* Evaluated with [TripletEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
| Metric | Value |
|:--------------------|:----------|
| **cosine_accuracy** | **0.573** |
| dot_accuracy | 0.455 |
| manhattan_accuracy | 0.576 |
| euclidean_accuracy | 0.577 |
| max_accuracy | 0.577 |
## Training Details
### Training Dataset
#### json
* Dataset: json
* Size: 10,053 training samples
* Columns: anchor
, positive
, and negative
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string | string |
| details |
COM-induced secretome changes in U937 monocytes
| Characterization of calcium oxalate crystal-induced changes in the secretome of U937 human monocytes.
| Monocytes.
|
| Metamaterials
| Sound attenuation optimization using metaporous materials tuned on exceptional points.
| Metamaterials: A cat's eye for all directions.
|
| Pediatric Parasitology
| Parasitic infections among school age children 6 to 11-years-of-age in the Eastern province.
| [DIALOGUE ON PEDIATRIC PARASITOLOGY].
|
* Loss: [MultipleNegativesRankingLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: steps
- `per_device_train_batch_size`: 512
- `per_device_eval_batch_size`: 512
- `learning_rate`: 0.001
- `num_train_epochs`: 1
- `lr_scheduler_type`: cosine_with_restarts
- `warmup_ratio`: 0.1
- `bf16`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters