MedMO-8B-Next sets a new state-of-the-art across the board, achieving the highest average scores on both medical VQA and Text QA benchmarks — surpassing strong baselines including Lingshu-7B and Fleming-VL-8B.
1from transformers import Qwen3VLForConditionalGeneration, AutoProcessor
2from qwen_vl_utils import process_vision_info
3import torch
4
5# Load model
6model = Qwen3VLForConditionalGeneration.from_pretrained(
7 "MBZUAI/MedMO-8B-Next",
8 torch_dtype=torch.bfloat16,
9 attn_implementation="flash_attention_2",
10 device_map="auto",
11)
12
13processor = AutoProcessor.from_pretrained("MBZUAI/MedMO-8B-Next")
14
15# Prepare input
16messages = [
17 {
18 "role": "user",
19 "content": [
20 {
21 "type": "image",
22 "image": "path/to/medical/image.png",
23 },
24 {"type": "text", "text": "What abnormalities are present in this chest X-ray?"},
25 ],
26 }
27]
28
29# Process and generate
30text = processor.apply_chat_template(
31 messages, tokenize=False, add_generation_prompt=True
32)
33image_inputs, video_inputs = process_vision_info(messages)
34inputs = processor(
35 text=[text],
36 images=image_inputs,
37 videos=video_inputs,
38 padding=True,
39 return_tensors="pt",
40).to(model.device)
41
42generated_ids = model.generate(**inputs, max_new_tokens=512)
43generated_ids_trimmed = [
44 out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
45]
46output_text = processor.batch_decode(
47 generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
48)
49print(output_text[0])
1messages = [
2 {
3 "role": "user",
4 "content": [
5 {"type": "image", "image": "chest_xray.png"},
6 {"type": "text", "text": "Detect and localize all abnormalities in this image."},
7 ],
8 }
9]
10# Example output:
11# "Fractures <box>[[156, 516, 231, 607], [240, 529, 296, 581]]</box>"
1messages = [
2 {
3 "role": "user",
4 "content": [
5 {"type": "image", "image": "ct_scan.png"},
6 {"type": "text", "text": "Generate a detailed radiology report for this CT scan."},
7 ],
8 }
9]
10# MedMO-8B-Next generates comprehensive clinical reports with findings and impressions
1@article{deria2026medmo,
2 title={MedMO: Grounding and Understanding Multimodal Large Language Model for Medical Images},
3 author={Deria, Ankan and Kumar, Komal and Dukre, Adinath Madhavrao and Segal, Eran and Khan, Salman and Razzak, Imran},
4 journal={arXiv preprint arXiv:2602.06965},
5 year={2026}
6}
This project is licensed under the
Apache License 2.0 — see the
LICENSE file for details.