---
base_model: distilbert/distilroberta-base
library_name: sentence-transformers
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:50881
- loss:TripletLoss
widget:
- source_sentence: How can we reduce fatty thighs?
sentences:
- Is running beneficial for burning thigh and hips fat?
- Do mosquitoes get trapped in spider webs?
- How can I reduce thigh fat?
- source_sentence: What does Balaji Vishwanathan think about the ban of ₹500 and ₹1000
currency notes in India?
sentences:
- What are your views on demonetization of ₹500 & ₹1000 notes in India?
- What is your view on Meenakshi Lekhi, a MP of BJP, suggesting that demonetization
will hurt the common people?
- What are some good horror movies?
- source_sentence: What are your New Years resolutions for 2017?
sentences:
- What are some meaningful new year resolutions for 2017?
- How close are we to world war?
- What are your New Year's resolutions for 2016?
- source_sentence: Which will be the best day of your life?
sentences:
- Can you describe the best moment or the best day in your life?
- How was your day? What did you do today?
- Is it possible to travel time with real life?
- source_sentence: What is the best way to learn to play piano?
sentences:
- How can I learn to play the piano/synthesizer?
- What are the facilities to an IES officer?
- Can I easily learn a piano at a later point if I start learning music with a keyboard
initially?
---
# SentenceTransformer based on distilbert/distilroberta-base
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [distilbert/distilroberta-base](https://huggingface.co/distilbert/distilroberta-base). 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:** [distilbert/distilroberta-base](https://huggingface.co/distilbert/distilroberta-base)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 768 tokens
- **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': 512, 'do_lower_case': False}) with Transformer model: 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("AhmedSSoliman/distilroberta-base-sentence-transformer")
# Run inference
sentences = [
'What is the best way to learn to play piano?',
'How can I learn to play the piano/synthesizer?',
'Can I easily learn a piano at a later point if I start learning music with a keyboard initially?',
]
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]
```
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 50,881 training samples
* Columns: sentence_0
, sentence_1
, and sentence_2
* Approximate statistics based on the first 1000 samples:
| | sentence_0 | sentence_1 | sentence_2 |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string | string |
| details |
What does Donald Trump think of India?
| Donald Trump: What is Donald Trump's take on India? Will it affect Indians?
| How is the presidency of Donald Trump going to affect India's IT industry?
|
| What is the best way to whiten your teeth?
| What can I do to whiten my teeth?
| Can you get teeth whitening even if you have a cavity?
|
| How can we meet to PM Narendra Modi?
| How can I meet Narendra Modi if it's very important?
| How can I contact PM Narendra Modi Ji if I know anyone who may have black money?
|
* Loss: [TripletLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
```json
{
"distance_metric": "TripletDistanceMetric.EUCLIDEAN",
"triplet_margin": 5
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `per_device_train_batch_size`: 16
- `per_device_eval_batch_size`: 16
- `num_train_epochs`: 10
- `multi_dataset_batch_sampler`: round_robin
#### All Hyperparameters