LlaVA-Rad is a 7 billion parameter small multimodal model trained to produce findings given an input chest X-ray. Its architecture follows that of
LLaVA and
LLaVA-Med, differing in the use of a specialized chest X-ray image encoder, BiomedCLIP-CXR, built with the
BiomedCLIP framework. LLaVA-Rad offers outstanding performance at relatively small model size.
📌 Note: For original model weights, refer to
microsoft/llava-rad.
This model checkpoint is intended for
experimental use and can be tested directly within the
Libra repository.
For better benchmarking, we recommend using the official test set from
X-iZhang/MIMIC-CXR-RRG.
1# 🧪 Inference example following the official LlaVA-Rad setup
2from libra.eval import libra_eval
3
4image_file = "https://openi.nlm.nih.gov/imgs/512/253/253/CXR253_IM-1045-1001.png"
5model_path = "X-iZhang/libra-llava-rad"
6
7answer = libra_eval(
8 model_path=model_path,
9 image_file=image_file,
10 query="Describe the findings of the chest x-ray.\n",
11 conv_mode="v1", # Use default version
12 temperature=0.0, # Use greedy decoding
13 max_new_tokens=1024,
14)
15
16# ✅ Expected output
17print(answer)
18# > Frontal and lateral chest radiographs demonstrate a moderate left
19# > pneumothorax. The right lung is clear. The cardiomediastinal and hilar
20# > contours are normal.
For a deeper dive into the methodology, theoretical insights, and performance benchmarks of the Libra framework, please see the following resources:
This implementation is intended strictly for research and benchmarking purposes.
It is not validated for clinical use, and any application in real-world diagnosis or treatment is strongly discouraged.
If any use case is found to violate these intended purposes (e.g., clinical deployment, misleading medical claims),
the maintainers reserve the right to remove related code, models, or access permissions without prior notice.