How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="nuetee/RA-RFT-Qwen2.5-VL-7B")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
pipe(text=messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM

processor = AutoProcessor.from_pretrained("nuetee/RA-RFT-Qwen2.5-VL-7B")
model = AutoModelForMultimodalLM.from_pretrained("nuetee/RA-RFT-Qwen2.5-VL-7B", device_map="auto")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
inputs = processor.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=256)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

RA-RFT-Qwen2.5-VL-7B

RA-RFT (Refusal-Aware Reinforcement Fine-Tuning) enables video temporal grounding models to locate relevant temporal segments and refuse unanswerable queries with explanations and corrected queries.

Usage

Follow the RA-RFT README for installation and dataset preparation. Download the checkpoint from the RA-RFT repository directory:

from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="nuetee/RA-RFT-Qwen2.5-VL-7B",
    local_dir="./ckpts/RA-RFT-Qwen2.5-VL-7B",
)

Run inference using the implementation's task prompt and video preprocessing. For example, HI-VTG (ActivityNet):

python inference.py \
  --model_path ./ckpts/RA-RFT-Qwen2.5-VL-7B \
  --test_data_path ./dataset/anno/hi_vtg_activitynet.json \
  --output_dir ./inference_output/hi_vtg_activitynet \
  --preprocessed_data_path ./dataset/preprocessed_video \
  --batch_size 8

Adjust dataset and video paths to your environment. For evaluation, other datasets, and multi-GPU inference, see the RA-RFT evaluation instructions.

Output format

Responses follow the implementation's <think>...</think> <answer>...</answer> <correction>...</correction> format. Answerable queries receive temporal boundaries in seconds; unanswerable queries receive a refusal explanation and a corrected query.

Citation

Please cite the CVPR 2026 paper:

@InProceedings{Lee_2026_CVPR,
  author={Lee, Jin-Seop and Lee, SungJoon and Jung, SeongJun and Li, Boyang and Lee, Jee-Hyong},
  title={Learning to Refuse: Refusal-Aware Reinforcement Fine-Tuning for Hard-Irrelevant Queries in Video Temporal Grounding},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  month={June},
  year={2026},
  pages={10397-10407}
}

License

Apache 2.0. See LICENSE.

Downloads last month
117
Safetensors
Model size
8B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for nuetee/RA-RFT-Qwen2.5-VL-7B

Finetuned
(1)
this model
Quantizations
2 models

Paper for nuetee/RA-RFT-Qwen2.5-VL-7B