---
base_model: sentence-transformers/multi-qa-MiniLM-L6-cos-v1
library_name: sentence-transformers
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:44072
- loss:MultipleNegativesRankingLoss
widget:
- source_sentence: Men
sentences:
- Casual
- Spring
- Navy Blue
- Carlton London Men Navy Blue Shoes
- Footwear
- Casual Shoes
- Shoes
- source_sentence: Men
sentences:
- Winter
- Black
- Casual
- Accessories
- United Colors of Benetton Men Black Sunglasses
- Eyewear
- Sunglasses
- source_sentence: Women
sentences:
- Casual Shoes
- Purple
- Casual
- Footwear
- Summer
- ADIDAS Neo Women Renewal Purple Shoes
- Shoes
- source_sentence: Men
sentences:
- Wallets
- Summer
- Accessories
- Brown
- Formal
- Peter England Men Statements Brown Wallet
- Wallets
- source_sentence: Men
sentences:
- Yellow
- Apparel
- Topwear
- Peter England Men Stripes Yellow Polo T-Shirt
- Tshirts
- Fall
- Casual
license: mit
datasets:
- MohamedAshraf701/Products-Details
language:
- en
new_version: MohamedAshraf701/multi-qa-MiniLM-L6-cos-v1-products
---
# SentenceTransformer based on MohamedAshraf701/multi-qa-MiniLM-L6-cos-v1-products
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/multi-qa-MiniLM-L6-cos-v1](https://huggingface.co/sentence-transformers/multi-qa-MiniLM-L6-cos-v1). It maps sentences & paragraphs to a 384-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/multi-qa-MiniLM-L6-cos-v1](https://huggingface.co/sentence-transformers/multi-qa-MiniLM-L6-cos-v1)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 384 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: BertModel
(1): Pooling({'word_embedding_dimension': 384, '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})
(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("MohamedAshraf701/multi-qa-MiniLM-L6-cos-v1-products")
# Run inference
sentences = [
'Men',
'Apparel',
'Topwear',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 44,072 training samples
* Columns: gender
, masterCategory
, subCategory
, articleType
, baseColour
, season
, usage
, and productDisplayName
* Approximate statistics based on the first 1000 samples:
| | gender | masterCategory | subCategory | articleType | baseColour | season | usage | productDisplayName |
|:--------|:-------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string | string | string | string | string | string | string |
| details |
Women
| Footwear
| Shoes
| Heels
| Gold
| Summer
| Casual
| Enroute Women Gold Flats
|
| Men
| Accessories
| Belts
| Belts
| Black
| Fall
| Casual
| Wrangler Textured Men Black Belts
|
| Men
| Footwear
| Shoes
| Sports Shoes
| Grey
| Fall
| Sports
| Nike Men Air Max+ 2011 Grey Sports Shoes
|
* 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
- `per_device_train_batch_size`: 128
- `per_device_eval_batch_size`: 128
- `num_train_epochs`: 20
- `multi_dataset_batch_sampler`: round_robin
#### All Hyperparameters