Views
No views yet
SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'XLMRobertaModel'})
(1): Pooling({'embedding_dimension': 1024, 'pooling_mode': 'mean', 'include_prompt': True})
(2): Normalize({})
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("MinhPhuc0804/me5-256-kiem-tra-di-t1-v2.2")
5# Run inference
6sentences = [
7 'query: @user That’s not what some of the data suggests. 25% of those who had a light infection the first time required an ER visit the 2nd time. And we know there is a mounting load with reinfections.',
8 "passage: diagnoses occur closer to the index date for infection or reinfection in the Omicron BA epoch.\n\ntitle: SARS-CoV-2 Reinfection is Preceded by Unique Biomarkers and Related to Initial Infection Timing and Severity: an N3C RECOVER EHR-Based Cohort Study\nWe report lower albumin levels leading up to reinfection and a statistically significant association of severity between first infection and reinfection (chi-squared value: 9446.2, p-value: 0) with a medium effect size (Cramer's V: 0.18, DoF = 4).",
9 'passage: randomization to hospital discharge.\n\ntitle: Effect of a Single High Dose of Vitamin D<sub>3</sub> on Hospital Length of Stay in Patients With Moderate to Severe COVID-19\nPrespecified secondary outcomes included mortality during hospitalization; the number of patients admitted to the intensive care unit; the number of patients who required mechanical ventilation and the duration of mechanical ventilation; and serum levels of 25-hydroxyvitamin D, total calcium, creatinine, and C-reactive protein.Of 240 randomized patients, 237 were included in the primary analysis (mean [SD] age, 56.2 [14.4] years; 104 [43.9%] women; mean [SD] baseline 25-hydroxyvitamin D level, 20.9 [9.2] ng/mL). Median (interquartile range) length of stay was not significantly different between the vitamin D3 (7.0 [4.0-10.0] days) and placebo groups (7.0 [5.0-13.0] days) (log-rank P = .59; unadjusted hazard ratio for hospital discharge, 1.07 [95% CI, 0.82-1.39]; P = .62).',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 1024]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities)
18# tensor([[1.0000, 0.4852, 0.1473],
19# [0.4852, 1.0000, 0.0226],
20# [0.1473, 0.0226, 1.0000]])CT26-dev-splitInformationRetrievalEvaluator| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.703 |
| cosine_accuracy@3 | 0.8609 |
| cosine_accuracy@5 | 0.8941 |
| cosine_accuracy@10 | 0.9315 |
| cosine_precision@1 | 0.703 |
| cosine_precision@3 | 0.287 |
| cosine_precision@5 | 0.1788 |
| cosine_precision@10 | 0.0931 |
| cosine_recall@1 | 0.703 |
| cosine_recall@3 | 0.8609 |
| cosine_recall@5 | 0.8941 |
| cosine_recall@10 | 0.9315 |
| cosine_ndcg@10 | 0.8221 |
| cosine_mrr@10 | 0.7865 |
| cosine_map@100 | 0.7889 |
anchor and positive| anchor | positive | |
|---|---|---|
| type | string | string |
| details |
|
|
| anchor | positive |
|---|---|
query: Peer-reviewed scientific studies project universal mask use would spare nearly 130,000 U.S. lives by February. But Utah carries on with a baffling, lax patchwork of feeble mask rules. If elected, I’ll shield your family. #PetersonProtects #utpol | passage: 469,578–578,347) lives could be lost to COVID-19 across the United States by 28 February 2021.[object Object][object Object]title: Modeling COVID-19 scenarios for the United States[object Object]We find that achieving universal mask use (95% mask use in public) could be sufficient to ameliorate the worst effects of epidemic resurgences in many states. Universal mask use could save an additional 129,574 (85,284–170,867) lives from September 22, 2020 through the end of February 2021, or an additional 95,814 (60,731–133,077) lives assuming a lesser adoption of mask wearing (85%), when compared to the reference scenario. |
query: "Seroprevalence studies may fail to detect people who have had mild covid-19. Consideration should be given to [...] calibration of assay thresholds, the breadth of the antibody response, and the role of mucosal antibodies" | passage: was used to analyse the data.[object Object][object Object]title: Are we underestimating seroprevalence of SARS-CoV-2?[object Object][object Object] The study indicates a fairly high knowledge level of STI/HIV (89.4%) with more males (87%) and younger participants (88%) possessing good knowledge of STI/HIV. Majority of the participants are sexually active (63.3%) and of this are more males (61.3%) and younger participants (60%). Findings show that age (β = 0.025; t = 0.04; p > 0.05) of the three predictor variables was not a predictor of attitude towards STI/HIV. However, knowledge of STI/HIV (β = 0.459; t = 5.032; p < 0.05) and sexual behaviour (β = 0.341; t = 4.278; p < 0.05) were strong predictors of attitude towards STI/HIV. [object Object] This study shows the need for strong advocacy, enlightenment and community mobilisation for improved awareness of STI/HIV. |
query: Rebuilding of October #Arctic sea ice volume spanning over the past 100 years... [Side-by-side look between PIOMAS-20C and PIOMAS data sets now refreshed through October 2021. Model details available at | passage: title: Arctic Sea Ice Volume Variability over 1901–2010: A Model-Based Reconstruction |
| abstract: Abstract PIOMAS-20C, an Arctic sea ice reconstruction for 1901–2010, is produced by forcing the Pan-Arctic Ice Ocean Modeling and Assimilation System (PIOMAS) with ERA-20C atmospheric data. ERA-20C performance over Arctic sea ice is assessed by comparisons with measurements and data from other reanalyses. ERA-20C performs similarly with respect to the annual cycle of downwelling radiation, air temperature, and wind speed compared to reanalyses with more extensive data assimilation such as ERA-Interim and MERRA. PIOMAS-20C sea ice thickness and volume are then compared with in situ and aircraft remote sensing observations for the period of ~1950–2010. Error statistics are similar to those for PIOMAS. We compare the magnitude and patterns of sea ice variability between the first half of the twentieth century (1901–40) and the more recent period (1980–2010), both marked by sea ice decl... |
MultipleNegativesRankingLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "cos_sim",
4 "gather_across_devices": false,
5 "directions": [
6 "query_to_doc"
7 ],
8 "partition_mode": "joint",
9 "hardness_mode": null,
10 "hardness_strength": 0.0
11}anchor and positive| anchor | positive | |
|---|---|---|
| type | string | string |
| details |
|
|
| anchor | positive |
|---|---|
query: I reckon we’ll be hearing more about plitidepsin, which (in vitro, at least) is 27.5 times stronger than remdesivir #COVID19 | passage: title: Plitidepsin has potent preclinical efficacy against SARS-CoV-2 by targeting the host protein eEF1A[object Object]abstract: Severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) viral proteins interact with the eukaryotic translation machinery, and inhibitors of translation have potent antiviral effects. We found that the drug plitidepsin (aplidin), which has limited clinical approval, possesses antiviral activity (90% inhibitory concentration = 0.88 nM) that is more potent than remdesivir against SARS-CoV-2 in vitro by a factor of 27.5, with limited toxicity in cell culture. Through the use of a drug-resistant mutant, we show that the antiviral activity of plitidepsin against SARS-CoV-2 is mediated through inhibition of the known target eEF1A (eukaryotic translation elongation factor 1A). |
query: 2020 research on #LongCovid. Pre‑vaccine era. “Young, low risk patients with ongoing symptoms of #covid19 had signs of damage to multiple organs four months after initially being infected.” | passage: title: Long covid: Damage to multiple organs presents in young, low risk patients[object Object]abstract: Young, low risk patients with ongoing symptoms of covid-19 had signs of damage to multiple organs four months after initially being infected, a preprint study has suggested. |
query: L'inflammation indépendante provoquée par les macrophages encourage-t-elle les lésions alvéolaires dans la COVID-19 ? | passage: title: Does autonomous macrophage-driven inflammation promote alveolar damage in COVID-19?[object Object]abstract: [object Object][object Object] |
MultipleNegativesRankingLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "cos_sim",
4 "gather_across_devices": false,
5 "directions": [
6 "query_to_doc"
7 ],
8 "partition_mode": "joint",
9 "hardness_mode": null,
10 "hardness_strength": 0.0
11}per_device_train_batch_size: 64per_device_eval_batch_size: 64learning_rate: 1.6e-05num_train_epochs: 12warmup_ratio: 0.1fp16: Truedataloader_num_workers: 8overwrite_output_dir: Falsedo_predict: Falseprediction_loss_only: Trueper_device_train_batch_size: 64per_device_eval_batch_size: 64per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 1.6e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 12max_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: 8dataloader_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}parallelism_config: Nonedeepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torch_fusedoptim_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: Nonehub_always_push: Falsehub_revision: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseinclude_for_metrics: []eval_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: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: Falseneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseliger_kernel_config: Noneeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {}| Epoch | Step | Training Loss | Validation Loss | CT26-dev-split_cosine_ndcg@10 |
|---|---|---|---|---|
| 0.3497 | 100 | 1.4924 | - | - |
| 0.6993 | 200 | 0.4654 | - | - |
| 1.0 | 286 | - | 0.3642 | 0.8101 |
| 1.0490 | 300 | 0.456 | - | - |
| 1.3986 | 400 | 0.357 | - | - |
| 1.7483 | 500 | 0.3495 | - | - |
| 2.0 | 572 | - | 0.3230 | 0.8173 |
| 2.0979 | 600 | 0.2768 | - | - |
| 2.4476 | 700 | 0.1966 | - | - |
| 2.7972 | 800 | 0.2134 | - | - |
| 3.0 | 858 | - | 0.3204 | 0.8148 |
| 3.1469 | 900 | 0.1845 | - | - |
| 3.4965 | 1000 | 0.1266 | - | - |
| 3.8462 | 1100 | 0.1339 | - | - |
| 4.0 | 1144 | - | 0.3248 | 0.8182 |
| 4.1958 | 1200 | 0.1088 | - | - |
| 4.5455 | 1300 | 0.0882 | - | - |
| 4.8951 | 1400 | 0.0908 | - | - |
| 5.0 | 1430 | - | 0.3159 | 0.8179 |
| 5.2448 | 1500 | 0.0803 | - | - |
| 5.5944 | 1600 | 0.0733 | - | - |
| 5.9441 | 1700 | 0.0801 | - | - |
| 6.0 | 1716 | - | 0.3152 | 0.8171 |
| 6.2937 | 1800 | 0.0636 | - | - |
| 6.6434 | 1900 | 0.0606 | - | - |
| 6.9930 | 2000 | 0.0671 | - | - |
| 7.0 | 2002 | - | 0.3123 | 0.8178 |
| 7.3427 | 2100 | 0.0589 | - | - |
| 7.6923 | 2200 | 0.0551 | - | - |
| 8.0 | 2288 | - | 0.3071 | 0.8198 |
| 8.0420 | 2300 | 0.0516 | - | - |
| 8.3916 | 2400 | 0.0481 | - | - |
| 8.7413 | 2500 | 0.0487 | - | - |
| 9.0 | 2574 | - | 0.3111 | 0.8207 |
| 9.0909 | 2600 | 0.0446 | - | - |
| 9.4406 | 2700 | 0.0481 | - | - |
| 9.7902 | 2800 | 0.0503 | - | - |
| 10.0 | 2860 | - | 0.3056 | 0.8204 |
| 10.1399 | 2900 | 0.0469 | - | - |
| 10.4895 | 3000 | 0.0432 | - | - |
| 10.8392 | 3100 | 0.0445 | - | - |
| 11.0 | 3146 | - | 0.3057 | 0.8227 |
| 11.1888 | 3200 | 0.0434 | - | - |
| 11.5385 | 3300 | 0.038 | - | - |
| 11.8881 | 3400 | 0.0388 | - | - |
| 12.0 | 3432 | - | 0.3088 | 0.8221 |
1@inproceedings{reimers-2019-sentence-bert,
2 title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
3 author = "Reimers, Nils and Gurevych, Iryna",
4 booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
5 month = "11",
6 year = "2019",
7 publisher = "Association for Computational Linguistics",
8 url = "https://arxiv.org/abs/1908.10084",
9}1@misc{oord2019representationlearningcontrastivepredictive,
2 title={Representation Learning with Contrastive Predictive Coding},
3 author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
4 year={2019},
5 eprint={1807.03748},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG},
8 url={https://arxiv.org/abs/1807.03748},
9}