2U1/Qwen-VL-Series-Finetune
An open-source implementaion for fine-tuning Qwen-VL series by Alibaba Cloud.
What it solves
This project provides a comprehensive toolkit for fine-tuning the Qwen-VL series of vision-language models (including Qwen2-VL, Qwen2.5-VL, Qwen3-VL, and Qwen3.5). It simplifies the process of adapting these multimodal models to specific tasks, supporting various training methods from full fine-tuning to parameter-efficient techniques like LoRA and QLoRA.
How it works
The repository provides training scripts built on HuggingFace and Liger-Kernel to optimize memory usage and speed. It supports multiple training paradigms:
- Supervised Fine-Tuning (SFT): Standard training on labeled datasets.
- Preference Optimization: Implements Direct Preference Optimization (DPO) and Group Relative Policy Optimization (GRPO) to align model behavior.
- Reasoning Training: Supports explicit reasoning traces (thinking process) for Qwen3-VL-Thinking and Qwen3.5 models using a specialized dataset format.
- Classification: Includes scripts for fine-tuning the models for classification tasks.
It handles diverse data modalities, including single images, multi-image sets, and videos, following the LLaVA dataset specification.
Who it’s for
- AI researchers and developers looking to customize Qwen-VL models for domain-specific visual understanding.
- Users wanting to implement advanced alignment techniques like GRPO or DPO on multimodal models.
- Developers needing to train vision-language models with limited hardware resources via LoRA/QLoRA and Liger-Kernel optimization.
Highlights
- Broad Model Support: Compatible with Qwen2-VL, Qwen2.5-VL, Qwen3-VL (including MoE variants), and Qwen3.5.
- Optimization: Integrates Liger-Kernel for memory efficiency and fused MoE expert kernels for MoE models.
- Flexible Training: Supports full fine-tuning, LoRA, QLoRA, and the ability to selectively unfreeze specific layers of the vision tower or LLM.
- Multimodal Capabilities: Native support for multi-image and video training.
- Advanced Alignment: Built-in support for DPO and GRPO training methods.
Related
- Project
- Dispatch
- Project
- Dispatch
- Dispatch