Model reference · open weights

biomedbert-embeddings

Embeddings NeuML Embeddings 1 build Open weights 939 dl/mo

biomedbert-embeddings is an open-weight embedding model from NeuML. biomedbert-base-embeddings (FP32) weighs 219 MB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • biomedbert-base-embeddings is a 109M parameter sentence-similarity model by NeuML that maps English text to 768-dimensional vectors for clustering and semantic search.
  • It features a 512-token context length and is released under the apache-2.0 licence.
  • The model was fine-tuned using a distillation process on PubMed title-abstract pairs to improve accuracy over the original PubMedBERT embeddings.

Summary of the NeuML/biomedbert-base-embeddings model card, 2026-10-01

What it is

Released byNeuML
Released2026-04-28
Parameters109M
VRAM219 MB for the weights

What it runs on

Memory and cards for biomedbert-base-embeddings (FP32)

219 MBweights, file size
1.1 GBruntime overhead
CardRunsMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What NeuML says about biomedbert-embeddings

Read the model card

This is the PubMedBERT-base-embeddings model fined-tuned using sentence-transformers. It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.

The training dataset was generated using a random sample of PubMed title-abstract pairs along with similar title pairs. The training workflow was a distillation process as follows.

  • Build a distilled dataset of teacher scores using the biomedbert-base-reranker cross-encoder for a separate random sample of title-abstract pairs.
  • Further fine-tune the model on the distilled dataset using KLDivLoss.

This model gives the original PubMedBERT Embeddings model an accuracy boost via the same method uses to train smaller model variants.

Usage (txtai)

This model can be used to build embeddings databases with txtai for semantic search and/or as a knowledge source for retrieval augmented generation (RAG).

import txtai

embeddings = txtai.Embeddings(path="neuml/biomedbert-base-embeddings", content=True)
embeddings.index(documents())

# Run a query
embeddings.search("query to run")

Usage (Sentence-Transformers)

Alternatively, the model can be loaded with sentence-transformers.

from sentence_transformers import SentenceTransformer
sentences = ["This is an example sentence", "Each sentence is converted"]

model = SentenceTransformer("neuml/biomedbert-base-embeddings")
embeddings = model.encode(sentences)
print(embeddings)

Usage (Hugging Face Transformers)

The model can also be used directly with Transformers.

from transformers import AutoTokenizer, AutoModel
import torch

# Mean Pooling - Take attention mask into account for correct averaging
def meanpooling(output, mask):
    embeddings = output[0] # First element of model_output contains all token embeddings
    mask = mask.unsqueeze(-1).expand(embeddings.size()).float()
    return torch.sum(embeddings * mask, 1) / torch.clamp(mask.sum(1), min=1e-9)

# Sentences we want sentence embeddings for
sentences = ['This is an example sentence', 'Each sentence is converted']

# Load model from HuggingFace Hub
tokenizer = AutoTokenizer.from_pretrained("neuml/biomedbert-base-embeddings")
model = AutoModel.from_pretrained("neuml/biomedbert-base-embeddings")

# Tokenize sentences
inputs = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')

# Compute token embeddings
with torch.no_grad():
    output = model(**inputs)

# Perform pooling. In this case, mean pooling.
embeddings = meanpooling(output, inputs['attention_mask'])

print("Sentence embeddings:")
print(embeddings)

Evaluation Results

Performance of this model compared to the top base models on the MTEB leaderboard is shown below. A popular smaller model was also evaluated along with the most downloaded PubMed similarity model on the Hugging Face Hub.

The following datasets were used to evaluate model performance.

  • PubMed QA
    • Subset: pqa_labeled, Split: train, Pair: (question, long_answer)
  • PubMed Subset
    • Split: test, Pair: (title, text)
  • PubMed Summary
    • Subset: pubmed, Split: validation, Pair: (article, abstract)

Evaluation results are shown below. The Pearson correlation coefficient is used as the evaluation metric.

ModelPubMed QAPubMed SubsetPubMed SummaryAverage
all-MiniLM-L6-v290.4095.9294.0793.46
biomedbert-base-colbert94.5997.1896.2195.99
biomedbert-base-embeddings94.6098.3997.6196.87
biomedbert-base-reranker97.6699.7698.8198.74
biomedbert-small-colbert93.5197.2095.8595.52
biomedbert-small-embeddings93.2597.9396.6595.94
biomedbert-hash-nano-embeddings90.3996.2995.3294.00
pubmedbert-base-embeddings93.2797.0096.5895.62

This model gives a sizable accuracy boost over the original PubMedBERT Embeddings model.

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False, 'architecture': 'BertModel'})
  (1): Pooling({'word_embedding_dimension': 768, '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})
)

More Information

Read more about the model in this article.

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms