---
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- dense
- generated_from_trainer
- dataset_size:4555
- loss:MultipleNegativesRankingLoss
base_model: sentence-transformers/all-MiniLM-L6-v2
widget:
- source_sentence: Shahid Kapoor was in a film.
sentences:
- In addition to acting in films , Kapoor has sung several of her film songs .
- Two years later , he played a drug abusing singer in the crime drama Udta Punjab
, which won him the Filmfare Critics Award for Best Actor .
- Matthew Paige Damon -LRB- -LSB- ˈdeɪmən -RSB- born October 8 , 1970 -RRB- is an
American actor , film producer , and screenwriter .
- source_sentence: Robert Redford is a performer.
sentences:
- Grey 's Anatomy is an American medical drama television series that premiered
on American Broadcasting Company -LRB- ABC -RRB- as a mid-season replacement on
March 27 , 2005 .
- Charles Robert Redford Jr. -LRB- born August 18 , 1936 -RRB- is an American actor
, director , producer , businessman , environmentalist , and philanthropist .
- 'Redford ''s career began in 1960 as a guest star on numerous TV shows , including
: The Untouchables , Perry Mason , Alfred Hitchcock Presents , and The Twilight
Zone , among others .'
- source_sentence: Boeing 777 planes have two engines.
sentences:
- It is the world 's largest twinjet and has a typical seating capacity of 314 to
396 passengers , with a range of 5240 to .
- Bush married Laura Welch in 1977 and ran unsuccessfully for the House of Representatives
shortly thereafter .
- The Boeing 777 is a family of long-range wide-body twin-engine jet airliners developed
and manufactured by Boeing Commercial Airplanes .
- source_sentence: The Academy Honorary Award was put in place for a prize formerly
named the Special Award.
sentences:
- The Academy Honorary Award -- instituted in 1948 for the 21st Academy Awards -LRB-
previously called the Special Award , which was first presented in early 1929
-RRB- -- is given annually by the Board of Governors of the Academy of Motion
Picture Arts and Sciences -LRB- AMPAS -RRB- to celebrate motion picture achievements
that are not covered by existing Academy Awards , although prior winners of competitive
Academy Awards are not excluded from receiving the Honorary Award .
- In 2011 , Hathaway voiced Jewel in the animated film Rio and hosted the 83rd Academy
Awards with James Franco , which was nominated for a Primetime Emmy Award for
Outstanding Special Class Program .
- The song was performed during the Super Bowl XXXVIII halftime show in 2004 .
- source_sentence: Instagram started supporting videos in 2015.
sentences:
- 'In 2015 , she reprised her role as Lindsay in Wet Hot American Summer for the
Netflix miniseries Wet Hot American Summer : First Day of Camp .'
- Instagram is a mobile , desktop , and internet-based photo-sharing application
and service that allows users to share pictures and videos either publicly or
privately .
- Support for videos was originally launched in June 2013 , and had a 15-second
maximum duration and limited quality , with Instagram later adding support for
widescreen and longer videos .
pipeline_tag: sentence-similarity
library_name: sentence-transformers
---
# SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, classification, clustering, and more.
## Model Details
### Model Description
- **Model Type:** Sentence Transformer
- **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
- **Maximum Sequence Length:** 256 tokens
- **Output Dimensionality:** 384 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': 'BertModel'})
(1): Pooling({'embedding_dimension': 384, 'pooling_mode': 'mean', 'include_prompt': True})
(2): 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("sentence_transformers_model_id")
# Run inference
sentences = [
'Instagram started supporting videos in 2015.',
'Support for videos was originally launched in June 2013 , and had a 15-second maximum duration and limited quality , with Instagram later adding support for widescreen and longer videos .',
'Instagram is a mobile , desktop , and internet-based photo-sharing application and service that allows users to share pictures and videos either publicly or privately .',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.8020, 0.5034],
# [0.8020, 1.0000, 0.5358],
# [0.5034, 0.5358, 1.0000]])
```
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 4,555 training samples
* Columns: sentence_0, sentence_1, and sentence_2
* Approximate statistics based on the first 100 samples:
| | sentence_0 | sentence_1 | sentence_2 |
|:---------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | string | string |
| modality | text | text | text |
| details |
Grace Jones performed in 1984 film Conan the Destroyer. | In 1984 she made her first mainstream appearance as Zula in the fantasy-action film Conan the Destroyer alongside Arnold Schwarzenegger and Sarah Douglas , and subsequently appeared in the 1985 James Bond movie A View to a Kill as May Day . | In 2008 , he played Henry `` Mutt Williams '' Jones III in Indiana Jones and the Kingdom of the Crystal Skull , the fourth film in the Indiana Jones franchise . |
| Pornhub is a website for pornography. | Pornhub is a pornographic video sharing website and the largest pornography site on the Internet . | There are contanious -LSB- sic -RSB- sexual scenes , abusive words , audio pornography and a bit sensitive touch about one particular section of society '' . |
| The Beatles were an English soccer team. | In 2008 , the group topped Billboard magazine 's list of the all-time most successful `` Hot 100 '' artists ; , they hold the record for most number-one hits on the Hot 100 chart with twenty . | The Beatles were an English rock band formed in Liverpool in 1960 . |
* Loss: [MultipleNegativesRankingLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim",
"gather_across_devices": false,
"directions": [
"query_to_doc"
],
"partition_mode": "joint",
"hardness_mode": null,
"hardness_strength": 0.0
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `per_device_train_batch_size`: 32
- `per_device_eval_batch_size`: 32
- `multi_dataset_batch_sampler`: round_robin
#### All Hyperparameters