Image-Text-to-Text
Transformers
Safetensors
English
qwen3_vl
text-generation-inference
medical
conversational
compressed-tensors
Instructions to use prithivMLmods/MedMO-8B-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/MedMO-8B-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/MedMO-8B-FP8") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("prithivMLmods/MedMO-8B-FP8") model = AutoModelForMultimodalLM.from_pretrained("prithivMLmods/MedMO-8B-FP8", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use prithivMLmods/MedMO-8B-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/MedMO-8B-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/MedMO-8B-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/prithivMLmods/MedMO-8B-FP8
- SGLang
How to use prithivMLmods/MedMO-8B-FP8 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "prithivMLmods/MedMO-8B-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/MedMO-8B-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "prithivMLmods/MedMO-8B-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/MedMO-8B-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use prithivMLmods/MedMO-8B-FP8 with Docker Model Runner:
docker model run hf.co/prithivMLmods/MedMO-8B-FP8
File size: 5,383 Bytes
9c30aef 43136d2 9c30aef 62de7b6 9c30aef 62de7b6 9c30aef 43136d2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | ---
license: apache-2.0
language:
- en
base_model:
- MBZUAI/MedMO-8B
pipeline_tag: image-text-to-text
library_name: transformers
tags:
- text-generation-inference
- medical
---

# **MedMO-8B-FP8**
> **MedMO-8B-FP8** is an FP8-compressed variant built on top of **MBZUAI/MedMO-8B**. This edition applies **BF16 · FP8 (F8_E4M3)** precision formats to significantly reduce memory footprint and improve inference throughput while preserving the advanced medical multimodal reasoning and grounding capabilities of the original 8B architecture. The base **MedMO-8B** model from MBZUAI is an 8B-parameter open-source multimodal large language model built on the Qwen3-VL architecture. It is specialized for comprehensive medical image understanding and grounding across radiology including X-ray, CT, MRI, and ultrasound, as well as pathology, ophthalmology, dermatology, and nuclear medicine.
Trained on 26M+ diverse samples from 45 datasets through a three-stage pipeline, general medical supervised fine-tuning with 18.5M image-text pairs, high-resolution grounding with 3M samples at 1280×1280, and instruction tuning with 4.3M pairs, the model demonstrates strong performance in VQA, medical QA, report generation, disease localization, clinical reasoning, and multi-task medical understanding. This FP8 edition maintains high diagnostic reasoning fidelity while enabling more efficient deployment on compatible GPU hardware.
> [!important]
> FP8 8-bit floating point weight and activation quantization using hardware acceleration on GPUs – [FP8 W8A8](https://docs.vllm.ai/en/stable/features/quantization/fp8/). Quantization W8A8 FP8-dynamic recipe – [examples](https://github.com/vllm-project/llm-compressor/tree/main/examples/quantization_w8a8_fp8).
## Key Highlights
* **BF16 · FP8 (F8_E4M3) Compression**: Transformer Engine based FP8 quantization reduces VRAM usage and improves inference efficiency while maintaining medical reasoning accuracy.
* **Medical Multimodal Specialization**: Optimized for radiology, pathology, ophthalmology, dermatology, and nuclear medicine tasks.
* **High-Resolution Grounding**: Supports precise spatial localization at up to 1280×1280 resolution.
* **Disease & Anatomical Localization**: Bounding box grounding with strong IoU improvements over baseline and prior SOTA systems.
* **Clinical Report Generation**: Achieves strong CIDEr scores including 270.4 on Med-Trinity, significantly outperforming prior systems.
* **Robust Cross-Modality Generalization**: Strong performance across diverse imaging modalities and medical benchmarks.
* **Transformers & vLLM Compatible**: Deployable via standard Hugging Face Transformers and vLLM inference stacks.
## Performance Highlights
* **VQA**: +13.7% over baseline
* **Text-based Medical QA**: +6.9% improvement
* **Report Generation**: CIDEr 270.4 on Med-Trinity, 4× prior SOTA
* **Localization**: IoU +40.4% over baseline, +37% over Fleming-VL
* **Bacteria Segmentation**: IoU 54.6%
* **MedSG Multi-task Benchmark**: 75.8% multi-view accuracy
* **Grounding Benchmarks**: SOTA on NIH Chest X-ray and DeepLesion datasets
## Quick Start with Transformers
```python
from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
from qwen_vl_utils import process_vision_info
import torch
# Load the FP8 MedMO model
model = Qwen3VLForConditionalGeneration.from_pretrained(
"MBZUAI/MedMO-8B-FP8",
torch_dtype="auto",
device_map="auto"
)
processor = AutoProcessor.from_pretrained(
"MBZUAI/MedMO-8B-FP8"
)
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "medical_scan.png",
},
{
"type": "text",
"text": "Identify abnormalities and provide a diagnostic summary."
},
],
}
]
text = processor.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(
text=[text],
images=image_inputs,
videos=video_inputs,
padding=True,
return_tensors="pt",
).to("cuda")
generated_ids = model.generate(**inputs, max_new_tokens=512)
generated_ids_trimmed = [
out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
generated_ids_trimmed,
skip_special_tokens=True,
clean_up_tokenization_spaces=False
)
print(output_text)
```
## Intended Use
* **Clinical Decision Support Research**
* **Medical Image Grounding & Localization**
* **Radiology & Pathology Report Generation**
* **Medical VQA Systems**
* **Healthcare AI Research & Benchmarking**
## Limitations & Risks
> **Important**: This model is intended for research and clinical decision support development only.
* **Not a Substitute for Medical Professionals**: Outputs must be reviewed by qualified clinicians.
* **Execution Risk**: If integrated into automated clinical workflows, safeguards and validation layers are mandatory.
* **Data Distribution Sensitivity**: Performance may vary across rare diseases or underrepresented modalities.
* **Hardware Requirements**: FP8 requires compatible GPU hardware for optimal acceleration. |