MedVLThinker-7B-SFT_PMC is a 7B parameter medical vision-language model based on Qwen2.5-VL.
This model has been trained using supervised fine-tuning on PMC-VQA dataset.
Model Details
Base Model
: Qwen/Qwen2.5-VL-7B-Instruct
Model Size
: 7B parameters
Training Method
: Supervised Fine-tuning
Training Data
: PMC-VQA dataset
Usage
from transformers import Qwen2VLForConditionalGeneration, AutoTokenizer, AutoProcessor
from qwen_vl_utils import process_vision_info
import torch
# Load the model
model = Qwen2VLForConditionalGeneration.from_pretrained(
"UCSC-VLAA/MedVLThinker-7B-SFT_PMC",
torch_dtype=torch.bfloat16,
device_map="auto"
)
processor = AutoProcessor.from_pretrained("UCSC-VLAA/MedVLThinker-7B-SFT_PMC")
# Example usage
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "path/to/medical/image.jpg",
},
{"type": "text", "text": "What can you see in this medical image?"},
],
}
]
# Preparation for inference
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",
)
inputs = inputs.to("cuda")
# Inference
generated_ids = model.generate(**inputs, max_new_tokens=128)
generated_ids_trimmed = [
out_ids[len(in_ids) :] for in_ids, out_ids inzip(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)
Citation
@article{medvlthinker2025,
title={MedVLThinker: Simple Baselines for Multimodal Medical Reasoning},
author={Your Team},
journal={arXiv preprint},
year={2025}
}
License
This model is released under the Apache 2.0 license.
Runs of UCSC-VLAA MedVLThinker-7B-SFT_PMC on huggingface.co
6
Total runs
0
24-hour runs
0
3-day runs
-2
7-day runs
4
30-day runs
More Information About MedVLThinker-7B-SFT_PMC huggingface.co Model
MedVLThinker-7B-SFT_PMC huggingface.co is an AI model on huggingface.co that provides MedVLThinker-7B-SFT_PMC's model effect (), which can be used instantly with this UCSC-VLAA MedVLThinker-7B-SFT_PMC model. huggingface.co supports a free trial of the MedVLThinker-7B-SFT_PMC model, and also provides paid use of the MedVLThinker-7B-SFT_PMC. Support call MedVLThinker-7B-SFT_PMC model through api, including Node.js, Python, http.
MedVLThinker-7B-SFT_PMC huggingface.co is an online trial and call api platform, which integrates MedVLThinker-7B-SFT_PMC's modeling effects, including api services, and provides a free online trial of MedVLThinker-7B-SFT_PMC, you can try MedVLThinker-7B-SFT_PMC online for free by clicking the link below.
UCSC-VLAA MedVLThinker-7B-SFT_PMC online free url in huggingface.co:
MedVLThinker-7B-SFT_PMC is an open source model from GitHub that offers a free installation service, and any user can find MedVLThinker-7B-SFT_PMC on GitHub to install. At the same time, huggingface.co provides the effect of MedVLThinker-7B-SFT_PMC install, users can directly use MedVLThinker-7B-SFT_PMC installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
MedVLThinker-7B-SFT_PMC install url in huggingface.co: