---
base_model: whaleloops/phrase-bert
library_name: sentence-transformers
metrics:
- pearson_cosine
- spearman_cosine
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:100000
- loss:CosineSimilarityLoss
widget:
- source_sentence: 'RT @AnfieldBond: Xherdan Shaqiri, who has been linked with a summer
move to Liverpool, has just scored a hat-trick against Honduras. #LFC'
sentences:
- Honduras is fucking it up for ecuador
- Some strike Shakira. Just need a couple more one from Honduras.
- "RT @2014WorIdCup: HALF TIME: France and Ecuador 0-0. \nSwitzerland leads Honduras\
\ 2-0."
- source_sentence: Yall watching the Honduras game when im watching france😂😂 Honduras
poo
sentences:
- 'I’m following Honduras versus Switzerland in the FIFA Global Stadium #HONSUI
#worldcup #joinin'
- 'RT @SportsCenter: That''s it for Group E! France wins group after 0-0 tie, Switzerland
advances thanks to 3-0 win. Ecuador and Honduras are …'
- 'RT @worldsoccershop: HAT TRICK FOR @XS_11official! #HON 0-3 #SUI. #WorldCup2014'
- source_sentence: 'RT @rffuk: Xherdan Shaqiri just scored this absolute wonder goal
to put #SWI 1-0 ahead v #HON. What a strike son! https://t.co/vHuIPCucpV'
sentences:
- 'RT @trueSCRlife: If #Shaqiri scores vs #HON we''ll give away a pair of Magistas.
Follow & RT to enter. Winner DMed! #HONvsSUI http://t.co/EG…'
- 'RT @soccerdotcom: Los Catrachos! Follow @soccerdotcom and RT for the chance to
win a Joma #HON Jersey signed by the team! http://t.co/2NTfw…'
- 'Shaqiri has 2 goals in the first half! Can he score the first hat trick of the
#WorldCup? #HON #SUI http://t.co/M21zGv0qw4'
- source_sentence: Honduras copped the fendi
sentences:
- 'RT @worldsoccershop: If #Costly scores for #HON we''ll give away a pair of adidas
#Nitrocharge. Follow & RT to enter! #allin or nothing. htt…'
- '#SUI get a second against #HON. Shaqiri scores once again!
#iMOTM?'
- 'RT @soccerdotcom: Los Catrachos! Follow @soccerdotcom and RT for the chance to
win a Joma #HON Jersey signed by the team! http://t.co/2NTfw…'
- source_sentence: Honduras is technically still in the World Cup and Italy plus England
are out means Honduras is better than them😂
sentences:
- wtf Honduras has to win 😩
- 'Honduras still better than the #CGHS JV Female Soccer Team 😂😂'
- 'RT @iambolar: FT:Honduras 0-3 Switzerland. Shaqiri nets d 50th hat trick in #WorldCup
history as Switzerland qualify 4d next round. http://…'
model-index:
- name: SentenceTransformer based on whaleloops/phrase-bert
results:
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: validation
type: validation
metrics:
- type: pearson_cosine
value: 0.14803022870400553
name: Pearson Cosine
- type: spearman_cosine
value: 0.1536611594776976
name: Spearman Cosine
---
# SentenceTransformer based on whaleloops/phrase-bert
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [whaleloops/phrase-bert](https://huggingface.co/whaleloops/phrase-bert). 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:** [whaleloops/phrase-bert](https://huggingface.co/whaleloops/phrase-bert)
- **Maximum Sequence Length:** 128 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': 128, 'do_lower_case': None}) with Transformer model: BertModel
(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("peulsilva/sentence-transformer-trained-tweet")
# Run inference
sentences = [
'Honduras is technically still in the World Cup and Italy plus England are out means Honduras is better than them😂',
'RT @iambolar: FT:Honduras 0-3 Switzerland. Shaqiri nets d 50th hat trick in #WorldCup history as Switzerland qualify 4d next round. http://…',
'Honduras still better than the #CGHS JV Female Soccer Team 😂😂',
]
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
#### Semantic Similarity
* Dataset: `validation`
* Evaluated with [EmbeddingSimilarityEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| pearson_cosine | 0.148 |
| **spearman_cosine** | **0.1537** |
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 100,000 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 |
Early lead for #SUI over #HON thanks to Shaqiri taking a page out of Robben's book. He paid attention during Bayern practices. #ShaqAttaq ⚽️
| RT @soccerdotcom: Los Catrachos! Follow @soccerdotcom and RT for the chance to win a Joma #HON Jersey signed by the team! http://t.co/2NTfw…
| 0.0
|
| RT @RTEsoccer: Group E result: #HON 0-3 #SUI. Shaqiri the hat-trick hero as the Swiss progress: http://t.co/fZYw9NFghO #rteworldcup http://…
| RT @trueSCRlife: If #Shaqiri scores vs #HON we'll give away a pair of Magistas. Follow & RT to enter. Winner DMed! #HONvsSUI http://t.co/EG…
| 1.0
|
| RT @TheSCRLife: If #HON wins we’ll give away a pair of Superflys. FOLLOW & RETWEET. Not following?Won’t win. (I’m checking). http://t.co/xw…
| Yup Honduras say goodbye lll
| 0.0
|
* 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`: 128
- `per_device_eval_batch_size`: 128
- `num_train_epochs`: 1
- `fp16`: True
- `multi_dataset_batch_sampler`: round_robin
#### All Hyperparameters