metadata
license: cc-by-nc-4.0
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- feature-extraction
- sentence-similarity
- transformers
- generated_from_trainer
datasets:
- squad
- newsqa
- LLukas22/cqadupstack
- LLukas22/fiqa
- LLukas22/scidocs
- deepset/germanquad
- LLukas22/nq
paraphrase-multilingual-mpnet-base-v2-embedding-all
This model is a fine-tuned version of paraphrase-multilingual-mpnet-base-v2 on the following datasets: squad, newsqa, LLukas22/cqadupstack, LLukas22/fiqa, LLukas22/scidocs, deepset/germanquad, LLukas22/nq.
Usage (Sentence-Transformers)
Using this model becomes easy when you have sentence-transformers installed:
pip install -U sentence-transformers
Then you can use the model like this:
from sentence_transformers import SentenceTransformer
sentences = ["This is an example sentence", "Each sentence is converted"]
model = SentenceTransformer('LLukas22/paraphrase-multilingual-mpnet-base-v2-embedding-all')
embeddings = model.encode(sentences)
print(embeddings)
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 1E+00
- per device batch size: 40
- effective batch size: 120
- seed: 42
- optimizer: AdamW with betas (0.9,0.999) and eps 1E-08
- weight decay: 2E-02
- D-Adaptation: True
- Warmup: True
- number of epochs: 15
- mixed_precision_training: bf16
Training results
Epoch | Train Loss | Validation Loss |
---|---|---|
0 | 0.085 | 0.0625 |
1 | 0.0598 | 0.0554 |
2 | 0.0484 | 0.0518 |
3 | 0.0405 | 0.0485 |
4 | 0.0341 | 0.0463 |
5 | 0.0287 | 0.0454 |
Evaluation results
Epoch | top_1 | top_3 | top_5 | top_10 | top_25 |
---|---|---|---|---|---|
0 | 0.261 | 0.351 | 0.384 | 0.422 | 0.459 |
1 | 0.272 | 0.365 | 0.4 | 0.439 | 0.477 |
2 | 0.276 | 0.37 | 0.404 | 0.443 | 0.481 |
3 | 0.292 | 0.391 | 0.426 | 0.465 | 0.503 |
4 | 0.295 | 0.395 | 0.431 | 0.47 | 0.51 |
5 | 0.299 | 0.4 | 0.437 | 0.476 | 0.514 |
Framework versions
- Transformers: 4.25.1
- PyTorch: 2.0.0.dev20230210+cu118
- PyTorch Lightning: 1.8.6
- Datasets: 2.7.1
- Tokenizers: 0.13.1
- Sentence Transformers: 2.2.2
Additional Information
This model was trained as part of my Master's Thesis 'Evaluation of transformer based language models for use in service information systems'. The source code is available on Github.