BiomedNLP-BiomedBERT-base-uncased-abstract

microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract

microsoft 777K downloads mit Fill Mask
Frameworkstransformerspytorchjax
Languagesen
Tagsbertfill-maskexbert
Downloads
777K
License
mit
Pipeline
Fill Mask
Author
microsoft

Run BiomedNLP-BiomedBERT-base-uncased-abstract locally on a Q4KM hard drive

Accelerate deployment with Q4KM hard drives pre‑loaded with BiomedBERT‑base‑uncased‑abstract . Get instant, plug‑and‑play access to the model on ultra‑fast NVMe storage—perfect for on‑premise...

Shop Q4KM Drives

Technical Overview

Model ID: microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract
Author: Microsoft Research (MSR)
Framework: Transformers (PyTorch, JAX, TensorFlow compatible)
Pipeline tag: fill‑mask

The BiomedBERT‑base‑uncased‑abstract is a domain‑specific BERT‑style language model that was trained from scratch on the full text of PubMed abstracts (≈ 14 B tokens). Unlike “general‑domain” BERT variants that start from Wikipedia and BookCorpus, this model learns biomedical terminology, gene‑protein names, drug‑disease relations, and the stylistic patterns of scientific abstracts directly from the source corpus. The primary downstream task supported out‑of‑the‑box is the fill‑mask pipeline, enabling masked‑language‑model inference such as “[MASK] is a tyrosine kinase inhibitor.” The model can also be fine‑tuned for classification, NER, QA, and other biomedical tasks.

Key Features & Capabilities

  • Biomedical vocabulary: 30 K‑plus WordPiece tokens optimized for gene symbols, drug names, and clinical abbreviations.
  • Base‑size architecture: 12 transformer layers, 768 hidden units, 12 attention heads – 110 M parameters.
  • Uncased text: Case‑folded inputs reduce token‑vocabulary size while preserving meaning for abstracts.
  • Fill‑mask ready: Directly usable with pipeline("fill-mask") for rapid hypothesis generation.
  • State‑of‑the‑art on BLURB: Consistently ranks in the top‑5 across the Biomedical Language Understanding and Reasoning Benchmark.
  • Cross‑framework support: Works with PyTorch, TensorFlow, and JAX back‑ends via the 🤗 Transformers library.

Architecture Highlights

  • Bidirectional encoder (BERT‑base) with self‑attention layers.
  • Pre‑training objective: Masked Language Modeling (MLM) on PubMed abstracts only.
  • Training from scratch – no initialization from general‑domain BERT.
  • Vocabulary built with the WordPiece algorithm on the biomedical corpus, yielding a token set that captures rare scientific terms.

Intended Use Cases

  • Masked‑language‑model inference for hypothesis generation in drug discovery.
  • Fine‑tuning for biomedical named‑entity recognition (genes, diseases, chemicals).
  • Clinical text classification (e.g., adverse‑event detection).
  • Question‑answering over PubMed abstracts or biomedical literature.
  • Embedding extraction for similarity search in biomedical knowledge graphs.

Benchmark Performance

BiomedBERT‑base‑uncased‑abstract was evaluated on the BLURB (Biomedical Language Understanding and Reasoning Benchmark) suite, which aggregates 13 tasks ranging from NER to relation extraction. The model consistently outperforms general‑domain BERT‑base and matches or exceeds the performance of PubMedBERT (full‑text) on abstract‑centric tasks, achieving an average macro‑F1 of 84.7 % across the benchmark. On the BioASQ factoid QA task, it reaches 78.2 % accuracy, a notable improvement over the 71 % baseline of BioBERT.

These benchmarks matter because biomedical NLP demands precise understanding of domain‑specific terminology and subtle contextual cues. High scores on BLURB translate to better downstream performance in real‑world applications such as literature triage, clinical decision support, and pharmacovigilance.

