SuperAPIAI Directory

Open-Qwen2VL

github.com · AI developer platforms

Open-Qwen2VL is the official code repository for an efficiently computed pre-trained, fully open-source multimodal large language model (MLLM) aimed at academic resource environments, and the paper has been accepted by COLM 2025. The repository supports the complete pipeline from data quality scoring, high-quality data selection and re-sharding, multimodal sequence packing, to large-scale image-text data pre-training, small-scale and large-scale supervised fine-tuning, and multimodal benchmark evaluation. The project has released pre-trained model and instruction fine-tuned model checkpoints, pre-training data in webdataset format, and a technical report, and supports packing sequences into a single JSON file containing base64 images and text to save disk space.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Open-Qwen2VL is the official code repository for the paper "Open-Qwen2VL: Compute-Efficient Pre-Training of Fully-Open Multimodal LLMs on Academic Resources". This work has been accepted by COLM 2025, and the authors are Victorwz et al. The project focuses on efficiently pre-training fully open-source multimodal large language models (MLLMs) under limited academic computing resources.

[Main Purpose] This repository provides a complete multimodal large model training and data processing pipeline, covering the full chain from raw image-text data to model pre-training, supervised fine-tuning, and evaluation, and is suitable for developers and researchers conducting multimodal large model research in academic environments.

[Main Capabilities]

  1. Data quality score generation: Supports using DFN/CLIP and MLM-Filter to generate quality scores for data.
  2. High-quality data selection and re-sharding: Selects high-quality data based on quality scores and re-shards it into webdataset format.
  3. Multimodal Sequence Packing: For large-scale image-text datasets (webdataset format), supports both caption data and interleaved data; after the update, supports packing into a single JSON file containing base64 string images and text, which can save 95% of disk space.
  4. Pre-training: Supports pre-training using packed multimodal sequences. Script parameters include CKPTID (id for saving checkpoints), STAGE (optional pretrain or full-pretrain, the latter also makes the vision encoder trainable), BSZ (global batch size), PER_GPU_BSZ (per-GPU batch size; if the global batch size is not equal to the number of GPUs multiplied by the per-GPU batch size, gradient accumulation is applied).
  5. Supervised fine-tuning (SFT): Supports small-scale SFT data (such as LLaVA-665k) and large-scale SFT data (such as MAmmoTH-VL-10M). Script parameters include CKPT_PATH (path to the MLLM checkpoint after pre-training), CKPTID, DATAPATH (path to the SFT dataset JSON file).
  6. Evaluation: Provides evaluation support for a series of multimodal benchmarks, see docs/Eval.md for details.

[UsUsage】

  • To pretrain or SFT an MLLM, flash-attention must be installed.
  • The pretraining data has been released in webdataset format as Open-Qwen2VL-Data, and can be downloaded via huggingface-cli download or directly git clone.
  • Sequence packing supports outputting a single JSON file (containing base64 images and text) to save disk space.
  • Before training, you need to prepare pickle files for each sub-dataset according to the sequence packing instructions in the README, and then run the training script.
  • For large-scale SFT, you need to first download and extract the MAmmoTH-VL-10M images, then run python data_prepare/split_mammoth_10m.py to split each instruction sample into a single JSON file, and then run the training script.
  • For data quality scoring and data filtering, please refer to docs/DATA_Filter.md.
  • For evaluation, please refer to docs/Eval.md.

【Release Information】 March 31, 2025: Released all pretrained models and instruction-tuned model checkpoints (Open-Qwen2VL and Open-Qwen2VL-Base); released all pretraining data in webdataset format (Open-Qwen2VL-Data); released the technical report. May 16, 2025 update: Support sequence packing into a single JSON file.

【Basis and Citation】 The codebase was developed based on prismatic-vlms and vlm-evaluation. If you find this repository helpful, you can cite its paper.

【Limitations】 The materials do not provide the model's specific parameter scale, the specific hardware configuration required for training, the specific scores for each benchmark evaluation, license information, or the full text of detailed installation commands; these contents are not currently provided.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools