Sentence Similarity
sentence-transformers
Safetensors
Model2Vec
Transformers
English
feature-extraction
embeddings
static-embeddings
Instructions to use NeuML/pubmedbert-base-embeddings-2M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use NeuML/pubmedbert-base-embeddings-2M with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("NeuML/pubmedbert-base-embeddings-2M") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use NeuML/pubmedbert-base-embeddings-2M with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("NeuML/pubmedbert-base-embeddings-2M", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
c55a52c
1
Parent(s): 1d7bbe0
Update README
Browse files
README.md
CHANGED
|
@@ -72,12 +72,11 @@ print(embeddings)
|
|
| 72 |
|
| 73 |
The following compares performance of this model against the models previously compared with [PubMedBERT Embeddings](https://huggingface.co/NeuML/pubmedbert-base-embeddings#evaluation-results). The following datasets were used to evaluate model performance.
|
| 74 |
|
| 75 |
-
- [PubMed QA](https://huggingface.co/datasets/
|
| 76 |
- Subset: pqa_labeled, Split: train, Pair: (question, long_answer)
|
| 77 |
- [PubMed Subset](https://huggingface.co/datasets/awinml/pubmed_abstract_3_1k)
|
| 78 |
- Split: test, Pair: (title, text)
|
| 79 |
-
|
| 80 |
-
- [PubMed Summary](https://huggingface.co/datasets/scientific_papers)
|
| 81 |
- Subset: pubmed, Split: validation, Pair: (article, abstract)
|
| 82 |
|
| 83 |
The [Pearson correlation coefficient](https://en.wikipedia.org/wiki/Pearson_correlation_coefficient) is used as the evaluation metric.
|
|
|
|
| 72 |
|
| 73 |
The following compares performance of this model against the models previously compared with [PubMedBERT Embeddings](https://huggingface.co/NeuML/pubmedbert-base-embeddings#evaluation-results). The following datasets were used to evaluate model performance.
|
| 74 |
|
| 75 |
+
- [PubMed QA](https://huggingface.co/datasets/qiaojin/PubMedQA)
|
| 76 |
- Subset: pqa_labeled, Split: train, Pair: (question, long_answer)
|
| 77 |
- [PubMed Subset](https://huggingface.co/datasets/awinml/pubmed_abstract_3_1k)
|
| 78 |
- Split: test, Pair: (title, text)
|
| 79 |
+
- [PubMed Summary](https://huggingface.co/datasets/armanc/scientific_papers)
|
|
|
|
| 80 |
- Subset: pubmed, Split: validation, Pair: (article, abstract)
|
| 81 |
|
| 82 |
The [Pearson correlation coefficient](https://en.wikipedia.org/wiki/Pearson_correlation_coefficient) is used as the evaluation metric.
|