When compared to similar models—BioBERT, ClinicalBERT, and PubMedBERT (full‑text)—BiomedBERT‑base‑uncased‑abstract offers a favorable trade‑off: it is smaller than the full‑text variant (≈ 110 M vs. 340 M parameters) yet delivers comparable or superior results on abstract‑only tasks, making it faster to fine‑tune and cheaper to deploy.

Hardware Requirements

For inference, the model’s 110 M parameters occupy roughly 420 MiB of VRAM when loaded in FP16 precision. To run the fill‑mask pipeline comfortably with batch size = 1, a GPU with at least 4 GiB VRAM is sufficient, though a 6 GiB card (e.g., NVIDIA RTX 2060) provides headroom for longer sequences (up to 512 tokens) and larger batch sizes.

  • Recommended GPU: NVIDIA RTX 3060 (12 GiB) or higher for low‑latency serving.
  • CPU: Modern x86_64 CPU with ≥ 8 cores; inference can be performed on CPU‑only environments at ~ 30 ms per token on a 2.5 GHz core.
  • Storage: Model checkpoint (~ 420 MiB) + tokenizer files (~ 30 MiB) ≈ 0.5 GB total.
  • Performance: On a single RTX 3080, fill‑mask runs at ~ 150 tokens / ms (FP16) for 128‑token inputs.

Use Cases

  • Drug discovery hypothesis generation: Masked‑language‑model predictions can suggest novel drug‑target relationships from abstract corpora.
  • Clinical trial literature screening: Fine‑tune on relevance classification to automatically triage PubMed abstracts for eligibility criteria.
  • Electronic health record (EHR) annotation: Use the model for NER of medical concepts (e.g., disease names, lab tests) after domain‑specific fine‑tuning.
  • Biomedical knowledge graph construction: Extract relational triples (drug‑treats‑disease) via masked inference and downstream relation classifiers.
  • Educational tools: Power interactive “fill‑in‑the‑blank” quizzes for medical students, leveraging the model’s ability to predict missing biomedical terms.

Training Details

BiomedBERT‑base‑uncased‑abstract was trained from scratch on the entire set of PubMed abstracts (approximately 14 B tokens) using the Masked Language Modeling (MLM) objective. The tokenizer was built with the WordPiece algorithm on the same corpus, resulting in a vocabulary of 30 K tokens.

  • Model size: 12 transformer layers, 768 hidden size, 12 attention heads (110 M parameters).
  • Training framework: Hugging Face 🤗 Transformers + 🤗 Accelerate, mixed‑precision (FP16) on NVIDIA A100 GPUs.
  • Compute budget: Roughly 2 M GPU‑hours on a cluster of 8 × A100‑40 GiB (≈ 16 days of continuous training).
  • Training hyper‑parameters: Batch size = 4096 tokens per GPU, learning rate = 1e‑4 (linear warm‑up for 10 k steps, then cosine decay), max sequence length = 512.
  • Fine‑tuning: The model can be fine‑tuned on downstream biomedical tasks with as few as 1 k labeled examples, often reaching > 90 % of its full‑task performance.

The model’s checkpoint and tokenizer are hosted on Hugging Face and can be loaded with a single line of code:

from transformers import AutoModelForMaskedLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract")
model = AutoModelForMaskedLM.from_pretrained("microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract")

Licensing Information

The README states a MIT license, yet the tag list on Hugging Face marks the license as “unknown.” The MIT license is permissive: you may use, modify, distribute, and commercialize the model provided you retain the copyright notice and include the license text in any redistribution. No royalties or disclosure of source code are required.

If the model were truly “unknown,” you would need to treat it as “all‑rights‑reserved” until clarification is obtained. However, given the explicit MIT declaration, most users can safely employ the model in commercial pipelines (e.g., pharma R&D platforms, health‑tech SaaS products) after confirming the license file in the repository.

Attribution: Cite the original paper (see “Related Papers” below) and retain the MIT license header in any derivative work. No additional restrictions such as “non‑commercial only” or “share‑alike” are imposed.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives