---
base_model: SQAI/streetlight_sql_embedding
datasets: []
language:
- en
library_name: sentence-transformers
license: apache-2.0
metrics:
- cosine_accuracy@1
- cosine_accuracy@3
- cosine_accuracy@5
- cosine_accuracy@10
- cosine_precision@1
- cosine_precision@3
- cosine_precision@5
- cosine_precision@10
- cosine_recall@1
- cosine_recall@3
- cosine_recall@5
- cosine_recall@10
- cosine_ndcg@10
- cosine_mrr@10
- cosine_map@100
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:2161
- loss:MatryoshkaLoss
- loss:MultipleNegativesRankingLoss
widget:
- source_sentence: longitude of streetlight
sentences:
- '"What is the recent status of the streetlight at the given longitude, considering
the current overload conditions?"'
- '"Has there been any recent failure in the metering components of the streetlights
affecting data reporting, and was the control mode switch identifier used for
the changes?"'
- '"Can you tell me when was the most recent instance when the current exceeded
the safe operating threshold, causing a streetlight failure?"'
- source_sentence: Ambient light level detected by the streetlight, measured in lux
sentences:
- '"What is the count of how many times the most recent streetlight failure has
been switched on before the error occurred?"'
- '"What is the recent data on maximum load current indicating potential risk and
any recent communication issues with the lux sensors?"'
- '"What is the recent dimming schedule applied, the detected ambient light level
in lux, and were there any recent issues or failures with the driver of the streetlight?"'
- source_sentence: Timestamp of the latest data recorded or action performed by the
streetlight
sentences:
- '"What is the recent failure rate of the relay responsible for operating the DALI
dimming protocol in our streetlights?"'
- '"Can you provide the recent instances where the current drawn by the streetlights
was lower than expected, sorted by the unique streetlight identifier and street
name?"'
- '"What was the most recent threshold level set to stop recording flickering events
using the SIM card code in the streetlight?"'
- source_sentence: Current exceeds the safe operating threshold for the streetlight
(failure)
sentences:
- '"What is the hardware version of the recent streetlight experiencing faults in
its lux module affecting light level sensing and control?"'
- '"Can you provide the recent instances where the current drawn by the streetlights
was lower than expected, sorted by the unique streetlight identifier and street
name?"'
- '"Can you identify the most recent instance when the power under load was higher
than normal, possibly indicating inefficiency or a fault, and concurrently, the
voltage exceeded the safe operating levels for the streetlights?"'
- source_sentence: Voltage supplied is below the safe operating level for the streetlight
(failure)
sentences:
- '"What is the recent AC voltage supply to the streetlight and the SIM card code
used for its cellular network communication?"'
- '"What was the most recent threshold level set to stop recording flickering events
using the SIM card code in the streetlight?"'
- '"What is the most recent internal temperature reading for the operating conditions
of the streetlight?"'
model-index:
- name: BGE base Financial Matryoshka
results:
- task:
type: information-retrieval
name: Information Retrieval
dataset:
name: dim 768
type: dim_768
metrics:
- type: cosine_accuracy@1
value: 0.004149377593360996
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.02074688796680498
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 0.04149377593360996
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 0.06224066390041494
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.004149377593360996
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.006915629322268326
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.008298755186721992
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.006224066390041493
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.004149377593360996
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.02074688796680498
name: Cosine Recall@3
- type: cosine_recall@5
value: 0.04149377593360996
name: Cosine Recall@5
- type: cosine_recall@10
value: 0.06224066390041494
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.028846821098581887
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.018665612856484225
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.024320046307682447
name: Cosine Map@100
- task:
type: information-retrieval
name: Information Retrieval
dataset:
name: dim 512
type: dim_512
metrics:
- type: cosine_accuracy@1
value: 0.004149377593360996
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.02074688796680498
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 0.04149377593360996
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 0.06224066390041494
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.004149377593360996
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.006915629322268326
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.008298755186721992
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.006224066390041493
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.004149377593360996
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.02074688796680498
name: Cosine Recall@3
- type: cosine_recall@5
value: 0.04149377593360996
name: Cosine Recall@5
- type: cosine_recall@10
value: 0.06224066390041494
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.028846821098581887
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.018665612856484225
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.024320046307682447
name: Cosine Map@100
- task:
type: information-retrieval
name: Information Retrieval
dataset:
name: dim 256
type: dim_256
metrics:
- type: cosine_accuracy@1
value: 0.008298755186721992
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.02074688796680498
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 0.04149377593360996
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 0.058091286307053944
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.008298755186721992
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.006915629322268326
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.008298755186721992
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.0058091286307053935
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.008298755186721992
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.02074688796680498
name: Cosine Recall@3
- type: cosine_recall@5
value: 0.04149377593360996
name: Cosine Recall@5
- type: cosine_recall@10
value: 0.058091286307053944
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.02917470145123319
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.020424158598432458
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.02622693528356527
name: Cosine Map@100
- task:
type: information-retrieval
name: Information Retrieval
dataset:
name: dim 128
type: dim_128
metrics:
- type: cosine_accuracy@1
value: 0.008298755186721992
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.02074688796680498
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 0.03734439834024896
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 0.05394190871369295
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.008298755186721992
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.006915629322268326
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.007468879668049794
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.005394190871369295
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.008298755186721992
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.02074688796680498
name: Cosine Recall@3
- type: cosine_recall@5
value: 0.03734439834024896
name: Cosine Recall@5
- type: cosine_recall@10
value: 0.05394190871369295
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.027438863848135625
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.019311071593229267
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.02603525046406888
name: Cosine Map@100
- task:
type: information-retrieval
name: Information Retrieval
dataset:
name: dim 64
type: dim_64
metrics:
- type: cosine_accuracy@1
value: 0.008298755186721992
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.012448132780082987
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 0.029045643153526972
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 0.05394190871369295
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.008298755186721992
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.004149377593360996
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.005809128630705394
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.005394190871369295
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.008298755186721992
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.012448132780082987
name: Cosine Recall@3
- type: cosine_recall@5
value: 0.029045643153526972
name: Cosine Recall@5
- type: cosine_recall@10
value: 0.05394190871369295
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.025512460997908278
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.017038793387341104
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.02259750227693111
name: Cosine Map@100
---
# BGE base Financial Matryoshka
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [SQAI/streetlight_sql_embedding](https://huggingface.co/SQAI/streetlight_sql_embedding). 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:** [SQAI/streetlight_sql_embedding](https://huggingface.co/SQAI/streetlight_sql_embedding)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 384 tokens
- **Similarity Function:** Cosine Similarity
- **Language:** en
- **License:** apache-2.0
### 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': 384, '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("SQAI/streetlight_sql_embedding2")
# Run inference
sentences = [
'Voltage supplied is below the safe operating level for the streetlight (failure)',
'"What is the recent AC voltage supply to the streetlight and the SIM card code used for its cellular network communication?"',
'"What was the most recent threshold level set to stop recording flickering events using the SIM card code in the streetlight?"',
]
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]
```
## Evaluation
### Metrics
#### Information Retrieval
* Dataset: `dim_768`
* Evaluated with [InformationRetrievalEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| cosine_accuracy@1 | 0.0041 |
| cosine_accuracy@3 | 0.0207 |
| cosine_accuracy@5 | 0.0415 |
| cosine_accuracy@10 | 0.0622 |
| cosine_precision@1 | 0.0041 |
| cosine_precision@3 | 0.0069 |
| cosine_precision@5 | 0.0083 |
| cosine_precision@10 | 0.0062 |
| cosine_recall@1 | 0.0041 |
| cosine_recall@3 | 0.0207 |
| cosine_recall@5 | 0.0415 |
| cosine_recall@10 | 0.0622 |
| cosine_ndcg@10 | 0.0288 |
| cosine_mrr@10 | 0.0187 |
| **cosine_map@100** | **0.0243** |
#### Information Retrieval
* Dataset: `dim_512`
* Evaluated with [InformationRetrievalEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| cosine_accuracy@1 | 0.0041 |
| cosine_accuracy@3 | 0.0207 |
| cosine_accuracy@5 | 0.0415 |
| cosine_accuracy@10 | 0.0622 |
| cosine_precision@1 | 0.0041 |
| cosine_precision@3 | 0.0069 |
| cosine_precision@5 | 0.0083 |
| cosine_precision@10 | 0.0062 |
| cosine_recall@1 | 0.0041 |
| cosine_recall@3 | 0.0207 |
| cosine_recall@5 | 0.0415 |
| cosine_recall@10 | 0.0622 |
| cosine_ndcg@10 | 0.0288 |
| cosine_mrr@10 | 0.0187 |
| **cosine_map@100** | **0.0243** |
#### Information Retrieval
* Dataset: `dim_256`
* Evaluated with [InformationRetrievalEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| cosine_accuracy@1 | 0.0083 |
| cosine_accuracy@3 | 0.0207 |
| cosine_accuracy@5 | 0.0415 |
| cosine_accuracy@10 | 0.0581 |
| cosine_precision@1 | 0.0083 |
| cosine_precision@3 | 0.0069 |
| cosine_precision@5 | 0.0083 |
| cosine_precision@10 | 0.0058 |
| cosine_recall@1 | 0.0083 |
| cosine_recall@3 | 0.0207 |
| cosine_recall@5 | 0.0415 |
| cosine_recall@10 | 0.0581 |
| cosine_ndcg@10 | 0.0292 |
| cosine_mrr@10 | 0.0204 |
| **cosine_map@100** | **0.0262** |
#### Information Retrieval
* Dataset: `dim_128`
* Evaluated with [InformationRetrievalEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
| Metric | Value |
|:--------------------|:----------|
| cosine_accuracy@1 | 0.0083 |
| cosine_accuracy@3 | 0.0207 |
| cosine_accuracy@5 | 0.0373 |
| cosine_accuracy@10 | 0.0539 |
| cosine_precision@1 | 0.0083 |
| cosine_precision@3 | 0.0069 |
| cosine_precision@5 | 0.0075 |
| cosine_precision@10 | 0.0054 |
| cosine_recall@1 | 0.0083 |
| cosine_recall@3 | 0.0207 |
| cosine_recall@5 | 0.0373 |
| cosine_recall@10 | 0.0539 |
| cosine_ndcg@10 | 0.0274 |
| cosine_mrr@10 | 0.0193 |
| **cosine_map@100** | **0.026** |
#### Information Retrieval
* Dataset: `dim_64`
* Evaluated with [InformationRetrievalEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| cosine_accuracy@1 | 0.0083 |
| cosine_accuracy@3 | 0.0124 |
| cosine_accuracy@5 | 0.029 |
| cosine_accuracy@10 | 0.0539 |
| cosine_precision@1 | 0.0083 |
| cosine_precision@3 | 0.0041 |
| cosine_precision@5 | 0.0058 |
| cosine_precision@10 | 0.0054 |
| cosine_recall@1 | 0.0083 |
| cosine_recall@3 | 0.0124 |
| cosine_recall@5 | 0.029 |
| cosine_recall@10 | 0.0539 |
| cosine_ndcg@10 | 0.0255 |
| cosine_mrr@10 | 0.017 |
| **cosine_map@100** | **0.0226** |
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 2,161 training samples
* Columns: positive
and anchor
* Approximate statistics based on the first 1000 samples:
| | positive | anchor |
|:--------|:---------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | string |
| details |
Lower lux level below which additional lighting may be necessary
| "What are the recent faults found in the lux module that affect light level control, in relation to the default dimming level of the streetlights and the control mode switch identifier used for changing settings?"
|
| Current dimming level of the streetlight in operation
| "Can the operator managing the streetlights provide the most recent update on the streetlight that is currently below the expected range and unable to connect to the network for remote management?"
|
| Upper voltage limit considered safe and efficient for streetlight operation
| "Can you provide any recent potential failures of a streetlight group due to unusually high voltage under load or intermittent flashing, within the southernmost geographic area?"
|
* Loss: [MatryoshkaLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
```json
{
"loss": "MultipleNegativesRankingLoss",
"matryoshka_dims": [
384,
256,
128,
64
],
"matryoshka_weights": [
1,
1,
1,
1
],
"n_dims_per_step": -1
}
```
### Evaluation Dataset
#### Unnamed Dataset
* Size: 241 evaluation samples
* Columns: positive
and anchor
* Approximate statistics based on the first 1000 samples:
| | positive | anchor |
|:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | string |
| details | Timestamp of the latest data recorded or action performed by the streetlight
| "What was the most recent threshold level set to stop recording flickering events using the SIM card code in the streetlight?"
|
| Maximum longitude of the geographic area covered by the group of streetlights
| "What is the recent power usage in watts for the oldest streetlight on the street with maximum longitude?"
|
| Current dimming level of the streetlight in operation
| "What is the most recent dimming level of the streetlight?"
|
* Loss: [MatryoshkaLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
```json
{
"loss": "MultipleNegativesRankingLoss",
"matryoshka_dims": [
384,
256,
128,
64
],
"matryoshka_weights": [
1,
1,
1,
1
],
"n_dims_per_step": -1
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: epoch
- `per_device_train_batch_size`: 32
- `per_device_eval_batch_size`: 16
- `gradient_accumulation_steps`: 16
- `learning_rate`: 1e-05
- `weight_decay`: 0.03
- `num_train_epochs`: 75
- `lr_scheduler_type`: cosine
- `warmup_ratio`: 0.2
- `bf16`: True
- `tf32`: True
- `load_best_model_at_end`: True
- `optim`: adamw_torch_fused
- `batch_sampler`: no_duplicates
#### All Hyperparameters