Model reference · open weights

pubmedbert-embeddings

Embeddings NeuML Embeddings 1 build Open weights 533 dl/mo

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

  • pubmedbert-embeddings is an 8M parameter sentence-similarity model by NeuML designed for semantic search and retrieval augmented generation.
  • It uses static embeddings to enable fast text processing on CPUs without requiring a GPU.
  • The model supports English and is released under the apache-2.0 license.

Summary of the NeuML/pubmedbert-base-embeddings-8M model card, 2026-10-01

What it is

Released byNeuML
Released2025-01-03
Parameters8M
VRAM16 MB for the weights

What it runs on

Memory and cards for pubmedbert-base-embeddings-8M (FP32)

16 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 pubmedbert-embeddings

Read the model card

This is a distilled version of PubMedBERT Embeddings using the Model2Vec library. It uses static embeddings, allowing text embeddings to be computed orders of magnitude faster on both GPU and CPU. It is designed for applications where computational resources are limited or where real-time performance is critical.

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

# Create embeddings
embeddings = txtai.Embeddings(
  path="neuml/pubmedbert-base-embeddings-8M",
  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
from sentence_transformers.models import StaticEmbedding

# Initialize a StaticEmbedding module
static = StaticEmbedding.from_model2vec("neuml/pubmedbert-base-embeddings-8M")
model = SentenceTransformer(modules=[static])

sentences = ["This is an example sentence", "Each sentence is converted"]
embeddings = model.encode(sentences)
print(embeddings)

Usage (Model2Vec)

The model can also be used directly with Model2Vec.

from model2vec import StaticModel

# Load a pretrained Model2Vec model
model = StaticModel.from_pretrained("neuml/pubmedbert-base-embeddings-8M")

# Compute text embeddings
sentences = ["This is an example sentence", "Each sentence is converted"]
embeddings = model.encode(sentences)
print(embeddings)

Evaluation Results

The following compares performance of this model against the models previously compared with PubMedBERT Embeddings. 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)

The Pearson correlation coefficient is used as the evaluation metric.

ModelPubMed QAPubMed SubsetPubMed SummaryAverage
all-MiniLM-L6-v290.4095.9294.0793.46
bge-base-en-v1.591.0295.8294.4993.78
gte-base92.9796.9096.2495.37
pubmedbert-base-embeddings-2M88.6293.0893.2491.65
pubmedbert-base-embeddings-8M90.0594.2994.1592.83
pubmedbert-base-embeddings93.2797.0096.5895.62
S-PubMedBert-MS-MARCO90.8693.6893.5492.69

As we can see, this model while not the top scoring model is certainly competitive.

Runtime performance

As another test, let's see how long each model takes to index 120K article abstracts using the following code. All indexing is done with a RTX 3090 GPU.

from datasets import load_dataset
from tqdm import tqdm
from txtai import Embeddings

ds = load_dataset("ccdv/pubmed-summarization", split="train")

embeddings = Embeddings(path="path to model", content=True, backend="numpy")
embeddings.index(tqdm(ds["abstract"]))
ModelParams (M)Index time (s)
all-MiniLM-L6-v222117
BM25-18
bge-base-en-v1.5109518
gte-base109523
pubmedbert-base-embeddings-2M217
pubmedbert-base-embeddings-8M818
pubmedbert-base-embeddings109462
S-PubMedBert-MS-MARCO109465

Clearly a static model's main upside is speed. It's important to note that if storage savings is the only concern, then take a look at PubMedBERT Embeddings Matryoshka. The 256 dimension model scores higher than this model, so does the 64 dimension model. The tradeoff is that the runtime performance i

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