Downloads · 30 days
10
3% of all-time downloads
leoyinn/flare25-qwen2.5vl
flare25-qwen2.5vl is a image-text-to-text model from leoyinn. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of Qwen/Qwen2.5-VL-7B-Instruct specifically optimized for medical image analysis tasks in the FLARE 2025 2D Medical Multimodal Dataset challenge.
Downloads · 30 days
10
3% of all-time downloads
All-time downloads
324
Public
Repo size
13 GB
Likes
2
Public
Click a slice to open those files.
.gz12.6 GB · 98%
From the Hugging Face model README
This model is a fine-tuned version of Qwen/Qwen2.5-VL-7B-Instruct specifically optimized for medical image analysis tasks in the FLARE 2025 2D Medical Multimodal Dataset challenge.
The model was fine-tuned on 19 diverse medical imaging datasets from FLARE 2025, details can be found at: https://huggingface.co/datasets/FLARE-MedFM/FLARE-Task5-MLLM-2D
# LoRA Configuration
lora_r: 16
lora_alpha: 32
lora_dropout: 0.1
target_modules: ['k_proj', 'v_proj', 'o_proj', 'gate_proj', 'down_proj', 'up_proj', 'q_proj']
task_type: CAUSAL_LM
# Training Statistics
total_steps: 1000
learning_rate: N/A
final_eval_loss: 5.4849
This model has been evaluated across multiple medical imaging tasks with the following capabilities:
The model is evaluated using task-specific metrics following FLARE 2025 specifications:
Classification Tasks:
Multi-label Classification:
Detection Tasks:
Instance Detection (Identity-Aware):
Counting Tasks:
Regression Tasks:
Report Generation:
pip install transformers torch peft accelerate bitsandbytes
import torch
from transformers import AutoTokenizer, AutoProcessor
from peft import PeftModel, PeftConfig
from PIL import Image
# Load the fine-tuned model
base_model_name = "Qwen/Qwen2.5-VL-7B-Instruct"
adapter_model_name = "leoyinn/qwen2.5vl-flare2025"
# Load tokenizer and processor
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
processor = AutoProcessor.from_pretrained(base_model_name)
# Load base model and adapter
from transformers import AutoModelForVision2Seq
base_model = AutoModelForVision2Seq.from_pretrained(
base_model_name,
torch_dtype=torch.float16,
device_map="auto",
load_in_4bit=True
)
# Load the fine-tuned adapter
model = PeftModel.from_pretrained(base_model, adapter_model_name)
# Prepare input
image = Image.open("medical_image.jpg")
prompt = "Describe the medical findings in this image."
# Process and generate
inputs = processor(
images=image,
text=prompt,
return_tensors="pt"
).to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=512,
do_sample=True,
temperature=0.7,
top_p=0.9
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
If you use this model in your research, please cite:
@misc{qwen25vl-flare2025,
title={QWen2.5VL Fine-tuned for FLARE 2025 Medical Image Analysis},
author={Shuolin Yin},
year={2025},
publisher={Hugging Face},
url={https://huggingface.co/leoyinn/qwen2.5vl-flare2025}
}
@misc{qwen25vl-base,
title={Qwen2.5-VL: Enhancing Vision-Language Model's Perception of the World at Any Resolution},
author={Qwen Team},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/Qwen/Qwen2.5-VL-7B-Instruct}
}
For questions or issues, please open an issue in the model repository or contact the authors.