Qwen3.5 2B MedVL

ProviderOpenMed
Categoryvisual-question-answering
Licenseapache-2.0
Downloads388
Stars3

Overview

Qwen3.5 2B MedVL is a compact vision-language model specifically tuned for the medical domain. Designed for efficiency, this 2-billion parameter model allows developers to deploy medical visual-question-answering (VQA) capabilities on edge devices or within resource-constrained cloud environments without sacrificing specialized accuracy. It excels at interpreting clinical imagery and providing structured textual analysis, making it ideal for integrating automated radiology screening, medical report synthesis, or diagnostic assistants into existing healthcare workflows. By leveraging an Apache-2.0 license, it offers the flexibility needed for commercial scaling and deep customization via fine-tuning on proprietary medical datasets.

Highlights

  • Specialized medical VQA capabilities in a compact 2B footprint
  • Optimized for low-latency deployment on edge hardware
  • Apache-2.0 license enables flexible commercial integration
  • Efficiently processes clinical imagery for automated textual analysis

Usage

Install
# Install Hugging Face transformers
pip install transformers torch
SDK Usage
# Load model with transformers
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("OpenMed/Qwen3.5-2B-MedVL")
tokenizer = AutoTokenizer.from_pretrained("OpenMed/Qwen3.5-2B-MedVL")

Hugging Face Download

We recommend downloading the model via the Hugging Face CLI or Hub SDK.

Guidance:Before downloading, install huggingface_hub with:

Guidance
pip install -U huggingface_hub

CLI Download

Download the full repository

Download the full repository
huggingface-cli download OpenMed/Qwen3.5-2B-MedVL

Download a single file to a local folder (e.g. config.json into ./dir)

Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download OpenMed/Qwen3.5-2B-MedVL config.json --local-dir ./dir

See the official docs for more CLI options

SDK Download

SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('OpenMed/Qwen3.5-2B-MedVL')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://huggingface.co/OpenMed/Qwen3.5-2B-MedVL

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/OpenMed/Qwen3.5-2B-MedVL

Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.

PyTorch / Transformers Usage

Install Transformers

Install Transformers
pip install -U transformers torch

Load the model and run inference

Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('OpenMed/Qwen3.5-2B-MedVL')
tokenizer = AutoTokenizer.from_pretrained('OpenMed/Qwen3.5-2B-MedVL')

Model Download

We recommend downloading the model via the ModelScope CLI or SDK.

Guidance:Before downloading, install ModelScope with:

Guidance
pip install modelscope

CLI Download

Download the full repository

Download the full repository
modelscope download --model OpenMed/Qwen3.5-2B-MedVL

Download a single file to a local folder (e.g. README.md into ./dir)

Download a single file to a local folder (e.g. README.md into ./dir)
modelscope download --model OpenMed/Qwen3.5-2B-MedVL README.md --local_dir ./dir

See the docs for more CLI options

SDK Download

SDK Download
# 模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('OpenMed/Qwen3.5-2B-MedVL')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://www.modelscope.cn/OpenMed/Qwen3.5-2B-MedVL.git

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/OpenMed/Qwen3.5-2B-MedVL.git

ModelScope 模型页直接下载模型文件;无需将模型文件放在本站服务器。

Notebook Quickstart

Install the ModelScope library

Install the ModelScope library
pip install "modelscope[audio,cv,nlp,multi-modal,science]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html

Load the model and run inference

Load the model and run inference
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

p = pipeline('text-generation', 'OpenMed/Qwen3.5-2B-MedVL')

Full Documentation

来源: HuggingFace

---
license: apache-2.0
base_model: Qwen/Qwen3.5-2B
tags:
- medical
- vqa
- qwen3.5
- synthvision
pipeline_tag: visual-question-answering
---

Qwen3.5-2B-MedVL

!SynthVision

Qwen3.5-2B fine-tuned on ~200K medical VQA records from the SynthVision pipeline. Best overall model in the SynthVision family.

> Note: Requires transformers>=5.3.0. Do NOT install fla (crashes on Python 3.10).

Benchmark Results (Exact Match)

| Split | VQA-RAD | PathVQA | SLAKE | Avg EM |
|-------|---------|---------|-------|--------|
| Base (Qwen3.5-2B) | 0.5477 | 0.3822 | 0.5617 | 0.4972 |
| Fine-tuned | 0.5521 | 0.4748 | 0.6880 | 0.5716 |
| Delta | +0.8% | +24.2% | +22.5% | +15.0% |

Usage

Transformers

python
from transformers import AutoProcessor, AutoModelForImageTextToText

Requires transformers>=5.3.0

model_id = "OpenMed/Qwen3.5-2B-MedVL" processor = AutoProcessor.from_pretrained(model_id) model = AutoModelForImageTextToText.from_pretrained(model_id, torch_dtype="auto", device_map="auto")

messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://example.com/xray.jpg"},
{"type": "text", "text": "What are the key findings in this chest X-ray?"},
],
}
]

inputs = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt").to(model.device)
output = model.generate(inputs, max_new_tokens=512)
print(processor.decode(output[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

vLLM

python
from vllm import LLM, SamplingParams

llm = LLM(model="OpenMed/Qwen3.5-2B-MedVL", max_model_len=4096, limit_mm_per_prompt={"image": 1})

messages = [{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": "https://example.com/xray.jpg"}},
{"type": "text", "text": "What are the key findings in this chest X-ray?"},
]}]

output = llm.chat(messages, SamplingParams(temperature=0, max_tokens=512))
print(output[0].outputs[0].text)

SGLang

bash
# Launch server
python -m sglang.launch_server --model-path OpenMed/Qwen3.5-2B-MedVL --port 8000
python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
response = client.chat.completions.create(
model="OpenMed/Qwen3.5-2B-MedVL",
messages=[{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": "https://example.com/xray.jpg"}},
{"type": "text", "text": "What are the key findings in this chest X-ray?"},
]}],
max_tokens=512,
)
print(response.choices[0].message.content)

Training Details

  • Method: LoRA (rank=64, alpha=64)
  • Target modules: q_proj, v_proj, k_proj, o_proj, gate_proj, up_proj, down_proj
  • Learning rate: 1e-4, cosine schedule
  • Steps: 350
  • Weight decay: 0.01
  • Training time**: ~1h

Links

Join our Telegram