yguooo/newyorker_caption_ranking
Viewer • Updated • 2.18M • 969 • 6
How to use HumorR1/policy-e2a-grpo-no-thinking with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("/home/ubuntu/code/humor-r1/checkpoints/qwen3vl-2b-sft-instruct-nothink-merged")
model = PeftModel.from_pretrained(base_model, "HumorR1/policy-e2a-grpo-no-thinking")LoRA on Qwen3-VL-2B-Instruct trained via GRPO against the Bradley-Terry reward model HumorR1/rm-qwen25vl-3b-nodesc. Captions emitted directly with no thinking trace.
yguooo/newyorker_caption_ranking).Part of a 2x2 ablation over training method (SFT, GRPO) and output
format (no thinking, thinking) for humor caption generation. See
HumorR1/rm-qwen25vl-3b-nodesc for the reward model used to train (and
score) this policy.
Backbone: Qwen/Qwen3-VL-2B-Instruct.
This repo is a LoRA adapter; load with peft.PeftModel.from_pretrained.
from PIL import Image
from transformers import AutoProcessor
from vllm import LLM, SamplingParams
from vllm.lora.request import LoRARequest
processor = AutoProcessor.from_pretrained("Qwen/Qwen3-VL-2B-Instruct", trust_remote_code=True)
llm = LLM(model="Qwen/Qwen3-VL-2B-Instruct", trust_remote_code=True, dtype="bfloat16",
enable_lora=True, max_lora_rank=32, max_model_len=4096)
# Caption format: <caption>X</caption>; thinking variant prefixes <think>...</think>.
HumorR1/rm-qwen25vl-3b-nodesc (held-out pairwise accuracy 0.6635).Base model
Qwen/Qwen3-VL-2B-Instruct
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/home/ubuntu/code/humor-r1/checkpoints/qwen3vl-2b-sft-instruct-nothink-merged") model = PeftModel.from_pretrained(base_model, "HumorR1/policy-e2a-grpo-no-thinking")