Views
No views yet
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 384, '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})
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("FareedKhan/TaylorAI_bge-micro-v2_FareedKhan_prime_synthetic_data_2k_10_32")
5# Run inference
6sentences = [
7 "\n\nMuscular dystrophy is a group of inherited disorders characterized by progressive muscle weakness and wasting. Here's a concise overview of the information you've provided:\n\n### Types of Muscular Dystrophy:\n- **Duchenne Muscular Dystrophy**: Most common in young boys, characterized by severe muscle weakness and consequent inability to walk by adolescence.\n- **Becker Muscular Dystrophy**: Less severe than Duchenne but still progressive, affecting males.\n- **Facioscapulohumeral Muscular Dystrophy (FSHD)**: Affects the face, shoulder, and upper arm muscles, common in the teenage to adult years.\n- **",
8 'I need details on a disease linked to the COL6A2 gene, presenting with progressive muscle weakening in specific groups and worsening muscle strength over time.',
9 'Identify a metabolic pathway that is associated with both glyoxylate metabolism and glycine degradation and is capable of interacting with a common gene or protein.',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 384]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities.shape)
18# [3, 3]dim_384InformationRetrievalEvaluator| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.4109 |
| cosine_accuracy@3 | 0.495 |
| cosine_accuracy@5 | 0.5347 |
| cosine_accuracy@10 | 0.5693 |
| cosine_precision@1 | 0.4109 |
| cosine_precision@3 | 0.165 |
| cosine_precision@5 | 0.1069 |
| cosine_precision@10 | 0.0569 |
| cosine_recall@1 | 0.4109 |
| cosine_recall@3 | 0.495 |
| cosine_recall@5 | 0.5347 |
| cosine_recall@10 | 0.5693 |
| cosine_ndcg@10 | 0.4866 |
| cosine_mrr@10 | 0.4604 |
| cosine_map@100 | 0.4676 |
positive and anchor| positive | anchor | |
|---|---|---|
| type | string | string |
| details |
|
|
| positive | anchor |
|---|---|
[object Object][object Object]Hemophilia is an inherited bleeding disorder that occurs when a person's body does not produce enough of certain clotting factors, leading to prolonged bleeding and, in severe cases, spontaneous bleeding into joints and muscles. The disorder is typically associated with mutations in the genes that code for clotting factors VIII (for hemophilia A) and IX (for hemophilia B). It can be categorized based on the specific clotting factor affected and the mode of inheritance.[object Object][object Object]### Risk Factors[object Object]The biggest risk factor for hemophilia is a family history of the disorder. If a family member, particularly a parent or a close relative, has hemophilia, there is an increased risk for the disease due to the genetic predisposition.[object Object][object Object]### Genetic Inheritance[object Object]- [object Object] or [object Object]: Often affects males due to the inheritance pattern X-linked recessive. A carrier female has a 50% chance of passing the gene to each of her offspring.[object Object]- [object Object] or [object Object]: Also typically X-linked recessive, mostly affecting males. Carrier females are likely to pass the gene to their male offspring only.[object Object][object Object]### Complications and Symptoms[object Object]- [object Object]: This is the most common symptom, ranging from mild to life-threatening.[object Object]- [object Object]: These can lead to serious complications and require immediate medical attention.[object Object]- [object Object]: Frequent bleeding into joints can result in arthritis, joint destruction, and limitation of joint mobility.[object Object]- [object Object]: These are other sites where bleeding can occur, often with minor trauma.[object Object][object Object]### Treatment and Management[object Object]Treatment for hemophilia often involves replacing the missing clotting factors using infused or transfused factors. This can be through Factor VIII concentrate for hemophilia A or Factor IX concentrate for hemophilia B. Prophylactic treatments are often administered to prevent bleeding episodes and maintain normal joint function.[object Object][object Object]### Diagnosis[object Object]Diagnosis of hemophilia is typically made through a series of blood tests to measure clotting times and factor levels. Genetic testing is also recommended in families with a history of hemophilia to identify carriers and those with more severe symptoms.[object Object][object Object]### See a Doctor[object Object]It's important to see a doctor if you or your child shows signs of prolonged bleeding or if there is a family history of hemophilia. Early diagnosis and appropriate treatment can significantly improve outcomes and quality of life.[object Object][object Object]### Carrying and Symptoms in Female Carriers[object Object]While female carriers are usually asymptomatic, they can experience mild symptoms under specific circumstances such as during pregnancy (gastrointestinal bleeding) or menopause (menorrhagia). Genetic testing can confirm an asymptomatic carrier status, which is important for family planning and counseling.[object Object][object Object]### In Conclusion[object Object]Hemophilia is a complex condition that requires careful management to prevent complications and maintain quality of life. Early diagnosis, genetic counseling, and proper treatment are crucial for managing this inherited bleeding disorder effectively. | Which condition should be avoided when prescribing medications for outdated forms of contact dermatitis resulting from poison oak exposure? |
[object Object][object Object]Assistant: Diabetes insipidus, a rare but serious condition, can manifest with a series of symptoms and has diverse impacts on various systems of the body. Primarily characterized by increased thirst, significant urination, and dehydration, diabetes insipidus requires prompt medical intervention.[object Object][object Object][object Object]:[object Object]1. [object Object] (increased thirst) and [object Object] (frequent urination) are the primary symptoms, typically exceeding 10 liters of fluid intake and urine output per day.[object Object]2. [object Object] can result from excessive fluid loss unless compensated, causing electrolyte | What medical condition could I have that involves persistent thirst, frequent urination, and unexplained weight loss, and is associated with a familial disorder affecting water balance similar to diabetes insipidus, but not identical, as it involves an inability to concentrate urine? My father has it, and my doctor suggested managing salt intake and water consumption, mentioning that medication may be available to reduce the urination. What is the name of this disease? |
[object Object][object Object]The pathway described in this document is titled "p75 NTR receptor-mediated signalling" which suggests that it centers around the activity of the p75 neurotrophin receptor (p75 NTR), a cell surface receptor that plays a crucial role in neuronal development, survival, and function. [object Object][object Object]### Key Components and Their Roles:[object Object][object Object]- [object Object]: This is a ligand that binds to the p75 NTR. Binding of NGF to p75 NTR initiates a cascade of events resulting in various cellular responses.[object Object][object Object]- [object Object]: The receptor itself is pivotal, as its binding with ligands like NGF modulates signal transduction in cells, affecting survival, differentiation, and various aspects of cellular metabolism and function.[object Object][object Object]- [object Object]: This gene/protein is implicated in the pathway, with involvement in modulating ceramide production upon NGF Binding to p75 NTR. Sphingomyelinase is activated by the NGF:p75NTR complex, suggesting an integral role in the effector phase of the signaling cascade.[object Object][object Object]- [object Object]: A lipid derived from sphingomyelin that plays a key role in cellular signaling. Ceramide's production upon ligand-receptor binding can lead to either cell survival or apoptosis depending on the context within specific cell types.[object Object][object Object]- [object Object]: This is a serine/threonine kinase that can be activated by ceramide and is involved in various cellular processes including apoptosis, cell cycle regulation, and differentiation.[object Object][object Object]### Pathway Description:[object Object][object Object]The pathway described includes mechanisms by which ligand binding to p75 NTR leads to ceramide production, which in | Which signaling pathway interacts with both p75 NTR receptor signaling and the nerve growth factor (NGF) gene/protein in a hierarchical manner? |
MatryoshkaLoss with these parameters:
1{
2 "loss": "MultipleNegativesRankingLoss",
3 "matryoshka_dims": [
4 384
5 ],
6 "matryoshka_weights": [
7 1
8 ],
9 "n_dims_per_step": -1
10}eval_strategy: epochper_device_train_batch_size: 32learning_rate: 1e-05num_train_epochs: 10warmup_ratio: 0.1bf16: Truetf32: Falseload_best_model_at_end: Trueoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: epochprediction_loss_only: Trueper_device_train_batch_size: 32per_device_eval_batch_size: 8per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 1e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 10max_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: Truefp16: Falsefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Falselocal_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_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: Falseuse_liger_kernel: Falseeval_use_gather_object: Falsebatch_sampler: batch_samplermulti_dataset_batch_sampler: proportional| Epoch | Step | Training Loss | dim_384_cosine_map@100 |
|---|---|---|---|
| 0 | 0 | - | 0.4238 |
| 0.1754 | 10 | 1.9916 | - |
| 0.3509 | 20 | 1.8049 | - |
| 0.5263 | 30 | 1.8366 | - |
| 0.7018 | 40 | 1.8585 | - |
| 0.8772 | 50 | 1.7288 | - |
| 1.0 | 57 | - | 0.4326 |
| 1.0526 | 60 | 1.6438 | - |
| 1.2281 | 70 | 1.5404 | - |
| 1.4035 | 80 | 1.6168 | - |
| 1.5789 | 90 | 1.5432 | - |
| 1.7544 | 100 | 1.4976 | - |
| 1.9298 | 110 | 1.5275 | - |
| 2.0 | 114 | - | 0.4422 |
| 2.1053 | 120 | 1.3276 | - |
| 2.2807 | 130 | 1.3629 | - |
| 2.4561 | 140 | 1.4108 | - |
| 2.6316 | 150 | 1.3338 | - |
| 2.8070 | 160 | 1.4043 | - |
| 2.9825 | 170 | 1.4664 | - |
| 3.0 | 171 | - | 0.4487 |
| 3.1579 | 180 | 1.2225 | - |
| 3.3333 | 190 | 1.2557 | - |
| 3.5088 | 200 | 1.3518 | - |
| 3.6842 | 210 | 1.3227 | - |
| 3.8596 | 220 | 1.3391 | - |
| 4.0 | 228 | - | 0.4561 |
| 4.0351 | 230 | 1.2035 | - |
| 4.2105 | 240 | 1.197 | - |
| 4.3860 | 250 | 1.2908 | - |
| 4.5614 | 260 | 1.1738 | - |
| 4.7368 | 270 | 1.1855 | - |
| 4.9123 | 280 | 1.2118 | - |
| 5.0 | 285 | - | 0.4578 |
| 5.0877 | 290 | 1.1835 | - |
| 5.2632 | 300 | 1.1624 | - |
| 5.4386 | 310 | 1.2075 | - |
| 5.6140 | 320 | 1.1771 | - |
| 5.7895 | 330 | 1.0814 | - |
| 5.9649 | 340 | 1.2039 | - |
| 6.0 | 342 | - | 0.4584 |
| 6.1404 | 350 | 1.2029 | - |
| 6.3158 | 360 | 1.1043 | - |
| 6.4912 | 370 | 1.2011 | - |
| 6.6667 | 380 | 1.0401 | - |
| 6.8421 | 390 | 1.0732 | - |
| 7.0 | 399 | - | 0.4624 |
| 7.0175 | 400 | 1.1137 | - |
| 7.1930 | 410 | 1.0946 | - |
| 7.3684 | 420 | 1.1581 | - |
| 7.5439 | 430 | 1.0605 | - |
| 7.7193 | 440 | 1.076 | - |
| 7.8947 | 450 | 1.2689 | - |
| 8.0 | 456 | - | 0.4680 |
| 8.0702 | 460 | 1.0004 | - |
| 8.2456 | 470 | 1.1387 | - |
| 8.4211 | 480 | 1.0652 | - |
| 8.5965 | 490 | 1.0879 | - |
| 8.7719 | 500 | 1.1845 | - |
| 8.9474 | 510 | 1.0979 | - |
| 9.0 | 513 | - | 0.4684 |
| 9.1228 | 520 | 1.0588 | - |
| 9.2982 | 530 | 1.2412 | - |
| 9.4737 | 540 | 1.0261 | - |
| 9.6491 | 550 | 1.0919 | - |
| 9.8246 | 560 | 1.129 | - |
| 10.0 | 570 | 1.0425 | 0.4676 |
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{kusupati2024matryoshka,
2 title={Matryoshka Representation Learning},
3 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},
4 year={2024},
5 eprint={2205.13147},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG}
8}1@misc{henderson2017efficient,
2 title={Efficient Natural Language Response Suggestion for Smart Reply},
3 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},
4 year={2017},
5 eprint={1705.00652},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL}
8}