Repolode
2U1

2U1/Qwen-VL-Series-Finetune

Training scripts for fine-tuning the Qwen-VL vision-language model family (Qwen2-VL, Qwen2.5-VL, Qwen3-VL, Qwen3.5) with Hugging Face and Liger-Kernel.

Stars
1,980
Forks
223
Open issues
57
Last commit
2 months ago

What is it?

This project provides training scripts for adapting Qwen-VL series vision-language models to custom data. It covers Qwen2-VL, Qwen2.5-VL, Qwen3-VL and Qwen3.5, using Hugging Face Transformers and Liger-Kernel rather than a separate training framework.

The scripts support full fine-tuning, LoRA and QLoRA, DoRA, DeepSpeed ZeRO, and freezing or unfreezing the vision tower and language model layers separately. Training data follows the LLaVA conversation format and can include single-image, multi-image, video and mixed-modality samples. Beyond supervised fine-tuning, the repo includes DPO, GRPO with custom reward functions, and classification training with several loss options.

It also documents reasoning-trace training for supported Qwen3-VL Thinking and Qwen3.5 models, generation-based evaluation during training, a Gradio demo for inference, and a Docker image with a prebuilt environment.

Key features

  • 01Full fine-tuning, LoRA, QLoRA and DoRA for Qwen-VL models.
  • 02Training on single-image, multi-image, video and mixed-modality datasets in LLaVA format.
  • 03Preference optimization (DPO) and GRPO with user-defined reward functions.
  • 04Classification fine-tuning with cross-entropy or focal loss variants.
  • 05Separate learning rates and freezing controls for vision and language modules.
  • 06DeepSpeed ZeRO support and Liger-Kernel acceleration.

Use cases

  • Adapting a Qwen2.5-VL or Qwen3-VL model to a domain-specific image question-answering dataset.
  • Training a video understanding model from clips paired with text descriptions.
  • Building an image classifier on top of a Qwen-VL backbone.
  • Running reinforcement-learning style tuning with custom rewards on a vision-language model.

Quick start

  1. 1

    Install the Python packages from requirements.txt

    pip install -r requirements.txt -f https://download.pytorch.org/whl/cu128
  2. 2

    Install qwen-vl-utils

    pip install qwen-vl-utils
  3. 3

    Install flash-attn after the other packages

    pip install flash-attn --no-build-isolation

Things to know

  • Training setup assumes Ubuntu with a recent Nvidia GPU and CUDA 12.8.
  • Flash Attention 2 is unstable on Qwen3.5, so the README recommends disabling it there.
  • QLoRA cannot be combined with vision training or Liger-Kernel.

Topics

FAQ

What is Qwen-VL-Series-Finetune?
Training scripts for fine-tuning the Qwen-VL vision-language model family (Qwen2-VL, Qwen2.5-VL, Qwen3-VL, Qwen3.5) with Hugging Face and Liger-Kernel. This project provides training scripts for adapting Qwen-VL series vision-language models to custom data. It covers Qwen2-VL, Qwen2.5-VL, Qwen3-VL and Qwen3.5, using Hugging Face Transformers and Liger-Kernel rather than a separate training framework.
Is Qwen-VL-Series-Finetune free to use? What license does it have?
Qwen-VL-Series-Finetune is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is Qwen-VL-Series-Finetune still maintained?
Updated within 6 months. The last commit to Qwen-VL-Series-Finetune was on Sep 9, 2026.
What can I use Qwen-VL-Series-Finetune for?
Adapting a Qwen2.5-VL or Qwen3-VL model to a domain-specific image question-answering dataset. Training a video understanding model from clips paired with text descriptions. Building an image classifier on top of a Qwen-VL backbone. Running reinforcement-learning style tuning with custom rewards on a vision-language model.
How do I install Qwen-VL-Series-Finetune?
Install the Python packages from requirements.txt: pip install -r requirements.txt -f https://download.pytorch.org/whl/cu128 Install qwen-vl-utils: pip install qwen-vl-utils Install flash-attn after the other packages: pip install flash-attn --no-build-isolation
Where can I get Qwen-VL-Series-Finetune?
The source code and installation instructions are on GitHub: https://github.com/2U1/Qwen-VL-Series-Finetune

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects