Downloads · 30 days
19
12% of all-time downloads
potsu-potsu/snowflake-embed-mrl-train40k
snowflake-embed-mrl-train40k is a sentence similarity model from potsu-potsu. Use it when you need a score for how close two texts are. It is set up for sentence-transformers. The card lists the license as apache-2.0.
This is a sentence-transformers model trained. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classific…
Downloads · 30 days
19
12% of all-time downloads
All-time downloads
156
Public
Parameters
109M
436 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors436 MB · 100%
From the Hugging Face model README
This is a sentence-transformers model trained. 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.
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) 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()
)
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("potsu-potsu/snowflake-embed-mrl-train40k")
# Run inference
sentences = [
'Represent this sentence for searching relevant passages: What is known about the Digit Ratio (2D:4D) cancer?',
'BACKGROUND: The ratio of the lengths of index and ring fingers (2D:4D) is a \nmarker of prenatal exposure to sex hormones, with low 2D:4D being indicative of \nhigh prenatal androgen action. Recent studies have reported a strong association \nbetween 2D:4D and risk of prostate cancer.\nMETHODS: A total of 6258 men participating in the Melbourne Collaborative Cohort \nStudy had 2D:4D assessed. Of these men, we identified 686 incident prostate \ncancer cases. Hazard ratios (HRs) and confidence intervals (CIs) were estimated \nfor a standard deviation increase in 2D:4D.\nRESULTS: No association was observed between 2D:4D and prostate cancer risk \noverall (HRs 1.00; 95% CIs, 0.92-1.08 for right, 0.93-1.08 for left). We \nobserved a weak inverse association between 2D:4D and risk of prostate cancer \nfor age <60, however 95% CIs included unity for all observed ages.\nCONCLUSION: Our results are not consistent with an association between 2D:4D and \noverall prostate cancer risk, but we cannot exclude a weak inverse association \nbetween 2D:4D and early onset prostate cancer risk.',
"Proteins undergo conformational changes during their biological function. As \nsuch, a high-resolution structure of a protein's resting conformation provides a \nstarting point for elucidating its reaction mechanism, but provides no direct \ninformation concerning the protein's conformational dynamics. Several X-ray \nmethods have been developed to elucidate those conformational changes that occur \nduring a protein's reaction, including time-resolved Laue diffraction and \nintermediate trapping studies on three-dimensional protein crystals, and \ntime-resolved wide-angle X-ray scattering and X-ray absorption studies on \nproteins in the solution phase. This review emphasizes the scope and limitations \nof these complementary experimental approaches when seeking to understand \nprotein conformational dynamics. These methods are illustrated using a limited \nset of examples including myoglobin and haemoglobin in complex with carbon \nmonoxide, the simple light-driven proton pump bacteriorhodopsin, and the \nsuperoxide scavenger superoxide reductase. In conclusion, likely future \ndevelopments of these methods at synchrotron X-ray sources and the potential \nimpact of emerging X-ray free-electron laser facilities are speculated upon.",
]
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]
<!--
### Direct Usage (Transformers)
<details><summary>Click to see the direct usage in Transformers</summary>
</details>
-->
<!--
### Downstream Usage (Sentence Transformers)
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>
</details>
-->
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
dim_768{
"truncate_dim": 768,
"query_prompt_name": "query"
}
| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.7907 |
| cosine_accuracy@3 | 0.8996 |
| cosine_accuracy@5 | 0.925 |
| cosine_accuracy@10 | 0.942 |
| cosine_precision@1 | 0.7907 |
| cosine_precision@3 | 0.6388 |
| cosine_precision@5 | 0.5573 |
| cosine_precision@10 | 0.4368 |
| cosine_recall@1 | 0.2526 |
| cosine_recall@3 | 0.4351 |
| cosine_recall@5 | 0.5317 |
| cosine_recall@10 | 0.6727 |
| cosine_ndcg@10 | 0.7563 |
| cosine_mrr@10 | 0.8467 |
| cosine_map@100 | 0.7038 |
dim_512{
"truncate_dim": 512,
"query_prompt_name": "query"
}
| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.7864 |
| cosine_accuracy@3 | 0.9024 |
| cosine_accuracy@5 | 0.9222 |
| cosine_accuracy@10 | 0.9392 |
| cosine_precision@1 | 0.7864 |
| cosine_precision@3 | 0.6431 |
| cosine_precision@5 | 0.5547 |
| cosine_precision@10 | 0.4345 |
| cosine_recall@1 | 0.2512 |
| cosine_recall@3 | 0.435 |
| cosine_recall@5 | 0.5282 |
| cosine_recall@10 | 0.6681 |
| cosine_ndcg@10 | 0.7519 |
| cosine_mrr@10 | 0.8441 |
| cosine_map@100 | 0.6977 |
dim_256{
"truncate_dim": 256,
"query_prompt_name": "query"
}
| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.7793 |
| cosine_accuracy@3 | 0.8982 |
| cosine_accuracy@5 | 0.9236 |
| cosine_accuracy@10 | 0.9392 |
| cosine_precision@1 | 0.7793 |
| cosine_precision@3 | 0.6341 |
| cosine_precision@5 | 0.5556 |
| cosine_precision@10 | 0.4303 |
| cosine_recall@1 | 0.2519 |
| cosine_recall@3 | 0.4298 |
| cosine_recall@5 | 0.5283 |
| cosine_recall@10 | 0.6608 |
| cosine_ndcg@10 | 0.7468 |
| cosine_mrr@10 | 0.8395 |
| cosine_map@100 | 0.6928 |
dim_128{
"truncate_dim": 128,
"query_prompt_name": "query"
}
| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.727 |
| cosine_accuracy@3 | 0.8543 |
| cosine_accuracy@5 | 0.884 |
| cosine_accuracy@10 | 0.9222 |
| cosine_precision@1 | 0.727 |
| cosine_precision@3 | 0.6025 |
| cosine_precision@5 | 0.5174 |
| cosine_precision@10 | 0.4034 |
| cosine_recall@1 | 0.2222 |
| cosine_recall@3 | 0.3938 |
| cosine_recall@5 | 0.4777 |
| cosine_recall@10 | 0.6167 |
| cosine_ndcg@10 | 0.6929 |
| cosine_mrr@10 | 0.7967 |
| cosine_map@100 | 0.6298 |
dim_64{
"truncate_dim": 64,
"query_prompt_name": "query"
}
| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.6492 |
| cosine_accuracy@3 | 0.7723 |
| cosine_accuracy@5 | 0.8161 |
| cosine_accuracy@10 | 0.8656 |
| cosine_precision@1 | 0.6492 |
| cosine_precision@3 | 0.5116 |
| cosine_precision@5 | 0.4461 |
| cosine_precision@10 | 0.3513 |
| cosine_recall@1 | 0.1787 |
| cosine_recall@3 | 0.3206 |
| cosine_recall@5 | 0.4043 |
| cosine_recall@10 | 0.5257 |
| cosine_ndcg@10 | 0.5899 |
| cosine_mrr@10 | 0.7197 |
| cosine_map@100 | 0.5137 |
| anchor | positive | |
|---|---|---|
| type | string | string |
| details | <ul><li>min: 14 tokens</li><li>mean: 24.0 tokens</li><li>max: 40 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 287.89 tokens</li><li>max: 512 tokens</li></ul> |
| anchor | positive |
|---|---|
| <code>Represent this sentence for searching relevant passages: What is the implication of histone lysine methylation in medulloblastoma?</code> | <code>Aberrant patterns of H3K4, H3K9, and H3K27 histone lysine methylation were shown to result in histone code alterations, which induce changes in gene expression, and affect the proliferation rate of cells in medulloblastoma.</code> |
| <code>Represent this sentence for searching relevant passages: What is the implication of histone lysine methylation in medulloblastoma?</code> | <code>Recent studies showed frequent mutations in histone H3 lysine 27 (H3K27) <br>demethylases in medulloblastomas of Group 3 and Group 4, suggesting a role for <br>H3K27 methylation in these tumors. Indeed, trimethylated H3K27 (H3K27me3) levels <br>were shown to be higher in Group 3 and 4 tumors compared to WNT and SHH <br>medulloblastomas, also in tumors without detectable mutations in demethylases. <br>Here, we report that polycomb genes, required for H3K27 methylation, are <br>consistently upregulated in Group 3 and 4 tumors. These tumors show high <br>expression of the homeobox transcription factor OTX2. Silencing of OTX2 in D425 <br>medulloblastoma cells resulted in downregulation of polycomb genes such as EZH2, <br>EED, SUZ12 and RBBP4 and upregulation of H3K27 demethylases KDM6A, KDM6B, JARID2 <br>and KDM7A. This was accompanied by decreased H3K27me3 and increased H3K27me1 <br>levels in promoter regions. Strikingly, the decrease of H3K27me3 was most <br>prominent in promoters that bind OTX2. OTX2-bound promoters showe...</code> |
| <code>Represent this sentence for searching relevant passages: What is the implication of histone lysine methylation in medulloblastoma?</code> | <code>We used high-resolution SNP genotyping to identify regions of genomic gain and <br>loss in the genomes of 212 medulloblastomas, malignant pediatric brain tumors. <br>We found focal amplifications of 15 known oncogenes and focal deletions of 20 <br>known tumor suppressor genes (TSG), most not previously implicated in <br>medulloblastoma. Notably, we identified previously unknown amplifications and <br>homozygous deletions, including recurrent, mutually exclusive, highly focal <br>genetic events in genes targeting histone lysine methylation, particularly that <br>of histone 3, lysine 9 (H3K9). Post-translational modification of histone <br>proteins is critical for regulation of gene expression, can participate in <br>determination of stem cell fates and has been implicated in carcinogenesis. <br>Consistent with our genetic data, restoration of expression of genes controlling <br>H3K9 methylation greatly diminishes proliferation of medulloblastoma in vitro. <br>Copy number aberrations of genes with critical roles in writing...</code> |
{
"loss": "MultipleNegativesRankingLoss",
"matryoshka_dims": [
768,
512,
256,
128,
64
],
"matryoshka_weights": [
1,
1,
1,
1,
1
],
"n_dims_per_step": -1
}
eval_strategy: epochper_device_train_batch_size: 32per_device_eval_batch_size: 16gradient_accumulation_steps: 16learning_rate: 2e-05num_train_epochs: 4lr_scheduler_type: cosinewarmup_ratio: 0.1bf16: Truetf32: Trueload_best_model_at_end: Trueoptim: adamw_torch_fusedprompts: {'anchor': 'Represent this sentence for searching relevant passages: '}batch_sampler: no_duplicatesoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: epochprediction_loss_only: Trueper_device_train_batch_size: 32per_device_eval_batch_size: 16per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 16eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 2e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 4max_steps: -1lr_scheduler_type: cosinelr_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: Truefp16: Falsefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Truelocal_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: Trueignore_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_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: Falsegradient_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: Falseeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: {'anchor': 'Represent this sentence for searching relevant passages: '}batch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportional| Epoch | Step | Training Loss | dim_768_cosine_ndcg@10 | dim_512_cosine_ndcg@10 | dim_256_cosine_ndcg@10 | dim_128_cosine_ndcg@10 | dim_64_cosine_ndcg@10 |
|---|---|---|---|---|---|---|---|
| 0.1264 | 10 | 43.9733 | - | - | - | - | - |
| 0.2528 | 20 | 37.2132 | - | - | - | - | - |
| 0.3791 | 30 | 29.154 | - | - | - | - | - |
| 0.5055 | 40 | 21.2468 | - | - | - | - | - |
| 0.6319 | 50 | 20.7634 | - | - | - | - | - |
| 0.7583 | 60 | 18.1049 | - | - | - | - | - |
| 0.8847 | 70 | 14.6053 | - | - | - | - | - |
| 1.0 | 80 | 15.2145 | 0.7614 | 0.7547 | 0.747 | 0.6971 | 0.5805 |
| 1.1264 | 90 | 12.3147 | - | - | - | - | - |
| 1.2528 | 100 | 11.697 | - | - | - | - | - |
| 1.3791 | 110 | 11.1032 | - | - | - | - | - |
| 1.5055 | 120 | 11.283 | - | - | - | - | - |
| 1.6319 | 130 | 10.8745 | - | - | - | - | - |
| 1.7583 | 140 | 11.0657 | - | - | - | - | - |
| 1.8847 | 150 | 10.9185 | - | - | - | - | - |
| 2.0 | 160 | 9.0766 | 0.7592 | 0.7544 | 0.7493 | 0.6929 | 0.5848 |
| 2.1264 | 170 | 8.9039 | - | - | - | - | - |
| 2.2528 | 180 | 8.453 | - | - | - | - | - |
| 2.3791 | 190 | 8.5848 | - | - | - | - | - |
| 2.5055 | 200 | 8.5896 | - | - | - | - | - |
| 2.6319 | 210 | 8.6095 | - | - | - | - | - |
| 2.7583 | 220 | 7.8118 | - | - | - | - | - |
| 2.8847 | 230 | 7.3895 | - | - | - | - | - |
| 3.0 | 240 | 6.4518 | 0.7554 | 0.7515 | 0.7462 | 0.6902 | 0.5848 |
| 3.1264 | 250 | 6.8891 | - | - | - | - | - |
| 3.2528 | 260 | 7.667 | - | - | - | - | - |
| 3.3791 | 270 | 7.3912 | - | - | - | - | - |
| 3.5055 | 280 | 7.3737 | - | - | - | - | - |
| 3.6319 | 290 | 6.8758 | - | - | - | - | - |
| 3.7583 | 300 | 7.4082 | - | - | - | - | - |
| 3.8847 | 310 | 7.3462 | - | - | - | - | - |
| 4.0 | 320 | 6.3888 | 0.7563 | 0.7519 | 0.7468 | 0.6929 | 0.5899 |
@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",
}
@misc{kusupati2024matryoshka,
title={Matryoshka Representation Learning},
author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
year={2024},
eprint={2205.13147},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
@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}
}
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->