Downloads · 30 days
9
15% of all-time downloads
williamljx/Qwen3-VL-2B-Instruct-RL-GRPO-merged
Qwen3-VL-2B-Instruct-RL-GRPO-merged is a machine learning model from williamljx. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Downloads · 30 days
9
15% of all-time downloads
All-time downloads
61
Public
Parameters
2.1B
4.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.3 GB · 100%
From the Hugging Face model README
from transformers import Qwen3VLForConditionalGeneration,AutoProcessor
from peft import PeftModel
import torch
base_model_path = "/model/Qwen3-VL-2B-Instruct"
adapter_model_path = "/model/Qwen3-VL-2B-Instruct-trl-grpo"
merged_model_path = "/model/Qwen3-VL-2B-Instruct-RL-GRPO-merged"
model=Qwen3VLForConditionalGeneration.from_pretrained(base_model_path,torch_dtype=torch.bfloat16,device_map="auto",attn_implementation="flash_attention_2")
processor=AutoProcessor.from_pretrained(base_model_path,use_fast=True)
adapter_model=PeftModel.from_pretrained(model,adapter_model_path)
merged_model=adapter_model.merge_and_unload()
merged_model.save_pretrained(merged_model_path)
processor.save_pretrained(merged_model_path)
print("Merged model saved to:", merged_model_path)