---
language: []
library_name: sentence-transformers
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:101762
- loss:TripletLoss
base_model: sentence-transformers/distiluse-base-multilingual-cased-v2
datasets: []
widget:
- source_sentence: How do I clean the screen of my Toshiba TV?
sentences:
- How can I clear screen overlay from my Samsung Galaxy 6?
- Why do police forces exist?
- What is the best way to clean a flat screen monitor?
- source_sentence: What was the first video you watched on YouTube?
sentences:
- What was the first Youtube video you ever watched?
- What was the first music video ever produced?
- What was the long term effect of Hitler's desire to exterminate the Jewish people?
- source_sentence: What should I do to recover my data from a hard disk?
sentences:
- How do I recover my deleted data files from a hard disk?
- What's the best Linux operating System distro for beginners?
- Formated Data Recovery – Recover Data from Memory Card, Disk Drive, USB, External
Drive?
- source_sentence: What are your personal top ten music albums of all time?
sentences:
- What are your top 10 favourite songs of all time?
- What are the Top 10 music albums of all time on your list?
- What stream should I take in 11th if I have to become an automobile engineer?
- source_sentence: What is the best website to learn coding independently?
sentences:
- What are some of the best website to learn programming from being a total beginner?
- What books do I need to read to learn more about Sufism?
- What is the best (and fastest) way to learn how to code (web development)?
pipeline_tag: sentence-similarity
---
# SentenceTransformer based on sentence-transformers/distiluse-base-multilingual-cased-v2
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/distiluse-base-multilingual-cased-v2](https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased-v2). 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:** [sentence-transformers/distiluse-base-multilingual-cased-v2](https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased-v2)
- **Maximum Sequence Length:** 256 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': 256, 'do_lower_case': False}) with Transformer model: DistilBertModel
(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("chibao24/distilroberta-base-sentence-transformer-triplets")
# Run inference
sentences = [
'What is the best website to learn coding independently?',
'What are some of the best website to learn programming from being a total beginner?',
'What is the best (and fastest) way to learn how to code (web development)?',
]
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: 101,762 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 are the differences between "be made of" and "be made from"?
| What's the difference between "made of" and "made from"?
| What is the difference between make and craft?
|
| How can we use the word "inertia" in a sentence?
| How can the word "inertia" be used in a sentence?
| What is inertia actually?
|
| Who are the new (i.e. first-time) Top Question Writers for 2017?
| Who are the top question writers for 2017?
| Who are the 2016 Top Writers?
|
* 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`: 128
- `per_device_eval_batch_size`: 128
- `num_train_epochs`: 4
- `multi_dataset_batch_sampler`: round_robin
#### All Hyperparameters