uAI NEXUS MedVLM 1.0a 7B RL

提供商UII-AI
分类visual-question-answering
许可证apache-2.0
下载量2.0K
星标0

简介

uAI NEXUS MedVLM 1.0a 7B RL 是一款专注于医疗视觉问答(VQA)的轻量化多模态模型。它在 7B 参数规模的基础上,通过强化学习(RL)优化,旨在提升医疗影像分析与专业医学文本理解的精准度。对于开发者而言,该模型适合集成到智能诊疗辅助、医学影像自动标注或健康咨询等垂直场景中。由于采用了 Apache-2.0 开源协议,部署门槛较低,可作为医疗 AI 应用的底座模型进行微调,在保证专业性的同时兼顾推理效率。

核心亮点

  • 专注医疗 VQA,精准解析医学影像与文本
  • 引入强化学习优化,提升专业回答的可靠性
  • 7B 轻量化参数,兼顾部署效率与性能
  • Apache-2.0 协议,企业级商用与二次开发友好

使用方法

安装依赖
# 安装 Hugging Face transformers
pip install transformers torch
SDK 使用
# 使用 transformers 加载模型
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("UII-AI/uAI-NEXUS-MedVLM-1.0a-7B-RL")
tokenizer = AutoTokenizer.from_pretrained("UII-AI/uAI-NEXUS-MedVLM-1.0a-7B-RL")

Hugging Face 下载

我们推荐使用命令行或者 Hugging Face Hub SDK 来进行模型的下载。

操作指引:在下载前,请先通过如下命令安装 huggingface_hub:

操作指引
pip install -U huggingface_hub

命令行下载

下载完整模型库

下载完整模型库
huggingface-cli download UII-AI/uAI-NEXUS-MedVLM-1.0a-7B-RL

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download UII-AI/uAI-NEXUS-MedVLM-1.0a-7B-RL config.json --local-dir ./dir

更多命令行下载选项,可参见官方文档

SDK 下载

SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('UII-AI/uAI-NEXUS-MedVLM-1.0a-7B-RL')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://huggingface.co/UII-AI/uAI-NEXUS-MedVLM-1.0a-7B-RL

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/UII-AI/uAI-NEXUS-MedVLM-1.0a-7B-RL

模型文件托管在 Hugging Face Hub,使用 HF CLI / SDK / Git 直接下载,不经过本站。

PyTorch / Transformers 使用

安装 Transformers

安装 Transformers
pip install -U transformers torch

模型加载和推理

模型加载和推理
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('UII-AI/uAI-NEXUS-MedVLM-1.0a-7B-RL')
tokenizer = AutoTokenizer.from_pretrained('UII-AI/uAI-NEXUS-MedVLM-1.0a-7B-RL')

完整文档

来源: HuggingFace

---
language:

  • en

license: apache-2.0
base_model: Qwen/Qwen2.5-VL-7B-Instruct
tags:
  • medical

  • video understanding

  • vision-language

  • temporal action localization

  • GRPO

  • reinforcement learning

pipeline_tag: visual-question-answering
---

uAI-NEXUS-MedVLM-1.0a-7B-RL

> Accepted at CVPR 2026 🎉

Base Model: Qwen2.5-VL-7B-Instruct

uAI-NEXUS-MedVLM-1.0a-7B-RL is a medical-video understanding model fine-tuned from Qwen2.5-VL-7B-Instruct. It is the 7B-RL member of the uAI-NEXUS-MedVLM 1.0 family (variant a = Qwen2.5-VL base; variants b / c use Qwen3-VL-4B and Qwen3.5-4B respectively). Training uses a two-stage pipeline:

1. Supervised Fine-Tuning (SFT) on medical video QA data.
2. Group Relative Policy Optimization (GRPO) with task-specific rewards for temporal precision and clinical semantics.

It achieves state-of-the-art performance on medical video understanding across temporal action localization, spatiotemporal grounding, video summarization, region captioning, and surgical skill/CVS assessment.

Model Details

  • Architecture: Qwen2.5-VL (7B parameters) — video + text
  • Training: SFT → GRPO
  • Domain: Medical and surgical video understanding
  • License: Apache 2.0

Supported Tasks

