Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
Paper • 1908.10084 • Published • 19
Run nadinekl/scifact-ft-bi on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/nadinekl/scifact-ft-bi. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/nadinekl/scifact-ft-bi on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use nadinekl/scifact-ft-bi with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("nadinekl/scifact-ft-bi")
sentences = [
"Represent this sentence for searching relevant passages: Formation of N-terminal pyroglutamate by glutamine cyclase (GC) competes with NTAQ1 for Nt-Gln substrates.",
"Proteomic analysis reveals Warburg effect and anomalous metabolism of glutamine in pancreatic cancer cells.. In this present work, we characterized the proteomes of pancreatic ductal adenocarcinoma (PDAC) cell line PANC-1 and normal pancreatic duct cells by mass spectrometry using LTQ-Orbitrap and identified more than 1700 proteins from each sample. On the basis of the spectra count label-free quantification approach, we identified a large number of differentially expressed metabolic enzymes and proteins involved in cytoskeleton, cell adhesion, transport, transcription, translation, and cell proliferation as well. The data demonstrated that metabolic pathways were altered in PANC-1, consistent with the Warburg effect. In addition, the comparative MS analysis unveiled anomalous metabolism of glutamine, suggesting that glutamine was largely consumed as a nitrogen donor in nucleotide and amino acid biosynthesis in PANC-1. Our analysis provides a potentially comprehensive picture of metabolism in PANC-1, which may serve as the basis of new diagnostics and treatment of PDAC.",
"Glutamine-specific N-terminal amidase, a component of the N-end rule pathway.. Deamidation of N-terminal Gln by Nt(Q)-amidase, an N-terminal amidohydrolase, is a part of the N-end rule pathway of protein degradation. We detected the activity of Nt(Q)-amidase, termed Ntaq1, in mouse tissues, purified Ntaq1 from bovine brains, identified its gene, and began analyzing this enzyme. Ntaq1 is highly conserved among animals, plants, and some fungi, but its sequence is dissimilar to sequences of other amidases. An earlier mutant in the Drosophila Cg8253 gene that we show here to encode Nt(Q)-amidase has defective long-term memory. Other studies identified protein ligands of the uncharacterized human C8orf32 protein that we show here to be the Ntaq1 Nt(Q)-amidase. Remarkably, \"high-throughput\" studies have recently solved the crystal structure of C8orf32 (Ntaq1). Our site-directed mutagenesis of Ntaq1 and its crystal structure indicate that the active site and catalytic mechanism of Nt(Q)-amidase are similar to those of transglutaminases.",
"The developmental potential of iPSCs is greatly influenced by reprogramming factor selection.. Induced pluripotent stem cells (iPSCs) are commonly generated by transduction of Oct4, Sox2, Klf4, and Myc (OSKM) into cells. Although iPSCs are pluripotent, they frequently exhibit high variation in terms of quality, as measured in mice by chimera contribution and tetraploid complementation. Reliably high-quality iPSCs will be needed for future therapeutic applications. Here, we show that one major determinant of iPSC quality is the combination of reprogramming factors used. Based on tetraploid complementation, we found that ectopic expression of Sall4, Nanog, Esrrb, and Lin28 (SNEL) in mouse embryonic fibroblasts (MEFs) generated high-quality iPSCs more efficiently than other combinations of factors including OSKM. Although differentially methylated regions, transcript number of master regulators, establishment of specific superenhancers, and global aneuploidy were comparable between high- and low-quality lines, aberrant gene expression, trisomy of chromosome 8, and abnormal H2A.X deposition were distinguishing features that could potentially also be applicable to human."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]This is a sentence-transformers model finetuned from BAAI/bge-base-en-v1.5. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, classification, clustering, and more.
SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'BertModel'})
(1): Pooling({'embedding_dimension': 768, 'pooling_mode': 'cls', '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("sentence_transformers_model_id")
# Run inference
sentences = [
'Represent this sentence for searching relevant passages: The proliferative capacity of progenitors is regulated cell-autonomously.',
'2D and 3D Stem Cell Models of Primate Cortical Development Identify Species-Specific Differences in Progenitor Behavior Contributing to Brain Size.. Variation in cerebral cortex size and complexity is thought to contribute to differences in cognitive ability between humans and other animals. Here we compare cortical progenitor cell output in humans and three nonhuman primates using directed differentiation of pluripotent stem cells (PSCs) in adherent two-dimensional (2D) and organoid three-dimensional (3D) culture systems. Clonal lineage analysis showed that primate cortical progenitors proliferate for a protracted period of time, during which they generate early-born neurons, in contrast to rodents, where this expansion phase largely ceases before neurogenesis begins. The extent of this additional cortical progenitor expansion differs among primates, leading to differences in the number of neurons generated by each progenitor cell. We found that this mechanism for controlling cortical size is regulated cell autonomously in culture, suggesting that primate cerebral cortex size is regulated at least in part at the level of individual cortical progenitor cell clonal output.',
'Physiological relevance of cell cycle kinases.. The basic biology of the cell division cycle and its control by protein kinases was originally studied through genetic and biochemical studies in yeast and other model organisms. The major regulatory mechanisms identified in this pioneer work are conserved in mammals. However, recent studies in different cell types or genetic models are now providing a new perspective on the function of these major cell cycle regulators in different tissues. Here, we review the physiological relevance of mammalian cell cycle kinases such as cyclin-dependent kinases (Cdks), Aurora and Polo-like kinases, and mitotic checkpoint regulators (Bub1, BubR1, and Mps1) as well as other less-studied enzymes such as Cdc7, Nek proteins, or Mastl and their implications in development, tissue homeostasis, and human disease. Among these functions, the control of self-renewal or asymmetric cell division in stem/progenitor cells and the ability to regenerate injured tissues is a central issue in current research. In addition, many of these proteins play previously unexpected roles in metabolism, cardiovascular function, or neuron biology. The modulation of their enzymatic activity may therefore have multiple therapeutic benefits in human disease.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.6032, 0.4148],
# [0.6032, 1.0000, 0.2864],
# [0.4148, 0.2864, 1.0000]])
anchor, positive, and negative| anchor | positive | negative | |
|---|---|---|---|
| type | string | string | string |
| modality | text | text | text |
| details |
|
|
|
| anchor | positive | negative |
|---|---|---|
Represent this sentence for searching relevant passages: 0-dimensional biomaterials lack inductive properties. |
New opportunities: the use of nanotechnologies to manipulate and track stem cells.. Nanotechnologies are emerging platforms that could be useful in measuring, understanding, and manipulating stem cells. Examples include magnetic nanoparticles and quantum dots for stem cell labeling and in vivo tracking; nanoparticles, carbon nanotubes, and polyplexes for the intracellular delivery of genes/oligonucleotides and protein/peptides; and engineered nanometer-scale scaffolds for stem cell differentiation and transplantation. This review examines the use of nanotechnologies for stem cell tracking, differentiation, and transplantation. We further discuss their utility and the potential concerns regarding their cytotoxicity. |
Analysis of SiO2 nanoparticles binding proteins in rat blood and brain homogenate. A multitude of nanoparticles, such as titanium oxide (TiO2), zinc oxide, aluminum oxide, gold oxide, silver oxide, iron oxide, and silica oxide, are found in many chemical, cosmetic, pharmaceutical, and electronic products. Recently, SiO2 nanoparticles were shown to have an inert toxicity profile and no association with an irreversible toxicological change in animal models. Hence, exposure to SiO2 nanoparticles is on the increase. SiO2 nanoparticles are routinely used in numerous materials, from strengthening filler for concrete and other construction composites, to nontoxic platforms for biomedical application, such as drug delivery and theragnostics. On the other hand, recent in vitro experiments indicated that SiO2 nanoparticles were cytotoxic. Therefore, we investigated these nanoparticles to identify potentially toxic pathways by analyzing the adsorbed protein corona on the surface of SiO2 nanoparti... |
Represent this sentence for searching relevant passages: 4-PBA treatment decreases endoplasmic reticulum stress in response to general endoplasmic reticulum stress markers. |
Wolfram syndrome 1 and adenylyl cyclase 8 interact at the plasma membrane to regulate insulin production and secretion. Endoplasmic reticulum (ER) stress causes pancreatic β-cell dysfunction and contributes to β-cell loss and the progression of type 2 diabetes. Wolfram syndrome 1 (WFS1) has been shown to be an important regulator of the ER stress signalling pathway; however, its role in β-cell function remains unclear. Here we provide evidence that WFS1 is essential for glucose- and glucagon-like peptide 1 (GLP-1)-stimulated cyclic AMP production and regulation of insulin biosynthesis and secretion. Stimulation with glucose causes WFS1 translocation from the ER to the plasma membrane, where it forms a complex with adenylyl cyclase 8 (AC8), an essential cAMP-generating enzyme in the β-cell that integrates glucose and GLP-1 signalling. ER stress and mutant WFS1 inhibit complex formation and activation of AC8, reducing cAMP synthesis and insulin secretion. These findings reveal that an ER... |
Ubiquitin-dependent intramembrane rhomboid protease promotes ERAD of membrane proteins.. The ER-associated degradation (ERAD) pathway serves as an important cellular safeguard by directing incorrectly folded and unassembled proteins from the ER to the proteasome. Still, however, little is known about the components mediating ERAD of membrane proteins. Here we show that the evolutionary conserved rhomboid family protein RHBDL4 is a ubiquitin-dependent ER-resident intramembrane protease that is upregulated upon ER stress. RHBDL4 cleaves single-spanning and polytopic membrane proteins with unstable transmembrane helices, leading to their degradation by the canonical ERAD machinery. RHBDL4 specifically binds the AAA+-ATPase p97, suggesting that proteolytic processing and dislocation into the cytosol are functionally linked. The phylogenetic relationship between rhomboids and the ERAD factor derlin suggests that substrates for intramembrane proteolysis and protein dislocation are recruited ... |
Represent this sentence for searching relevant passages: Pyridostatin stabilizes the G - quadruplex in the telomeric region. |
Targeting BRCA1 and BRCA2 Deficiencies with G-Quadruplex-Interacting Compounds. G-quadruplex (G4)-forming genomic sequences, including telomeres, represent natural replication fork barriers. Stalled replication forks can be stabilized and restarted by homologous recombination (HR), which also repairs DNA double-strand breaks (DSBs) arising at collapsed forks. We have previously shown that HR facilitates telomere replication. Here, we demonstrate that the replication efficiency of guanine-rich (G-rich) telomeric repeats is decreased significantly in cells lacking HR. Treatment with the G4-stabilizing compound pyridostatin (PDS) increases telomere fragility in BRCA2-deficient cells, suggesting that G4 formation drives telomere instability. Remarkably, PDS reduces proliferation of HR-defective cells by inducing DSB accumulation, checkpoint activation, and deregulated G2/M progression and by enhancing the replication defect intrinsic to HR deficiency. PDS toxicity extends to HR-defective c... |
Rational design of acridine-based ligands with selectivity for human telomeric quadruplexes.. Structure-based modeling methods have been used to design a series of disubstituted triazole-linked acridine compounds with selectivity for human telomeric quadruplex DNAs. A focused library of these compounds was prepared using click chemistry and the selectivity concept was validated against two promoter quadruplexes from the c-kit gene with known molecular structures, as well as with duplex DNA using a FRET-based melting method. Lead compounds were found to have reduced effects on the thermal stability of the c-kit quadruplexes and duplex DNA structures. These effects were further explored with a series of competition experiments, which confirmed that binding to duplex DNA is very low even at high duplex:telomeric quadruplex ratios. Selectivity to the c-kit quadruplexes is more complex, with some evidence of their stabilization at increasing excess over human telomeric quadruplex DNA. Selec... |
MultipleNegativesRankingLoss with these parameters:{
"scale": 20.0,
"similarity_fct": "cos_sim",
"gather_across_devices": false,
"directions": [
"query_to_doc"
],
"partition_mode": "joint",
"hardness_mode": null,
"hardness_strength": 0.0
}
per_device_train_batch_size: 32learning_rate: 2e-05warmup_steps: 0.1fp16: Truebatch_sampler: no_duplicatesper_device_train_batch_size: 32num_train_epochs: 3max_steps: -1learning_rate: 2e-05lr_scheduler_type: linearlr_scheduler_kwargs: Nonewarmup_steps: 0.1optim: adamw_torch_fusedoptim_args: Noneweight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08optim_target_modules: Nonegradient_accumulation_steps: 1average_tokens_across_devices: Truemax_grad_norm: 1.0label_smoothing_factor: 0.0bf16: Falsefp16: Truebf16_full_eval: Falsefp16_full_eval: Falsetf32: Noneactivation_checkpointing: Falseactivation_checkpointing_kwargs: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Nonetorch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneuse_liger_kernel: Falseliger_kernel_config: Noneuse_cache: Falseneftune_noise_alpha: Nonetorch_empty_cache_steps: Noneauto_find_batch_size: Falselog_on_each_node: Truelogging_nan_inf_filter: Trueinclude_num_input_tokens_seen: nolog_level: passivelog_level_replica: warningdisable_tqdm: Falseproject: huggingfacetrackio_space_id: Nonetrackio_bucket_id: Nonetrackio_static_space_id: Noneper_device_eval_batch_size: 8prediction_loss_only: Trueeval_on_start: Falseeval_do_concat_batches: Trueeval_use_gather_object: Falseeval_accumulation_steps: Noneinclude_for_metrics: []batch_eval_metrics: Falsesave_only_model: Falsesave_on_each_node: Falseenable_jit_checkpoint: Falsepush_to_hub: Falsehub_private_repo: Nonehub_model_id: Nonehub_strategy: every_savehub_always_push: Falsehub_revision: Noneload_best_model_at_end: Falseignore_data_skip: Falserestore_callback_states_from_checkpoint: Falsefull_determinism: Falseseed: 42data_seed: Noneuse_cpu: Falseaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}parallelism_config: Nonedataloader_drop_last: Falsedataloader_num_workers: 0dataloader_pin_memory: Truedataloader_persistent_workers: Falsedataloader_prefetch_factor: Nonedataloader_multiprocessing_context: Nonedataloader_in_order: Trueremove_unused_columns: Truelabel_names: Nonetrain_sampling_strategy: randomlength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falseddp_static_graph: Noneddp_backend: Noneddp_timeout: 1800fsdp: Nonefsdp_config: Nonedeepspeed: Nonedebug: []skip_memory_metrics: Truedo_predict: Falseresume_from_checkpoint: Nonelocal_rank: -1prompts: Nonebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {}warmup_ratio: None@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{oord2019representationlearningcontrastivepredictive,
title={Representation Learning with Contrastive Predictive Coding},
author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
year={2019},
eprint={1807.03748},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1807.03748},
}
Base model
BAAI/bge-base-en-v1.5