How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="YongchengYAO/MedVision__SFT-m__qwen25vl-7b__TL")
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)
# Load model directly
from transformers import AutoProcessor, AutoModelForImageTextToText

processor = AutoProcessor.from_pretrained("YongchengYAO/MedVision__SFT-m__qwen25vl-7b__TL")
model = AutoModelForImageTextToText.from_pretrained("YongchengYAO/MedVision__SFT-m__qwen25vl-7b__TL")
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=40)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Model Card for Model ID

This is a supervised finetuned version of Qwen/Qwen2.5-VL-7B-Instruct.

Model Details

Model Description

  • License: CC-BY-NC-4.0
  • Finetuned from model: Qwen/Qwen2.5-VL-7B-Instruct

Uses

Training Details

Training Data

The model is trained on the MedVision dataset. Specifically, this list defines the training data.

Training Procedure

  • 🌟 Blog: Supervised Fine-Tuning (SFT) for VLMs on Medical Image Data
  • 🧑🏻‍💻 Script: the training script handles dependencies installation, data processing, and SFT training.

Evaluation

See the tumor/lesion (T/L) size estimation results for Qwen2.5VL (7B, SFT_{5K}) on the MedVision project page.

Citation

@misc{yao2025medvisiondatasetbenchmarkquantitative,
      title={MedVision: Dataset and Benchmark for Quantitative Medical Image Analysis}, 
      author={Yongcheng Yao and Yongshuo Zong and Raman Dutt and Yongxin Yang and Sotirios A Tsaftaris and Timothy Hospedales},
      year={2025},
      eprint={2511.18676},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2511.18676}, 
}
Downloads last month
5
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for YongchengYAO/MedVision__SFT-m__qwen25vl-7b__TL

Merge model
this model

Dataset used to train YongchengYAO/MedVision__SFT-m__qwen25vl-7b__TL

Collection including YongchengYAO/MedVision__SFT-m__qwen25vl-7b__TL

Paper for YongchengYAO/MedVision__SFT-m__qwen25vl-7b__TL