alt.freeweights.vision / BiomedVLP-CXR-BERT-specialized
From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.visionSubject:

BiomedVLP-CXR-BERT-specialized

Date: 2026-11-14Commit: 5157bdbSigned: 2DC28CC7B26A283B ✓

Fill mask model with 110M parameters. Safetensors weights, 981 MB in all. Published by microsoft under MIT.

110M params981MBBiomedVLP-CXR-BERT-specializedsafetensorspermissive
FactsParams110MSize981 MBFormatssafetensorsTaskfill maskLicenseMITFrom sourcepermissive
$ fw get microsoft/BiomedVLP-CXR-BERT-specialized
# manifest sha256 11e425b443b5… · 981 MB · 11 files
$ fw verify ./BiomedVLP-CXR-BERT-specialized microsoft/BiomedVLP-CXR-BERT-specialized
From sourceHosted (signed)microsoft/BiomedVLP-CXR-BERT-specializedLast check: 2026-11-14 21:17 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Overview

Size
981 MB
Weights
439 MB (safetensors)
Parameters
110M
Formats
safetensors
Task
fill mask
License
MIT (permissive)
Files
11, each with a sha256
Publisher
microsoft
Added
2026-11-14
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-14 21:17 UTCpassed

Model card

From the publisher at commit 5157bdb. Shown as plain text with links; images open at the publisher.

CXR-BERT-specialized#

CXR-BERT is a chest X-ray (CXR) domain-specific language model that makes use of an improved vocabulary, novel pretraining procedure, weight regularization, and text augmentations. The resulting model demonstrates improved performance on radiology natural language inference, radiology masked language model token prediction, and downstream vision-language processing tasks such as zero-shot phrase grounding and image classification.

First, we pretrain CXR-BERT-general from a randomly initialized BERT model via Masked Language Modeling (MLM) on abstracts PubMed and clinical notes from the publicly-available MIMIC-III and MIMIC-CXR. In that regard, the general model is expected be applicable for research in clinical domains other than the chest radiology through domain specific fine-tuning.

CXR-BERT-specialized is continually pretrained from CXR-BERT-general to further specialize in the chest X-ray domain. At the final stage, CXR-BERT is trained in a multi-modal contrastive learning framework, similar to the CLIP framework. The latent representation of [CLS] token is utilized to align text/image embeddings.

Model variations#

ModelModel identifier on HuggingFaceVocabularyNote
CXR-BERT-generalmicrosoft/BiomedVLP-CXR-BERT-generalPubMed & MIMICPretrained for biomedical literature and clinical domains
CXR-BERT-specialized (after multi-modal training)microsoft/BiomedVLP-CXR-BERT-specializedPubMed & MIMICPretrained for chest X-ray domain

Image model#

CXR-BERT-specialized is jointly trained with a ResNet-50 image model in a multi-modal contrastive learning framework. Prior to multi-modal learning, the image model is pre-trained on the same set of images in MIMIC-CXR using SimCLR. The corresponding model definition and its loading functions can be accessed through our HI-ML-Multimodal GitHub repository. The joint image and text model, namely BioViL, can be used in phrase grounding applications as shown in this python notebook example. Additionally, please check the MS-CXR benchmark for a more systematic evaluation of joint image and text models in phrase grounding tasks.

Citation#

The corresponding manuscript is accepted to be presented at the European Conference on Computer Vision (ECCV) 2022

@misc{https://doi.org/10.48550/arxiv.2204.09817,
  doi = {10.48550/ARXIV.2204.09817},
  url = {https://arxiv.org/abs/2204.09817},
  author = {Boecking, Benedikt and Usuyama, Naoto and Bannur, Shruthi and Castro, Daniel C. and Schwaighofer, Anton and Hyland, Stephanie and Wetscherek, Maria and Naumann, Tristan and Nori, Aditya and Alvarez-Valle, Javier and Poon, Hoifung and Oktay, Ozan},
  title = {Making the Most of Text Semantics to Improve Biomedical Vision-Language Processing},
  publisher = {arXiv},
  year = {2022},
}

Model Use#

Intended Use#

This model is intended to be used solely for (I) future research on visual-language processing and (II) reproducibility of the experimental results reported in the reference paper.

Primary Intended Use#

The primary intended use is to support AI researchers building on top of this work. CXR-BERT and its associated models should be helpful for exploring various clinical NLP & VLP research questions, especially in the radiology domain.

Out-of-Scope Use#

Any deployed use case of the model --- commercial or otherwise --- is currently out of scope. Although we evaluated the models using a broad set of publicly-available research benchmarks, the models and evaluations are not intended for deployed use cases. Please refer to the associated paper for more details.

How to use#

Here is how to use this model to extract radiological sentence embeddings and obtain their cosine similarity in the joint space (image and text):

import torch
from transformers import AutoModel, AutoTokenizer

# Load the model and tokenizer
url = "microsoft/BiomedVLP-CXR-BERT-specialized"
tokenizer = AutoTokenizer.from_pretrained(url, trust_remote_code=True)
model = AutoModel.from_pretrained(url, trust_remote_code=True)

# Input text prompts (e.g., reference, synonym, contradiction)
text_prompts = ["There is no pneumothorax or pleural effusion",
                "No pleural effusion or pneumothorax is seen",
                "The extent of the pleural effusion is constant."]

# Tokenize and compute the sentence embeddings
tokenizer_output = tokenizer.batch_encode_plus(batch_text_or_text_pairs=text_prompts,
                                               add_special_tokens=True,
                                               padding='longest',
                                               return_tensors='pt')
embeddings = model.get_projected_text_embeddings(input_ids=tokenizer_output.input_ids,
                                                 attention_mask=tokenizer_output.attention_mask)

# Compute the cosine similarity of sentence embeddings obtained from input text prompts.
sim = torch.mm(embeddings, embeddings.t())

Data#

This model builds upon existing publicly-available datasets:

These datasets reflect a broad variety of sources ranging from biomedical abstracts to intensive care unit notes to chest X-ray radiology notes. The radiology notes are accompanied with their associated chest x-ray DICOM images in MIMIC-CXR dataset.

Performance#

We demonstrate that this language model achieves state-of-the-art results in radiology natural language inference through its improved vocabulary and novel language pretraining objective leveraging semantics and discourse characteristics in radiology reports.

A highlight of comparison to other common models, including ClinicalBERT and PubMedBERT:

RadNLI accuracy (MedNLI transfer)Mask prediction accuracyAvg. # tokens after tokenizationVocabulary size
RadNLI baseline53.30---
ClinicalBERT47.6739.8478.98 (+38.15%)28,996
PubMedBERT57.7135.2463.55 (+11.16%)28,895
CXR-BERT (after Phase-III)60.4677.7258.07 (+1.59%)30,522
CXR-BERT (after Phase-III + Joint Training)65.2181.5858.07 (+1.59%)30,522

CXR-BERT also contributes to better vision-language representation learning through its improved text encoding capability. Below is the zero-shot phrase grounding performance on the MS-CXR dataset, which evaluates the quality of image-text latent representations.

Vision–Language Pretraining MethodText EncoderMS-CXR Phrase Grounding (Avg. CNR Score)
BaselineClinicalBERT0.769
BaselinePubMedBERT0.773
ConVIRTClinicalBERT0.818
GLoRIAClinicalBERT0.930
BioViLCXR-BERT1.027
BioViL-LCXR-BERT1.142

Additional details about performance can be found in the corresponding paper, Making the Most of Text Semantics to Improve Biomedical Vision-Language Processing.

Limitations#

This model was developed using English corpora, and thus can be considered English-only.

Further information#

Please refer to the corresponding paper, "Making the Most of Text Semantics to Improve Biomedical Vision-Language Processing", ECCV'22 for additional details on the model training and evaluation.

For additional inference pipelines with CXR-BERT, please refer to the HI-ML-Multimodal GitHub repository.

Files

11 files · 981 MBWeights 439 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 11 files with their sha256
FileSizesha256
.gitattributes1.23 KB400b270bc8f5cb44fda65b1a4532ceca0fb452d0637425e861829560cf393ae2
README.md10.4 KB81d6d915d8b2300cc83ac9d7e0a0528af9e1017f335ff008fb5fbb548e335e2d
biovil_image_resnet50_proj_size_128.pt104 MB118c4bb1c16d4e69b7c9b7f2ff5b2c0a79242059acf20bd2ed3068045b8f6b98
config.json843 B677244c654ba9490effdfb74d3b9333660e91ce8b66a00132482afb1bc720605
configuration_cxrbert.py889 B94b40a0fda6553434dfdf431fcebe04e59d68748e384211cabc6bc05c2065c20
model.safetensors439 MBab65abb62d945287a80e985d3d37bfe82ff4003ec1f38c48758b36759941762d
modeling_cxrbert.py5.82 KBb8038e079260424c30fc975f322119090dab82e9fb2c2ceb3b7627d19bb69d9c
pytorch_model.bin439 MBa41d2f4b33e5bdbacabecb8d34c4420163e2165b9fdc6915014e8263a0d0782b
special_tokens_map.json112 B303df45a03609e4ead04bc3dc1536d0ab19b5358db685b6f3da123d05ec200e3
tokenizer_config.json659 B5ae9739b3812d48f39b225a226703b6fc1c79a774a30dfcf17fb8785840cbd3e
vocab.txt235 KBe025f479c3a7ce6e248971bfe1b409708db0439e9488d30e254f81f27f75d678
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
5157bdba14 pinned now manifest updated, same commit2026-11-14 21:17 UTC11 files · 981 MB
5157bdba142026-11-14 21:17 UTC11 files · 981 MB

Use it

$ fw get microsoft/BiomedVLP-CXR-BERT-specialized
# manifest sha256 11e425b443b5… · 981 MB · 11 files
$ fw verify ./BiomedVLP-CXR-BERT-specialized microsoft/BiomedVLP-CXR-BERT-specialized
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/microsoft/BiomedVLP-CXR-BERT-specialized.json --dir ./BiomedVLP-CXR-BERT-specialized $ python3 fw.py verify ./BiomedVLP-CXR-BERT-specialized ./microsoft__BiomedVLP-CXR-BERT-specialized.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/BiomedVLP-CXR-BERT-specialized --revision 5157bdba1437a3aed316dacb1a5b68edf96b9902 --local-dir ./BiomedVLP-CXR-BERT-specialized

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-14
Text in
README.md
Text sha256
81d6d915d8b2300cc83ac9d7e0a0528af9e1017f335ff008fb5fbb548e335e2d
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.visionSubject: BiomedVLP-CXR-BERT-specializedDate: 2026-11-14Commit: 5157bdbSigned: 2DC28CC7B26A283B ✓
Upstream
microsoft/BiomedVLP-CXR-BERT-specialized
Pinned commit
5157bdba1437a3aed316dacb1a5b68edf96b9902
Manifest
BiomedVLP-CXR-BERT-specialized.json · .minisig
Manifest sha256
11e425b443b57434f57c5c32844c1c25bb02aae770242d40c62c9cbb39fec7bc
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:17 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/BiomedVLP-CXR-BERT-specialized.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/BiomedVLP-CXR-BERT-specialized.json.minisig $ minisign -Vm BiomedVLP-CXR-BERT-specialized.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/BiomedVLP-CXR-BERT-specialized
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. BiomedVLP-CXR-BERT-specialized.json. Provenance. Takedown history: none.
From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX