🚀 Open-Qwen2VL模型介紹
Open-Qwen2VL是一個多模態模型,它以圖像和文本作為輸入,並輸出文本。該模型能夠有效處理圖像與文本的信息融合,為多模態任務提供了強大的支持。
🚀 快速開始
Open-Qwen2VL是一個多模態模型,它接收圖像和文本作為輸入,並輸出文本。該模型的相關信息在論文 Open-Qwen2VL: Compute-Efficient Pre-Training of Fully-Open Multimodal LLMs on Academic Resources 中有所描述。代碼可在 https://github.com/Victorwz/Open-Qwen2VL 獲取。
✨ 主要特性
- 多模態處理:能夠同時處理圖像和文本輸入,輸出文本結果。
- 開源可用:代碼、模型、數據和論文均已發佈。
📦 安裝指南
請首先通過以下命令安裝Open-Qwen2VL:
pip install git+https://github.com/Victorwz/Open-Qwen2VL.git#subdirectory=prismatic-vlms
💻 使用示例
基礎用法
import requests
import torch
from PIL import Image
from prismatic import load
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
vlm = load("Open-Qwen2VL")
vlm.to(device, dtype=torch.bfloat16)
image_url = "https://huggingface.co/adept/fuyu-8b/resolve/main/bus.png"
image = [vlm.vision_backbone.image_transform(Image.open(requests.get(image_url, stream=True).raw).convert("RGB")).unsqueeze(0)]
user_prompt = "<image>\nDescribe the image."
generated_text = vlm.generate_batch(
image,
[user_prompt],
do_sample=False,
max_new_tokens=512,
min_length=1,
)
print(generated_text[0])
圖像描述結果如下:
The image depicts a blue and orange bus parked on the side of a street. ...
📚 詳細文檔
模型信息
屬性 |
詳情 |
基礎模型 |
Qwen/Qwen2.5 - 1.5B - Instruct、google/siglip - so400m - patch14 - 384 |
數據集 |
weizhiwang/Open - Qwen2VL - Data、MAmmoTH - VL/MAmmoTH - VL - Instruct - 12M |
語言 |
英文 |
許可證 |
cc |
任務類型 |
圖像文本到文本 |
更新記錄
- [2025年4月1日] 代碼庫、模型、數據和論文發佈。
致謝
本工作部分得到了美國國家科學基金會BioPACIFIC材料創新平臺的資助,資助編號為DMR - 1933487。
📄 許可證
本項目採用cc許可證。
引用
@article{Open-Qwen2VL,
title={Open-Qwen2VL: Compute-Efficient Pre-Training of Fully-Open Multimodal LLMs on Academic Resources},
author={Wang, Weizhi and Tian, Yu and Yang, Linjie and Wang, Heng and Yan, Xifeng},
journal={arXiv preprint arXiv:2504.00595},
year={2025}
}