The model handles 8 medical video understanding tasks (11 variants):

| Task Category | Tasks |
|---|---|
| Temporal Understanding | Temporal Action Localization (TAL), Spatiotemporal Grounding (STG), Next Action Prediction |
| Captioning | Dense Captioning (GPT / Gemini), Video Summary (GPT / Gemini), Region Caption (GPT / Gemini) |
| Assessment | Skill Assessment, CVS (Critical View of Safety) |

Training Data

Trained on 51,505 balanced video-instruction pairs (the MedVidBench Standard split), spanning 8 source datasets: AVOS, CholecT50, CholecTrack20, Cholec80-CVS, CoPESD, EgoSurgery, JIGSAWS, NurViD.

Stage 2 (GRPO) uses task-balanced subsets of the Standard split (detailed in the paper).

Training Details

Stage 1 — Supervised Fine-Tuning

  • Objective: Learn medical video understanding from human-annotated QA pairs.
  • Optimizer: AdamW with linear learning-rate schedule.

Stage 2 — Group Relative Policy Optimization (GRPO)

  • Objective: Improve temporal precision and clinical semantic quality with RL.
  • Reward functions:
- TAL / STG: Logistic-normalized IoU (dataset-fair, IQR-based). - Video Summary / Region Caption: Semantic similarity (SentenceBERT). - Next Action: Exact-match reward. - Skill / CVS Assessment: Score-based reward.

Usage

Install

bash
pip install transformers accelerate torch pillow qwen-vl-utils

Inference with Transformers

python
import torch
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
from qwen_vl_utils import process_vision_info

model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
"UII-AI/uAI-NEXUS-MedVLM-1.0a-7B-RL",
torch_dtype=torch.bfloat16,
device_map="auto",
)
processor = AutoProcessor.from_pretrained("UII-AI/uAI-NEXUS-MedVLM-1.0a-7B-RL")

video_frames = ["frame_0001.jpg", "frame_0002.jpg", "frame_0003.jpg"] # list of frame paths

messages = [{
"role": "user",
"content": [
{"type": "video", "video": video_frames},
{"type": "text", "text": "When does the surgeon grasp the gallbladder? Provide start and end times in seconds."},
],
}]

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",
).to(model.device)

with torch.no_grad():
output_ids = model.generate(inputs, max_new_tokens=256)
generated_ids = [out[len(inp):] for inp, out in zip(inputs.input_ids, output_ids)]
response = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]

print(response)

Example: "The surgeon grasps the gallbladder from 45.2 to 58.7 seconds."

Batch Inference with VLLM

For full batch inference with correct video frame handling, use the reference pipeline at UII-AI/MedGRPO-Code:

bash
git clone https://github.com/UII-AI/MedGRPO-Code
cd MedGRPO-Code
pip install -r requirements.txt
bash run_inference.sh

Performance

Evaluated on MedVidBench (6,245 test samples across 8 tasks). GRPO consistently improves the SFT baseline on:

  • Temporal precision for TAL / STG (higher IoU).
  • Semantic quality for video summaries and region captions.
  • Alignment with expert annotations for skill / CVS assessment.

Submit predictions to the MedVidBench Leaderboard to benchmark your own models.

Limitations

  • Domain: Optimized for medical / surgical videos; may not generalize to other domains.
  • Temporal Resolution: Best on videos sampled at 0.1–1.0 FPS.
  • Language: Trained primarily on English medical terminology.
  • Video Length**: Optimal for videos of a few minutes; longer videos rely on frame sub-sampling.

License

Released under the Apache 2.0 License.

Citation

If you use this model or the MedVidBench benchmark, please cite:

bibtex
@inproceedings{su2026medgrpo,
  title     = {{MedGRPO}: Multi-Task Reinforcement Learning for Heterogeneous Medical Video Understanding},
  author    = {Su, Yuhao and Choudhuri, Anwesa and Gao, Zhongpai and Planche, Benjamin and
               Nguyen, Van Nguyen and Zheng, Meng and Shen, Yuhan and Innanje, Arun and
               Chen, Terrence and Elhamifar, Ehsan and Wu, Ziyan},
  booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year      = {2026}
}

Acknowledgments

Contact

Open an issue on the GitHub repository.