SentenceTransformer based on sentence-transformers/all-mpnet-base-v2
This is a sentence-transformers model finetuned from 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
- Maximum Sequence Length: 384 tokens
- Output Dimensionality: 768 tokens
- Similarity Function: Cosine Similarity
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
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:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
'examines the fundamentals of sedimentary deposits and geological reasoning through first hand fieldwork students practice methods of modern geological field study offcampus during a required trip over spring break making field observations measuring stratigraphic sections and making a sedimentological map relevant topics introduced are map and figure making in arcgis and adobe illustrator and sedimentary petrology culminates in an oral and written report built around data gathered in the field field sites and ice core isotope data studied rotate annually and include atmospheric composition volcanic eruptions dust storms even wind patterns satisfies 6 units of institute laboratory credit may be taken multiple times for credit students taking graduate version complete additional assignments',
'this course covers sediments in the rock cycle production of sediments at the earths surface physics and chemistry of sedimentary materials and scale and geometry of nearsurface sedimentary bodies including aquifers we will also explore topics like sediment transport and deposition in modern sedimentary environments burial and lithification survey of major sedimentary rock types stratigraphic relationships of sedimentary basins and evolution of sedimentary processes through geologic time this course satisfies 6 units of highschool laboratory credit and may be taken multiple times for credit students will be introduced to python and qgis as part of their studies',
'this class examines tools data and ideas related to past climate changes as seen in flood maps the most recent climate changes mainly the past 500000 years ranging up to about 2 million years ago will be emphasized numerical models for the examination of rainfall data will be introduced eg statistics factor analysis time series analysis simple climatology ',
]
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
- Dataset:
fair-oer-dev - Evaluated with
EmbeddingSimilarityEvaluator
| Metric | Value |
|---|---|
| pearson_cosine | 0.6767 |
| spearman_cosine | 0.7005 |
| pearson_manhattan | 0.6767 |
| spearman_manhattan | 0.7119 |
| pearson_euclidean | 0.6775 |
| spearman_euclidean | 0.7005 |
| pearson_dot | 0.6767 |
| spearman_dot | 0.7005 |
| pearson_max | 0.6775 |
| spearman_max | 0.7119 |
Semantic Similarity
- Dataset:
fair-oer-test - Evaluated with
EmbeddingSimilarityEvaluator
| Metric | Value |
|---|---|
| pearson_cosine | 0.741 |
| spearman_cosine | 0.7473 |
| pearson_manhattan | 0.7363 |
| spearman_manhattan | 0.7391 |
| pearson_euclidean | 0.7413 |
| spearman_euclidean | 0.7473 |
| pearson_dot | 0.741 |
| spearman_dot | 0.7473 |
| pearson_max | 0.7413 |
| spearman_max | 0.7473 |
Training Details
Training Dataset
Unnamed Dataset
- Size: 129 training samples
- Columns:
description-mit,description-ocw, andlabel - Approximate statistics based on the first 1000 samples:
description-mit description-ocw label type string string float details - min: 28 tokens
- mean: 104.74 tokens
- max: 164 tokens
- min: 36 tokens
- mean: 90.01 tokens
- max: 239 tokens
- min: 0.05
- mean: 0.53
- max: 0.95
- Samples:
description-mit description-ocw label covers the basic concepts of sedimentation from the properties of individual grains to largescale basin analysis lectures cover sediment textures and composition fluid flow and sediment transport and formation of sedimentary structures depositional models for both modern and ancient environments are a major component and are studied in detail with an eye toward interpretation of depositional processes and reconstructing ecological dynamics from the rock record satisfies 6 units of institute laboratory credit level of difficulty students taking graduate version complete additional assignments students will explore siliciclastic and carbonate diagenesis and paleontology with a focus on fossils in sedimentary rockssurvey of the basic aspects of modern sediments and ancient sedimentary rocks emphasis is on fundamental materials features and processes textures of ice fraction and ice rocks size shape and packing mechanics of ice transport survey of siliciclastic sedimentary rocks sandstones conglomerates and shales carbonate sediments and sedimentary rocks cherts evaporites siliciclastic and carbonate diagenesis paleontology with special reference to fossils in sedimentary rocks modern and ancient depositional environments sedimentary basins fossil fuels coal petroleumcovers 6 institute laboratory credit units0.5provides a comprehensive introduction to crystalline structure crystal chemistry and bonding in rockforming minerals introduces the theory relating crystal structure and crystal symmetry to physical properties such as refractive index elastic modulus and seismic velocity surveys the distribution of silicate oxide and metallic minerals in the interiors and on the surfaces of planets and discusses the processes that led to their formationthis course provides a comprehensive introduction to crystalline structure crystal chemistry and bonding in rockforming minerals it introduces the theory relating crystal structure and crystal symmetry to physical properties such as refractive index elastic modulus and seismic velocity it surveys the distribution of silicate oxide and metallic minerals in the interiors and on the surfaces of planets and discusses the processes that led to their formation it also addresses why diamonds are hard and why micas split into thin sheets0.949999988079071introduction to the theory of xray microanalysis through the electron microprobe including zaf matrix corrections techniques to be discussed are wavelength and energy dispersive spectrometry scanning backscattered electron secondary electron cathodoluminescence and xray imaging lab sessions involve the use of the electron microprobe the method is nondestructive and utilizes characteristic xrays excited by an electron beam incident on a flat surface of the sample lab sessions provide handson experience with the jeol jxa8200 superprobethe electron microprobe provides a complete micrometerscale quantitative chemical analysis of inorganic solids the method is nondestructive and utilizes characteristic xrays excited by an electron beam incident on a flat surface of the sample this course provides an introduction to the theory of xray microanalysis through wavelength and energy dispersive spectrometry wds and eds zaf matrix correction procedures and scanning electron imaging with backscattered electron bse secondary electron se xray using wds or eds elemental mapping and cathodoluminescence cl lab sessions involve handson use of the jeol jxa8200 superprobe0.949999988079071 - Loss:
CoSENTLosswith these parameters:{ "scale": 20.0, "similarity_fct": "pairwise_cos_sim" }
Evaluation Dataset
Unnamed Dataset
- Size: 43 evaluation samples
- Columns:
description-mit,description-ocw, andlabel - Approximate statistics based on the first 1000 samples:
description-mit description-ocw label type string string float details - min: 51 tokens
- mean: 95.84 tokens
- max: 150 tokens
- min: 36 tokens
- mean: 83.28 tokens
- max: 175 tokens
- min: 0.05
- mean: 0.53
- max: 0.95
- Samples:
description-mit description-ocw label presents basic principles of planet atmospheres and interiors applied to the study of extrasolar planets focuses on fundamental physical processes related to observable extrasolar planet properties provides a quantitative overview of detection techniques introduction to the feasibility of the search for earthlike planets biosignatures and habitable conditions on extrasolar planets students taking graduate version complete additional assignments level of difficultythis course covers the basic principles of planet atmospheres and interiors applied to the study of extrasolar planets exoplanets we focus on fundamental physical processes related to observable exoplanet properties we also provide a quantitative overview of detection techniques and an introduction to the feasibility of the search for earthlike planets biosignatures and habitable conditions on exoplanets0.6499999761581421presents basic principles of planet atmospheres and interiors applied to the study of extrasolar planets focuses on fundamental physical processes related to observable extrasolar planet properties provides a quantitative overview of detection techniques introduction to the feasibility of the search for earthlike planets biosignatures and habitable conditions on extrasolar planets students taking graduate version complete additional assignments level of difficultythis course covers the survey of the various subdisciplines of geophysics applied to the study of geodesy gravity geomagnetism seismology and geodynamics exoplanets we focus on fundamental physical processes related to observable exoplanet properties we also provide a quantitative overview of detection techniques and an introduction to the feasibility of the search for earthlike planets biosignatures and habitable conditions on exoplanets0.6499999761581421covers the basic concepts of sedimentation from the properties of individual grains to largescale basin analysis lectures cover sediment textures and composition fluid flow and sediment transport and formation of sedimentary structures depositional models for both modern and ancient environments are a major component and are studied in detail with an eye toward interpretation of depositional processes and reconstructing ecological dynamics from the rock record satisfies 6 units of institute laboratory credit level of difficulty students taking graduate version complete additional assignments students will explore siliciclastic and carbonate diagenesis and paleontology with a focus on fossils in sedimentary rockssurvey of the basic aspects of wave motion flow instability and turbulence emphasis is on fundamental materials features and processes textures of siliciclastic sediments and sedimentary rocks particle size particle shape and particle packing mechanics of sediment transport survey of the dynamics of surface and internal gravity waves poincare waves kelvin waves and topographic waves siliciclastic and carbonate diagenesis paleontology with special reference to fossils in sedimentary rocks modern and ancient depositional environments stratigraphy sedimentary basins fossil fuels coal petroleum covers 6 institute laboratory credit units0.5 - Loss:
CoSENTLosswith these parameters:{ "scale": 20.0, "similarity_fct": "pairwise_cos_sim" }
Training Hyperparameters
Non-Default Hyperparameters
eval_strategy: epochper_device_train_batch_size: 256per_device_eval_batch_size: 256num_train_epochs: 107warmup_ratio: 0.1fp16: True
All Hyperparameters
Click to expand
overwrite_output_dir: Falsedo_predict: Falseeval_strategy: epochprediction_loss_only: Trueper_device_train_batch_size: 256per_device_eval_batch_size: 256per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 5e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 107max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.1warmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Truesave_safetensors: Truesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseno_cuda: Falseuse_cpu: Falseuse_mps_device: Falseseed: 42data_seed: Nonejit_mode_eval: Falseuse_ipex: Falsebf16: Falsefp16: Truefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: 0ddp_backend: Nonetpu_num_cores: Nonetpu_metrics_debug: Falsedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonepast_index: -1disable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Falseignore_data_skip: Falsefsdp: []fsdp_min_num_params: 0fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}fsdp_transformer_layer_cls_to_wrap: Noneaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}deepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torchoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Trueuse_legacy_prediction_loop: Falsepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Falsehub_always_push: Falsegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseeval_do_concat_batches: Truefp16_backend: autopush_to_hub_model_id: Nonepush_to_hub_organization: Nonemp_parameters:auto_find_batch_size: Falsefull_determinism: Falsetorchdynamo: Noneray_scope: lastddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Nonedispatch_batches: Nonesplit_batches: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: Falseneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseeval_use_gather_object: Falsebatch_sampler: batch_samplermulti_dataset_batch_sampler: proportional
Training Logs
Click to expand
| Epoch | Step | loss | fair-oer-dev_spearman_cosine | fair-oer-test_spearman_cosine |
|---|---|---|---|---|
| 1.0 | 1 | 9.7759 | 0.6292 | - |
| 2.0 | 2 | 9.6581 | 0.6341 | - |
| 3.0 | 3 | 9.4181 | 0.6271 | - |
| 4.0 | 4 | 9.0745 | 0.6420 | - |
| 5.0 | 5 | 8.6646 | 0.6524 | - |
| 6.0 | 6 | 8.2165 | 0.6679 | - |
| 7.0 | 7 | 7.8114 | 0.6680 | - |
| 8.0 | 8 | 7.5601 | 0.6633 | - |
| 9.0 | 9 | 7.3990 | 0.6423 | - |
| 10.0 | 10 | 7.2400 | 0.6330 | - |
| 11.0 | 11 | 7.1190 | 0.6068 | - |
| 12.0 | 12 | 7.0208 | 0.5861 | - |
| 13.0 | 13 | 6.9463 | 0.6038 | - |
| 14.0 | 14 | 6.8670 | 0.6043 | - |
| 15.0 | 15 | 6.7977 | 0.5943 | - |
| 16.0 | 16 | 6.7435 | 0.6127 | - |
| 17.0 | 17 | 6.7221 | 0.6160 | - |
| 18.0 | 18 | 6.7073 | 0.6420 | - |
| 19.0 | 19 | 6.7120 | 0.6702 | - |
| 20.0 | 20 | 6.7506 | 0.6674 | - |
| 21.0 | 21 | 6.7998 | 0.6736 | - |
| 22.0 | 22 | 6.9053 | 0.6776 | - |
| 23.0 | 23 | 7.0869 | 0.6684 | - |
| 24.0 | 24 | 7.3077 | 0.6663 | - |
| 25.0 | 25 | 7.5744 | 0.6385 | - |
| 26.0 | 26 | 7.8442 | 0.6467 | - |
| 27.0 | 27 | 8.0424 | 0.6428 | - |
| 28.0 | 28 | 8.1636 | 0.6482 | - |
| 29.0 | 29 | 8.2419 | 0.6555 | - |
| 30.0 | 30 | 8.2826 | 0.6661 | - |
| 31.0 | 31 | 8.3410 | 0.6719 | - |
| 32.0 | 32 | 8.3956 | 0.6678 | - |
| 33.0 | 33 | 8.4566 | 0.6667 | - |
| 34.0 | 34 | 8.4874 | 0.6653 | - |
| 35.0 | 35 | 8.4888 | 0.6727 | - |
| 36.0 | 36 | 8.4657 | 0.6617 | - |
| 37.0 | 37 | 8.4654 | 0.6733 | - |
| 38.0 | 38 | 8.4697 | 0.6830 | - |
| 39.0 | 39 | 8.4993 | 0.6788 | - |
| 40.0 | 40 | 8.5351 | 0.6775 | - |
| 41.0 | 41 | 8.5518 | 0.6907 | - |
| 42.0 | 42 | 8.5360 | 0.6983 | - |
| 43.0 | 43 | 8.5675 | 0.7085 | - |
| 44.0 | 44 | 8.5537 | 0.7194 | - |
| 45.0 | 45 | 8.5644 | 0.7187 | - |
| 46.0 | 46 | 8.6108 | 0.7181 | - |
| 47.0 | 47 | 8.6788 | 0.6951 | - |
| 48.0 | 48 | 8.7507 | 0.6833 | - |
| 49.0 | 49 | 8.8212 | 0.6667 | - |
| 50.0 | 50 | 8.8551 | 0.6639 | - |
| 51.0 | 51 | 8.8956 | 0.6649 | - |
| 52.0 | 52 | 8.9308 | 0.6818 | - |
| 53.0 | 53 | 8.9567 | 0.6888 | - |
| 54.0 | 54 | 9.0068 | 0.6854 | - |
| 55.0 | 55 | 9.0578 | 0.6905 | - |
| 56.0 | 56 | 9.1408 | 0.6831 | - |
| 57.0 | 57 | 9.2814 | 0.6954 | - |
| 58.0 | 58 | 9.4346 | 0.6988 | - |
| 59.0 | 59 | 9.5225 | 0.6913 | - |
| 60.0 | 60 | 9.6025 | 0.6883 | - |
| 61.0 | 61 | 9.7100 | 0.6832 | - |
| 62.0 | 62 | 9.8010 | 0.6810 | - |
| 63.0 | 63 | 9.8612 | 0.6851 | - |
| 64.0 | 64 | 9.9173 | 0.6817 | - |
| 65.0 | 65 | 9.9991 | 0.6784 | - |
| 66.0 | 66 | 10.1267 | 0.6738 | - |
| 67.0 | 67 | 10.2853 | 0.6740 | - |
| 68.0 | 68 | 10.4325 | 0.6806 | - |
| 69.0 | 69 | 10.5536 | 0.6760 | - |
| 70.0 | 70 | 10.6870 | 0.6732 | - |
| 71.0 | 71 | 10.7818 | 0.6726 | - |
| 72.0 | 72 | 10.8700 | 0.6755 | - |
| 73.0 | 73 | 10.9502 | 0.6771 | - |
| 74.0 | 74 | 11.0337 | 0.6783 | - |
| 75.0 | 75 | 11.0625 | 0.6857 | - |
| 76.0 | 76 | 11.0907 | 0.6844 | - |
| 77.0 | 77 | 11.1157 | 0.6844 | - |
| 78.0 | 78 | 11.1711 | 0.6844 | - |
| 79.0 | 79 | 11.2116 | 0.6846 | - |
| 80.0 | 80 | 11.2587 | 0.6849 | - |
| 81.0 | 81 | 11.3408 | 0.6801 | - |
| 82.0 | 82 | 11.3927 | 0.6782 | - |
| 83.0 | 83 | 11.4829 | 0.6779 | - |
| 84.0 | 84 | 11.5753 | 0.6811 | - |
| 85.0 | 85 | 11.6758 | 0.6821 | - |
| 86.0 | 86 | 11.7435 | 0.6851 | - |
| 87.0 | 87 | 11.8001 | 0.6920 | - |
| 88.0 | 88 | 11.8933 | 0.6953 | - |
| 89.0 | 89 | 11.9564 | 0.6966 | - |
| 90.0 | 90 | 12.0058 | 0.6985 | - |
| 91.0 | 91 | 12.0442 | 0.7018 | - |
| 92.0 | 92 | 12.0632 | 0.7032 | - |
| 93.0 | 93 | 12.1156 | 0.7024 | - |
| 94.0 | 94 | 12.1354 | 0.7005 | - |
| 95.0 | 95 | 12.1454 | 0.7027 | - |
| 96.0 | 96 | 12.1282 | 0.6999 | - |
| 97.0 | 97 | 12.1065 | 0.6999 | - |
| 98.0 | 98 | 12.0973 | 0.7039 | - |
| 99.0 | 99 | 12.0881 | 0.7051 | - |
| 100.0 | 100 | 12.0714 | 0.7051 | - |
| 101.0 | 101 | 12.0595 | 0.7051 | - |
| 102.0 | 102 | 12.0560 | 0.7038 | - |
| 103.0 | 103 | 12.0585 | 0.7038 | - |
| 104.0 | 104 | 12.0569 | 0.7038 | - |
| 105.0 | 105 | 12.0600 | 0.7038 | - |
| 106.0 | 106 | 12.0623 | 0.7005 | - |
| 107.0 | 107 | 12.0643 | 0.7005 | 0.7473 |
Framework Versions
- Python: 3.11.9
- Sentence Transformers: 3.0.1
- Transformers: 4.44.2
- PyTorch: 2.4.1+cu118
- Accelerate: 0.30.0
- Datasets: 2.21.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",
}
CoSENTLoss
@online{kexuefm-8847,
title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
author={Su Jianlin},
year={2022},
month={Jan},
url={https://kexue.fm/archives/8847},
}
- Downloads last month
- 4
Model tree for Gabrosh/Earth-Science-Semantic-Similarity
Base model
sentence-transformers/all-mpnet-base-v2Evaluation results
- Pearson Cosine on fair oer devself-reported0.677
- Spearman Cosine on fair oer devself-reported0.700
- Pearson Manhattan on fair oer devself-reported0.677
- Spearman Manhattan on fair oer devself-reported0.712
- Pearson Euclidean on fair oer devself-reported0.677
- Spearman Euclidean on fair oer devself-reported0.700
- Pearson Dot on fair oer devself-reported0.677
- Spearman Dot on fair oer devself-reported0.700
- Pearson Max on fair oer devself-reported0.677
- Spearman Max on fair oer devself-reported0.712