Views
No views yet
SentenceTransformer(
(0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
(1): Pooling({'word_embedding_dimension': 1024, '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()
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("FareedKhan/BAAI_bge-m3_FareedKhan_prime_synthetic_data_2k_2_4")
5# Run inference
6sentences = [
7 "\nRNASE6, also known by aliases such as RAD1, RNS6, and RNasek6, functions as a member of the ribonuclease A superfamily. Specifically identified via the NCBI gene/protein database, this protein is related to the antimicrobial peptides pathway, showcasing broad-spectrum antimicrobial activity against pathogenic bacteria in the urinary tract. The provided gene summary emphasizes its role in the urinary tract, highlighting its enzymatic function and broad antimicrobial capability.\n\nWith a genomic position spanning from 20781268 to 20782467 on chromosome 14, the RNASE6 gene encodes a protein named ribonuclease A family member k6. The protein's interactions with cellular and molecular functions are integral to its role, including its interaction with molecular functions like ribonuclease activity and endonuclease activity, as well as its involvement in nucleic acid binding.\n\nRNASE6's involvement in biological",
8 'Identify genes or proteins linked to encephalopathy that are involved in the Antimicrobial peptides pathway and have interactions with molecular functions associated with ribonuclease activity.',
9 'Identify the common gene targets that interact with both N-(3,5-dibromo-4-hydroxyphenyl)benzamide and Diflunisal.',
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.shape)
18# [3, 3]dim_768InformationRetrievalEvaluator| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.4653 |
| cosine_accuracy@3 | 0.5149 |
| cosine_accuracy@5 | 0.5297 |
| cosine_accuracy@10 | 0.5644 |
| cosine_precision@1 | 0.4653 |
| cosine_precision@3 | 0.1716 |
| cosine_precision@5 | 0.1059 |
| cosine_precision@10 | 0.0564 |
| cosine_recall@1 | 0.4653 |
| cosine_recall@3 | 0.5149 |
| cosine_recall@5 | 0.5297 |
| cosine_recall@10 | 0.5644 |
| cosine_ndcg@10 | 0.5137 |
| cosine_mrr@10 | 0.4977 |
| cosine_map@100 | 0.5031 |
positive and anchor| positive | anchor | |
|---|---|---|
| type | string | string |
| details |
|
|
| positive | anchor |
|---|---|
[object Object][object Object]The list you've provided seems to be a collection of various chemical compounds and drug names. These chemicals and drugs are used across multiple fields such as pharmacology, microbiology, and biochemistry. Here are some explanations and examples for the categories:[object Object][object Object]1. [object Object]:[object Object] - [object Object]: An antibiotic used to treat serious bacterial infections.[object Object] - [object Object]: Used for the treatment of blood clots, particularly in people with atrial fibrillation.[object Object] - [object Object]: An anti-inflammatory medication.[object Object] - [object Object]: These are also antibiotics that are effective against various types of microorganisms.[object Object][object Object]2. [object Object]:[object Object] - [object Object]: These are usually found in plants and can have estrogen-like actions, sometimes used in dietary supplements.[object Object] - [object Object]: Antibiotics used for specific infections in humans.[object Object] | Is there a list of medications that not only exhibit a synergistic effect when combined with Reteplase for managing a common condition but also share Warfarin's mechanism of inhibiting vitamin K reductase, leading to a depletion of reduced vitamin K levels? |
[object Object]Pterygium, a benign conjunctival neoplasm subtype, is associated with the BICD2 gene/protein, according to the document. This wedge-shaped fibrovascular lesion, originating from the bulbar conjunctiva and extending to the cornea, is linked to pterygium due to chronic exposure to solar ultraviolet radiation, heat, and dust. Pterygium may cause severe vision loss and studies suggest it could be related to neoplastic proliferation and be a stem cell disorder. The document also connects pterygium to the IFNA2 gene/protein alongside BICD2, and it is classified among familial pterygium of the conjunctiva, conjunctival pterygium, benign neoplasm of cornea, and benign conjunctival neoplasm. | Which benign conjunctival neoplasm subtype is associated with the BICD2 gene/protein? |
[object Object]The query you provided is a complex request that seems to be aimed at finding specific genes in the human genome. Here's a breakdown of the components of the query:[object Object][object Object]1. [object Object]: It's searching a database of human long non-coding RNAs (lncRNAs) using an SQL-like query, which is a powerful way to filter through large datasets to find specific genes or transcripts.[object Object][object Object]2. [object Object]: A few columns are explicitly mentioned:[object Object] - [object Object]: This likely refers to the gene identifier.[object Object] - [object Object]: Identifies which chromosome the gene is located on.[object Object] - [object Object]: The starting position of the gene on the chromosome.[object Object] - [object Object]: The ending position of the gene on the chromosome.[object Object][object Object]3. [object Object]: Some columns are related to the DNA sequence of the gene:[object Object] - [object Object]: The full DNA sequence of the gene.[object Object] - [object Object]: Length of the DNA sequence.[object Object][object Object]4. [object Object]: It looks for annotations related to lncRNAs:[object Object] - [object Object]: The type of lncRNA.[object Object] - [object Object]: A specific name for the lncRNA.[object Object][object Object]5. [object Object]:[object Object] - [object Object]: Checks for overlapping or interacting lncRNAs with the query lncRNA.[object Object][object Object]6. [object Object]:[object Object] - [object Object]: Name of the microRNA.[object Object] - [object Object]: Type of the microRNA.[object Object][object Object]7. [object Object]: It also seems to include a list of other gene symbols in the form [object Object]. These might be part of a query to filter or compare against a list of lncRNAs or genes.[object Object][object Object]### How It Works:[object Object]This query is highly specific and might be used by bioinformaticians or researchers to explore interactions between different types of RNA molecules, particularly long non-coding RNAs and microRNAs, within the context of human genetics. It allows for detailed inquiries into gene positions, interactions, and annotations, which are crucial for understanding regulatory processes | Which anatomical structures lack the expression of genes or proteins that play a role in the organization of microvilli? |
MatryoshkaLoss with these parameters:
1{
2 "loss": "MultipleNegativesRankingLoss",
3 "matryoshka_dims": [
4 768
5 ],
6 "matryoshka_weights": [
7 1
8 ],
9 "n_dims_per_step": -1
10}eval_strategy: epochper_device_train_batch_size: 4learning_rate: 1e-05num_train_epochs: 2warmup_ratio: 0.1bf16: Truetf32: Falseload_best_model_at_end: Trueoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: epochprediction_loss_only: Trueper_device_train_batch_size: 4per_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: 2max_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_768_cosine_map@100 |
|---|---|---|---|
| 0 | 0 | - | 0.4068 |
| 0.0220 | 10 | 0.6723 | - |
| 0.0441 | 20 | 0.4606 | - |
| 0.0661 | 30 | 0.4175 | - |
| 0.0881 | 40 | 0.5941 | - |
| 0.1101 | 50 | 0.6731 | - |
| 0.1322 | 60 | 0.6091 | - |
| 0.1542 | 70 | 0.2194 | - |
| 0.1762 | 80 | 0.4262 | - |
| 0.1982 | 90 | 0.5397 | - |
| 0.2203 | 100 | 0.3848 | - |
| 0.2423 | 110 | 0.4412 | - |
| 0.2643 | 120 | 0.4608 | - |
| 0.2863 | 130 | 0.3824 | - |
| 0.3084 | 140 | 0.3241 | - |
| 0.3304 | 150 | 0.3768 | - |
| 0.3524 | 160 | 0.4086 | - |
| 0.3744 | 170 | 0.1928 | - |
| 0.3965 | 180 | 0.5528 | - |
| 0.4185 | 190 | 0.4628 | - |
| 0.4405 | 200 | 0.1467 | - |
| 0.4626 | 210 | 0.3845 | - |
| 0.4846 | 220 | 0.275 | - |
| 0.5066 | 230 | 0.3052 | - |
| 0.5286 | 240 | 0.3463 | - |
| 0.5507 | 250 | 0.3588 | - |
| 0.5727 | 260 | 0.2317 | - |
| 0.5947 | 270 | 0.14 | - |
| 0.6167 | 280 | 0.5766 | - |
| 0.6388 | 290 | 0.4077 | - |
| 0.6608 | 300 | 0.4412 | - |
| 0.6828 | 310 | 0.3011 | - |
| 0.7048 | 320 | 0.1437 | - |
| 0.7269 | 330 | 0.3659 | - |
| 0.7489 | 340 | 0.5164 | - |
| 0.7709 | 350 | 0.4847 | - |
| 0.7930 | 360 | 0.1533 | - |
| 0.8150 | 370 | 0.4391 | - |
| 0.8370 | 380 | 0.195 | - |
| 0.8590 | 390 | 0.1703 | - |
| 0.8811 | 400 | 0.5926 | - |
| 0.9031 | 410 | 0.193 | - |
| 0.9251 | 420 | 0.1602 | - |
| 0.9471 | 430 | 0.3054 | - |
| 0.9692 | 440 | 0.1246 | - |
| 0.9912 | 450 | 0.1128 | - |
| 1.0 | 454 | - | 0.4923 |
| 1.0132 | 460 | 0.3826 | - |
| 1.0352 | 470 | 0.3034 | - |
| 1.0573 | 480 | 0.416 | - |
| 1.0793 | 490 | 0.1682 | - |
| 1.1013 | 500 | 0.2183 | - |
| 1.1233 | 510 | 0.2287 | - |
| 1.1454 | 520 | 0.0765 | - |
| 1.1674 | 530 | 0.2437 | - |
| 1.1894 | 540 | 0.0393 | - |
| 1.2115 | 550 | 0.2171 | - |
| 1.2335 | 560 | 0.0611 | - |
| 1.2555 | 570 | 0.0328 | - |
| 1.2775 | 580 | 0.168 | - |
| 1.2996 | 590 | 0.1535 | - |
| 1.3216 | 600 | 0.1937 | - |
| 1.3436 | 610 | 0.3172 | - |
| 1.3656 | 620 | 0.3847 | - |
| 1.3877 | 630 | 0.0818 | - |
| 1.4097 | 640 | 0.3286 | - |
| 1.4317 | 650 | 0.3761 | - |
| 1.4537 | 660 | 0.1369 | - |
| 1.4758 | 670 | 0.1861 | - |
| 1.4978 | 680 | 0.2745 | - |
| 1.5198 | 690 | 0.3078 | - |
| 1.5419 | 700 | 0.205 | - |
| 1.5639 | 710 | 0.2251 | - |
| 1.5859 | 720 | 0.2627 | - |
| 1.6079 | 730 | 0.2258 | - |
| 1.6300 | 740 | 0.0863 | - |
| 1.6520 | 750 | 0.2577 | - |
| 1.6740 | 760 | 0.1943 | - |
| 1.6960 | 770 | 0.1056 | - |
| 1.7181 | 780 | 0.1382 | - |
| 1.7401 | 790 | 0.0169 | - |
| 1.7621 | 800 | 0.2602 | - |
| 1.7841 | 810 | 0.1094 | - |
| 1.8062 | 820 | 0.1261 | - |
| 1.8282 | 830 | 0.2647 | - |
| 1.8502 | 840 | 0.0952 | - |
| 1.8722 | 850 | 0.13 | - |
| 1.8943 | 860 | 0.0819 | - |
| 1.9163 | 870 | 0.1194 | - |
| 1.9383 | 880 | 0.2118 | - |
| 1.9604 | 890 | 0.0667 | - |
| 1.9824 | 900 | 0.2501 | - |
| 2.0 | 908 | - | 0.5031 |
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}