How to use kamalkraj/BioSimCSE-BioLinkBERT-BASE with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("kamalkraj/BioSimCSE-BioLinkBERT-BASE") sentences = [ "The up-regulation of miR-146a was also detected in cervical cancer tissues.", "The expression of miR-146a has been found to be up-regulated in cervical cancer.", "Only concomitant ablation of ERK1 and ERK2 impairs tumor growth." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3]
How to use kamalkraj/BioSimCSE-BioLinkBERT-BASE with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("kamalkraj/BioSimCSE-BioLinkBERT-BASE") model = AutoModel.from_pretrained("kamalkraj/BioSimCSE-BioLinkBERT-BASE")