🚀 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は、画像とテキストを入力として受け取り、テキストを出力するマルチモーダルモデルです。以下の手順で使用を開始できます。
✨ 主な機能
- 画像とテキストを入力として受け取り、テキストを出力するマルチモーダル機能を持つ。
- コードベース、モデル、データ、論文が公開されている。
📦 インストール
まず、以下のコマンドを使用して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. ...
📚 ドキュメント
更新情報
- [2025年4月1日] コードベース、モデル、データ、論文が公開されました。
謝辞
この研究は、国立科学財団のBioPACIFIC Materials Innovation Platformによる部分的な支援を受けています(Award No. DMR - 1933487)。
引用
@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}
}
📄 ライセンス
このモデルはCCライセンスの下で提供されています。
情報テーブル
| 属性 | 详情 |
|------|------|
| ベースモデル | Qwen/Qwen2.5 - 1.5B - Instruct、google/siglip - so400m - patch14 - 384 |
| データセット | weizhiwang/Open - Qwen2VL - Data、MAmmoTH - VL/MAmmoTH - VL - Instruct - 12M |
| 言語 | en |
| ライセンス | cc |
| パイプラインタグ | image - text - to - text |