---
base_model: BAAI/bge-large-en
datasets: []
language: []
library_name: sentence-transformers
metrics:
- cosine_accuracy
- dot_accuracy
- manhattan_accuracy
- euclidean_accuracy
- max_accuracy
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:22604
- loss:MultipleNegativesRankingLoss
widget:
- source_sentence: 23-0125 - Crispr mRNA Fume Hood Installations->Construction->QC
Lab 1218 Fume Hood Install->Electrical - Fume Hood Power/Grounding Terminations
- QC Lab
sentences:
- 'mat-3783s5 : 3783 Seq 5 - Material Order'
- '21-1313-2.0 : Layout Drawings'
- '26-0500-1.0a : Breakers (2P 20A)'
- source_sentence: 23-0125 - Crispr mRNA Fume Hood Installations->Construction->QC
Lab 1218 Fume Hood Install->Electrical - Fume Hood Power/Grounding Terminations
- QC Lab
sentences:
- '26-0500-1.3 : Cabling / Wiring'
- '26-0500-1.0a : Breakers (2P 20A)'
- '23-2000-1.1 : HWR and HWS Pipe, Valves and Fittings'
- source_sentence: 3783 UC Davis (Northern Cal - Jon Sanguinetti)->Seq 5-P-3783
sentences:
- 'mat-3783s8 : 3783 Seq 8 - Material Order'
- 'mat-3783s5 : 3783 Seq 5 - Material Order'
- 'mat-3786s18 : 3786 Seq 18 - Material Order'
- source_sentence: 3786 Rady (Pacific - JD Hudson)->Seq 18-P-3786
sentences:
- '26-0500-1.0a : Breakers (2P 20A)'
- 'dwg-3786s18 : 3786 Seq 18 - Drawings'
- '23-7000-4.0b : EAV-91623'
- source_sentence: 3783 UC Davis (Northern Cal - Jon Sanguinetti)->Seq 18-P-3783
sentences:
- 'mat-3783s5 : 3783 Seq 5 - Material Order'
- 'dwg-3783s8 : 3783 Seq 8 - Drawings'
- 'dwg-3783s18 : 3783 Seq 18 - Drawings'
model-index:
- name: SentenceTransformer based on BAAI/bge-large-en
results:
- task:
type: triplet
name: Triplet
dataset:
name: custom bge dev
type: custom-bge-dev
metrics:
- type: cosine_accuracy
value: 0.9838187702265372
name: Cosine Accuracy
- type: dot_accuracy
value: 0.016181229773462782
name: Dot Accuracy
- type: manhattan_accuracy
value: 0.9838187702265372
name: Manhattan Accuracy
- type: euclidean_accuracy
value: 0.9838187702265372
name: Euclidean Accuracy
- type: max_accuracy
value: 0.9838187702265372
name: Max Accuracy
- task:
type: triplet
name: Triplet
dataset:
name: custom bge test
type: custom-bge-test
metrics:
- type: cosine_accuracy
value: 0.9838187702265372
name: Cosine Accuracy
- type: dot_accuracy
value: 0.016181229773462782
name: Dot Accuracy
- type: manhattan_accuracy
value: 0.9838187702265372
name: Manhattan Accuracy
- type: euclidean_accuracy
value: 0.9838187702265372
name: Euclidean Accuracy
- type: max_accuracy
value: 0.9838187702265372
name: Max Accuracy
---
# SentenceTransformer based on BAAI/bge-large-en
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-large-en](https://huggingface.co./BAAI/bge-large-en). It maps sentences & paragraphs to a 1024-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:** [BAAI/bge-large-en](https://huggingface.co./BAAI/bge-large-en)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 1024 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': True}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, '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("rnbokade/custom-bge")
# Run inference
sentences = [
'3783 UC Davis (Northern Cal - Jon Sanguinetti)->Seq 18-P-3783',
'dwg-3783s18 : 3783 Seq 18 - Drawings',
'mat-3783s5 : 3783 Seq 5 - Material Order',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```
## Evaluation
### Metrics
#### Triplet
* Dataset: `custom-bge-dev`
* Evaluated with [TripletEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
| Metric | Value |
|:-------------------|:-----------|
| cosine_accuracy | 0.9838 |
| dot_accuracy | 0.0162 |
| manhattan_accuracy | 0.9838 |
| euclidean_accuracy | 0.9838 |
| **max_accuracy** | **0.9838** |
#### Triplet
* Dataset: `custom-bge-test`
* Evaluated with [TripletEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
| Metric | Value |
|:-------------------|:-----------|
| cosine_accuracy | 0.9838 |
| dot_accuracy | 0.0162 |
| manhattan_accuracy | 0.9838 |
| euclidean_accuracy | 0.9838 |
| **max_accuracy** | **0.9838** |
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 22,604 training samples
* Columns: anchor
, positive
, and negative
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string | string |
| details |
MOD 1- Metal Decking - Floor
Stud Wall Panels
Floor Sheathing (Megaboard) Layout of Dirtt Frame Centerlines
| EW1001-125 : Door Slabs / Frames / Hardware
| dwg-3783s16 : 3783 Seq 16 - Drawings
|
| MOD 1- Metal Decking - Floor
Stud Wall Panels
Floor Sheathing (Megaboard) Layout of Dirtt Frame Centerlines
| EW1001-125 : Door Slabs / Frames / Hardware
| mat-3783s16 : 3783 Seq 16 - Material Order
|
| MOD 1- Metal Decking - Floor
Stud Wall Panels
Floor Sheathing (Megaboard) Layout of Dirtt Frame Centerlines
| EW1001-125 : Door Slabs / Frames / Hardware
| dwg-3786s292 : 3786 Seq 292 - Drawings
|
* 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: 618 evaluation samples
* Columns: anchor
, positive
, and negative
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | string | string |
| details | 23-0125 - Crispr mRNA Fume Hood Installations->Construction->QC Lab 1218 Fume Hood Install->Electrical - Fume Hood Power/Grounding Terminations - QC Lab
| 26-0500-1.0 : Breakers (3P 20A)
| dwg-3786s17 : 3786 Seq 17 - Drawings
|
| 23-0125 - Crispr mRNA Fume Hood Installations->Construction->QC Lab 1218 Fume Hood Install->Electrical - Fume Hood Power/Grounding Terminations - QC Lab
| 26-0500-1.0 : Breakers (3P 20A)
| mat-3786s17 : 3786 Seq 17 - Material Order
|
| 23-0125 - Crispr mRNA Fume Hood Installations->Construction->QC Lab 1218 Fume Hood Install->Electrical - Fume Hood Power/Grounding Terminations - QC Lab
| 26-0500-1.0 : Breakers (3P 20A)
| 09-9000-2.0 : Paint and Coatings
|
* 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`: 1
- `warmup_ratio`: 0.1
- `fp16`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters