SentenceTransformer based on BAAI/bge-base-en-v1.5
This is a sentence-transformers model finetuned from BAAI/bge-base-en-v1.5 on the tsdae and sup datasets. 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: BAAI/bge-base-en-v1.5
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 768 tokens
- Similarity Function: Cosine Similarity
- Training Datasets:
Model Sources
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 768, '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:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("federicovolponi/BAAI-bge-base-en-v1.5-space-multitask-tsdae")
sentences = [
'Table of',
' Table 4 offers a description of the selected FoM',
'\n[29] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
Evaluation
Metrics
Information Retrieval
| Metric |
Value |
| cosine_accuracy@5 |
0.8197 |
| cosine_accuracy@10 |
0.8607 |
| cosine_precision@5 |
0.1639 |
| cosine_precision@10 |
0.0861 |
| cosine_recall@5 |
0.8197 |
| cosine_recall@10 |
0.8607 |
| cosine_ndcg@5 |
0.7117 |
| cosine_ndcg@10 |
0.725 |
| cosine_mrr@5 |
0.6753 |
| cosine_mrr@10 |
0.6808 |
| cosine_map@5 |
0.6753 |
| cosine_map@10 |
0.6808 |
Information Retrieval
| Metric |
Value |
| cosine_accuracy@5 |
0.8035 |
| cosine_accuracy@10 |
0.847 |
| cosine_precision@5 |
0.1607 |
| cosine_precision@10 |
0.0847 |
| cosine_recall@5 |
0.8035 |
| cosine_recall@10 |
0.847 |
| cosine_ndcg@5 |
0.6967 |
| cosine_ndcg@10 |
0.7108 |
| cosine_mrr@5 |
0.6608 |
| cosine_mrr@10 |
0.6666 |
| cosine_map@5 |
0.6608 |
| cosine_map@10 |
0.6666 |
Information Retrieval
| Metric |
Value |
| cosine_accuracy@5 |
0.7774 |
| cosine_accuracy@10 |
0.8259 |
| cosine_precision@5 |
0.1555 |
| cosine_precision@10 |
0.0826 |
| cosine_recall@5 |
0.7774 |
| cosine_recall@10 |
0.8259 |
| cosine_ndcg@5 |
0.6732 |
| cosine_ndcg@10 |
0.6891 |
| cosine_mrr@5 |
0.6382 |
| cosine_mrr@10 |
0.6449 |
| cosine_map@5 |
0.6382 |
| cosine_map@10 |
0.6449 |
Information Retrieval
| Metric |
Value |
| cosine_accuracy@5 |
0.8686 |
| cosine_accuracy@10 |
0.9135 |
| cosine_precision@5 |
0.1737 |
| cosine_precision@10 |
0.0913 |
| cosine_recall@5 |
0.8686 |
| cosine_recall@10 |
0.9135 |
| cosine_ndcg@5 |
0.7287 |
| cosine_ndcg@10 |
0.7431 |
| cosine_mrr@5 |
0.6815 |
| cosine_mrr@10 |
0.6874 |
| cosine_map@5 |
0.6815 |
| cosine_map@10 |
0.6874 |
Information Retrieval
| Metric |
Value |
| cosine_accuracy@5 |
0.8558 |
| cosine_accuracy@10 |
0.9071 |
| cosine_precision@5 |
0.1712 |
| cosine_precision@10 |
0.0907 |
| cosine_recall@5 |
0.8558 |
| cosine_recall@10 |
0.9071 |
| cosine_ndcg@5 |
0.7242 |
| cosine_ndcg@10 |
0.7407 |
| cosine_mrr@5 |
0.6801 |
| cosine_mrr@10 |
0.6868 |
| cosine_map@5 |
0.6801 |
| cosine_map@10 |
0.6868 |
Information Retrieval
| Metric |
Value |
| cosine_accuracy@5 |
0.8429 |
| cosine_accuracy@10 |
0.8814 |
| cosine_precision@5 |
0.1686 |
| cosine_precision@10 |
0.0881 |
| cosine_recall@5 |
0.8429 |
| cosine_recall@10 |
0.8814 |
| cosine_ndcg@5 |
0.7221 |
| cosine_ndcg@10 |
0.7351 |
| cosine_mrr@5 |
0.6817 |
| cosine_mrr@10 |
0.6874 |
| cosine_map@5 |
0.6817 |
| cosine_map@10 |
0.6874 |
Training Details
Training Datasets
tsdae
- Dataset: tsdae
- Size: 95,730 training samples
- Columns:
damaged_sentence and orginal_sentence
- Approximate statistics based on the first 1000 samples:
|
damaged_sentence |
orginal_sentence |
| type |
string |
string |
| details |
- min: 3 tokens
- mean: 13.28 tokens
- max: 174 tokens
|
- min: 6 tokens
- mean: 30.02 tokens
- max: 374 tokens
|
- Samples:
| damaged_sentence |
orginal_sentence |
, the described above allows continue this |
However, the modularization into functional units described above allows to continue this idea and form a well-defined functional hierarchy |
Solar scientific military and the stage for Change mission technology improvements—continued advances in will mass/volume |
Solar sails can perform unique scientific, commercial, and military missions, and the stage is set for near-term UPGRADE/REPLACE PAYLOADS • Change of mission • Take advantage of technology improvements—continued advances in electronics will cause payload components to shrink in mass/volume, while capabilities increase |
4mm Hexcell 5052 aluminum honeycomb with 1 |
4mm thick Hexcell 5052 alloy hexagonal aluminum honeycomb with 1 |
- Loss:
losses.WeightedDenoisingAutoEncoderLoss
sup
Evaluation Datasets
tsdae
- Dataset: tsdae
- Size: 10,637 evaluation samples
- Columns:
damaged_sentence and orginal_sentence
- Approximate statistics based on the first 1000 samples:
|
damaged_sentence |
orginal_sentence |
| type |
string |
string |
| details |
- min: 3 tokens
- mean: 13.52 tokens
- max: 182 tokens
|
- min: 5 tokens
- mean: 30.74 tokens
- max: 452 tokens
|
- Samples:
| damaged_sentence |
orginal_sentence |
from providing student licenses the OirthirSAT team |
The authors thank Michael Doherty from Ansys for providing student licenses for STK to the OirthirSAT team |
at 205 |
4 as observed by TROPICS Pathfinder at 205 GHz |
this reason of chemistry needed to radiative heating |
For this reason, careful reexaminations of the chemistry models are needed to reduce the uncertainties in the radiative heating |
- Loss:
losses.WeightedDenoisingAutoEncoderLoss
sup
Training Hyperparameters
Non-Default Hyperparameters
eval_strategy: steps
per_device_train_batch_size: 32
per_device_eval_batch_size: 32
learning_rate: 3e-06
weight_decay: 0.001
num_train_epochs: 6
bf16: True
tf32: False
load_best_model_at_end: True
batch_sampler: no_duplicates
All Hyperparameters
Click to expand
overwrite_output_dir: False
do_predict: False
eval_strategy: steps
prediction_loss_only: True
per_device_train_batch_size: 32
per_device_eval_batch_size: 32
per_gpu_train_batch_size: None
per_gpu_eval_batch_size: None
gradient_accumulation_steps: 1
eval_accumulation_steps: None
learning_rate: 3e-06
weight_decay: 0.001
adam_beta1: 0.9
adam_beta2: 0.999
adam_epsilon: 1e-08
max_grad_norm: 1.0
num_train_epochs: 6
max_steps: -1
lr_scheduler_type: linear
lr_scheduler_kwargs: {}
warmup_ratio: 0.0
warmup_steps: 0
log_level: passive
log_level_replica: warning
log_on_each_node: True
logging_nan_inf_filter: True
save_safetensors: True
save_on_each_node: False
save_only_model: False
restore_callback_states_from_checkpoint: False
no_cuda: False
use_cpu: False
use_mps_device: False
seed: 42
data_seed: None
jit_mode_eval: False
use_ipex: False
bf16: True
fp16: False
fp16_opt_level: O1
half_precision_backend: auto
bf16_full_eval: False
fp16_full_eval: False
tf32: False
local_rank: 0
ddp_backend: None
tpu_num_cores: None
tpu_metrics_debug: False
debug: []
dataloader_drop_last: False
dataloader_num_workers: 0
dataloader_prefetch_factor: None
past_index: -1
disable_tqdm: False
remove_unused_columns: True
label_names: None
load_best_model_at_end: True
ignore_data_skip: False
fsdp: []
fsdp_min_num_params: 0
fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
fsdp_transformer_layer_cls_to_wrap: None
accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
deepspeed: None
label_smoothing_factor: 0.0
optim: adamw_torch
optim_args: None
adafactor: False
group_by_length: False
length_column_name: length
ddp_find_unused_parameters: None
ddp_bucket_cap_mb: None
ddp_broadcast_buffers: False
dataloader_pin_memory: True
dataloader_persistent_workers: False
skip_memory_metrics: True
use_legacy_prediction_loop: False
push_to_hub: False
resume_from_checkpoint: None
hub_model_id: None
hub_strategy: every_save
hub_private_repo: False
hub_always_push: False
gradient_checkpointing: False
gradient_checkpointing_kwargs: None
include_inputs_for_metrics: False
eval_do_concat_batches: True
fp16_backend: auto
push_to_hub_model_id: None
push_to_hub_organization: None
mp_parameters:
auto_find_batch_size: False
full_determinism: False
torchdynamo: None
ray_scope: last
ddp_timeout: 1800
torch_compile: False
torch_compile_backend: None
torch_compile_mode: None
dispatch_batches: None
split_batches: None
include_tokens_per_second: False
include_num_input_tokens_seen: False
neftune_noise_alpha: None
optim_target_modules: None
batch_eval_metrics: False
batch_sampler: no_duplicates
multi_dataset_batch_sampler: proportional
Training Logs
| Epoch |
Step |
Training Loss |
sup loss |
tsdae loss |
dim_256_cosine_map@10 |
dim_512_cosine_map@10 |
dim_768_cosine_map@10 |
| 0.0311 |
100 |
0.1372 |
- |
- |
- |
- |
- |
| 0.0622 |
200 |
0.1061 |
- |
- |
- |
- |
- |
| 0.0932 |
300 |
0.1161 |
- |
- |
- |
- |
- |
| 0.1243 |
400 |
0.0881 |
- |
- |
- |
- |
- |
| 0.1554 |
500 |
0.0878 |
0.2867 |
0.0724 |
0.6238 |
0.6501 |
0.6502 |
| 0.1865 |
600 |
0.0929 |
- |
- |
- |
- |
- |
| 0.2175 |
700 |
0.0979 |
- |
- |
- |
- |
- |
| 0.2486 |
800 |
0.0902 |
- |
- |
- |
- |
- |
| 0.2797 |
900 |
0.0755 |
- |
- |
- |
- |
- |
| 0.3108 |
1000 |
0.0885 |
0.2262 |
0.0714 |
0.6380 |
0.6669 |
0.6639 |
| 0.3418 |
1100 |
0.0854 |
- |
- |
- |
- |
- |
| 0.3729 |
1200 |
0.0975 |
- |
- |
- |
- |
- |
| 0.4040 |
1300 |
0.1104 |
- |
- |
- |
- |
- |
| 0.4351 |
1400 |
0.0829 |
- |
- |
- |
- |
- |
| 0.4661 |
1500 |
0.0846 |
0.1949 |
0.0710 |
0.6529 |
0.6803 |
0.6765 |
| 0.4972 |
1600 |
0.0821 |
- |
- |
- |
- |
- |
| 0.5283 |
1700 |
0.0892 |
- |
- |
- |
- |
- |
| 0.5594 |
1800 |
0.0859 |
- |
- |
- |
- |
- |
| 0.5904 |
1900 |
0.0936 |
- |
- |
- |
- |
- |
| 0.6215 |
2000 |
0.0829 |
0.1703 |
0.0706 |
0.6579 |
0.6837 |
0.6851 |
| 0.6526 |
2100 |
0.0972 |
- |
- |
- |
- |
- |
| 0.6837 |
2200 |
0.0797 |
- |
- |
- |
- |
- |
| 0.7147 |
2300 |
0.0868 |
- |
- |
- |
- |
- |
| 0.7458 |
2400 |
0.0781 |
- |
- |
- |
- |
- |
| 0.7769 |
2500 |
0.0837 |
0.1588 |
0.0704 |
0.6633 |
0.7016 |
0.6915 |
| 0.8080 |
2600 |
0.0778 |
- |
- |
- |
- |
- |
| 0.8390 |
2700 |
0.0873 |
- |
- |
- |
- |
- |
| 0.8701 |
2800 |
0.086 |
- |
- |
- |
- |
- |
| 0.9012 |
2900 |
0.0832 |
- |
- |
- |
- |
- |
| 0.9323 |
3000 |
0.0931 |
0.1502 |
0.0697 |
0.6733 |
0.6951 |
0.6927 |
| 0.9633 |
3100 |
0.0891 |
- |
- |
- |
- |
- |
| 0.9944 |
3200 |
0.0787 |
- |
- |
- |
- |
- |
| 1.0255 |
3300 |
0.0843 |
- |
- |
- |
- |
- |
| 1.0566 |
3400 |
0.0705 |
- |
- |
- |
- |
- |
| 1.0876 |
3500 |
0.0808 |
0.1484 |
0.0686 |
0.6782 |
0.6880 |
0.6824 |
| 1.1187 |
3600 |
0.0754 |
- |
- |
- |
- |
- |
| 1.1498 |
3700 |
0.0714 |
- |
- |
- |
- |
- |
| 1.1809 |
3800 |
0.0734 |
- |
- |
- |
- |
- |
| 1.2119 |
3900 |
0.0732 |
- |
- |
- |
- |
- |
| 1.2430 |
4000 |
0.0702 |
0.1508 |
0.0679 |
0.6674 |
0.6803 |
0.6770 |
| 1.2741 |
4100 |
0.0712 |
- |
- |
- |
- |
- |
| 1.3052 |
4200 |
0.0719 |
- |
- |
- |
- |
- |
| 1.3362 |
4300 |
0.0744 |
- |
- |
- |
- |
- |
| 1.3673 |
4400 |
0.0796 |
- |
- |
- |
- |
- |
| 1.3984 |
4500 |
0.0823 |
0.1377 |
0.0673 |
0.6677 |
0.6872 |
0.6835 |
| 1.4295 |
4600 |
0.0693 |
- |
- |
- |
- |
- |
| 1.4605 |
4700 |
0.0718 |
- |
- |
- |
- |
- |
| 1.4916 |
4800 |
0.0726 |
- |
- |
- |
- |
- |
| 1.5227 |
4900 |
0.0739 |
- |
- |
- |
- |
- |
| 1.5538 |
5000 |
0.0746 |
0.1366 |
0.0669 |
0.6671 |
0.6900 |
0.6846 |
| 1.5848 |
5100 |
0.0757 |
- |
- |
- |
- |
- |
| 1.6159 |
5200 |
0.0747 |
- |
- |
- |
- |
- |
| 1.6470 |
5300 |
0.0729 |
- |
- |
- |
- |
- |
| 1.6781 |
5400 |
0.0747 |
- |
- |
- |
- |
- |
| 1.7091 |
5500 |
0.0726 |
0.1357 |
0.0666 |
0.6598 |
0.6806 |
0.6904 |
| 1.7402 |
5600 |
0.0735 |
- |
- |
- |
- |
- |
| 1.7713 |
5700 |
0.0709 |
- |
- |
- |
- |
- |
| 1.8024 |
5800 |
0.0698 |
- |
- |
- |
- |
- |
| 1.8334 |
5900 |
0.0714 |
- |
- |
- |
- |
- |
| 1.8645 |
6000 |
0.0732 |
0.1348 |
0.0662 |
0.6729 |
0.6908 |
0.6923 |
| 1.8956 |
6100 |
0.0752 |
- |
- |
- |
- |
- |
| 1.9267 |
6200 |
0.0744 |
- |
- |
- |
- |
- |
| 1.9577 |
6300 |
0.0775 |
- |
- |
- |
- |
- |
| 1.9888 |
6400 |
0.0702 |
- |
- |
- |
- |
- |
| 2.0199 |
6500 |
0.0713 |
0.1311 |
0.0660 |
0.6874 |
0.6868 |
0.6874 |
Framework Versions
- Python: 3.12.0
- Sentence Transformers: 3.0.1
- Transformers: 4.41.2
- PyTorch: 2.3.1+cu118
- Accelerate: 0.31.0
- Datasets: 2.20.0
- Tokenizers: 0.19.1
Citation
BibTeX
Sentence Transformers
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
WeightedDenoisingAutoEncoderLoss
@inproceedings{wang-2021-TSDAE,
title = "TSDAE: Using Transformer-based Sequential Denoising Auto-Encoderfor Unsupervised Sentence Embedding Learning",
author = "Wang, Kexin and Reimers, Nils and Gurevych, Iryna",
booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2021",
month = nov,
year = "2021",
address = "Punta Cana, Dominican Republic",
publisher = "Association for Computational Linguistics",
pages = "671--688",
url = "https://arxiv.org/abs/2104.06979",
}
WeightedMultipleNegativesRankingLoss
@misc{henderson2017efficient,
title={Efficient Natural Language Response Suggestion for Smart Reply},
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
year={2017},
eprint={1705.00652},
archivePrefix={arXiv},
primaryClass={cs.CL}
}