---
base_model: sentence-transformers/all-mpnet-base-v2
library_name: sentence-transformers
metrics:
- pearson_cosine
- spearman_cosine
- pearson_manhattan
- spearman_manhattan
- pearson_euclidean
- spearman_euclidean
- pearson_dot
- spearman_dot
- pearson_max
- spearman_max
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:23863
- loss:MultipleNegativesRankingLoss
widget:
- source_sentence: SFP+ 10GBase-SR 10 Gigabit Ethernet Optics, 850nm for up to 300m
transmission on MMF
sentences:
- Software
- Data Voice or Multimedia Network Equipment or Platforms and Accessories
- Components for information technology or broadcasting or telecommunications
- source_sentence: Apple Macbook Pro Retina 15.4 inch Intel Core i7 2.5GHz 16GB 512GB
SSD MJLT2TU/A
sentences:
- Consumer electronics
- Office supply
- Computer Equipment and Accessories
- source_sentence: Switch and Route Processing Unit A5(Including 1*2G Memory and 1*1G
CF Card)
sentences:
- Data Voice or Multimedia Network Equipment or Platforms and Accessories
- Components for information technology or broadcasting or telecommunications
- Consumer electronics
- source_sentence: Samsung Gear VR R325
sentences:
- Computer Equipment and Accessories
- Data Voice or Multimedia Network Equipment or Platforms and Accessories
- Communications Devices and Accessories
- source_sentence: SUN.Sun Fire T1000 Server, 6 core, 1.0GHz UltraSPARC T1 processor,
4GB DDR2 memory (4 * 1GB DIMMs), 160 SATA hard disk drive.
sentences:
- Computer Equipment and Accessories
- Communications Devices and Accessories
- Domestic appliances
model-index:
- name: SentenceTransformer based on sentence-transformers/all-mpnet-base-v2
results:
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: Unknown
type: unknown
metrics:
- type: pearson_cosine
value: .nan
name: Pearson Cosine
- type: spearman_cosine
value: .nan
name: Spearman Cosine
- type: pearson_manhattan
value: .nan
name: Pearson Manhattan
- type: spearman_manhattan
value: .nan
name: Spearman Manhattan
- type: pearson_euclidean
value: .nan
name: Pearson Euclidean
- type: spearman_euclidean
value: .nan
name: Spearman Euclidean
- type: pearson_dot
value: .nan
name: Pearson Dot
- type: spearman_dot
value: .nan
name: Spearman Dot
- type: pearson_max
value: .nan
name: Pearson Max
- type: spearman_max
value: .nan
name: Spearman Max
---
# SentenceTransformer based on sentence-transformers/all-mpnet-base-v2
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-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/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)
- **Maximum Sequence Length:** 384 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': 384, 'do_lower_case': False}) with Transformer model: MPNetModel
(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})
(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("alpcansoydas/product-model-17.10.24-ifhavemorethan100sampleperfamily")
# Run inference
sentences = [
'SUN.Sun Fire T1000 Server, 6 core, 1.0GHz UltraSPARC T1 processor, 4GB DDR2 memory (4 * 1GB DIMMs), 160 SATA hard disk drive.',
'Computer Equipment and Accessories',
'Communications Devices and Accessories',
]
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
* Evaluated with [EmbeddingSimilarityEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
| Metric | Value |
|:-------------------|:--------|
| pearson_cosine | nan |
| spearman_cosine | nan |
| pearson_manhattan | nan |
| spearman_manhattan | nan |
| pearson_euclidean | nan |
| spearman_euclidean | nan |
| pearson_dot | nan |
| spearman_dot | nan |
| pearson_max | nan |
| **spearman_max** | **nan** |
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 23,863 training samples
* Columns: sentence1
and sentence2
* Approximate statistics based on the first 1000 samples:
| | sentence1 | sentence2 |
|:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
| type | string | string |
| details |
High_Performance_DB_HPE ProLiant DL380 Gen10 8SFF
| Computer Equipment and Accessories
|
| HP PROLIANT DL160 G7 SERVER
| Computer Equipment and Accessories
|
| ZTE 24-port GE SFP Physical Line Interface Unit Z
| Components for information technology or broadcasting or telecommunications
|
* Loss: [MultipleNegativesRankingLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Evaluation Dataset
#### Unnamed Dataset
* Size: 5,114 evaluation samples
* Columns: sentence1
and sentence2
* Approximate statistics based on the first 1000 samples:
| | sentence1 | sentence2 |
|:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
| type | string | string |
| details | Symantec Security Analytics
| Computer Equipment and Accessories
|
| RAU2 X 7/A28 HP Kit HIGH
| Data Voice or Multimedia Network Equipment or Platforms and Accessories
|
| HPE DL360 Gen9 8SFF CTO Server
| Computer Equipment and Accessories
|
* 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
- `eval_strategy`: steps
- `per_device_train_batch_size`: 16
- `per_device_eval_batch_size`: 16
- `num_train_epochs`: 2
- `warmup_ratio`: 0.1
- `fp16`: True
#### All Hyperparameters