Instructions to use nuetee/RA-RFT-Qwen2.5-VL-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nuetee/RA-RFT-Qwen2.5-VL-7B with Transformers:
# 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nuetee/RA-RFT-Qwen2.5-VL-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nuetee/RA-RFT-Qwen2.5-VL-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nuetee/RA-RFT-Qwen2.5-VL-7B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/nuetee/RA-RFT-Qwen2.5-VL-7B
- SGLang
How to use nuetee/RA-RFT-Qwen2.5-VL-7B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "nuetee/RA-RFT-Qwen2.5-VL-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nuetee/RA-RFT-Qwen2.5-VL-7B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "nuetee/RA-RFT-Qwen2.5-VL-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nuetee/RA-RFT-Qwen2.5-VL-7B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use nuetee/RA-RFT-Qwen2.5-VL-7B with Docker Model Runner:
docker model run hf.co/nuetee/RA-RFT-Qwen2.5-VL-7B
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.
- Paper: Learning to Refuse: Refusal-Aware Reinforcement Fine-Tuning for Hard-Irrelevant Queries in Video Temporal Grounding
- Implementation: JINSUBY/RA-RFT
- Base model: Boshenxx/Time-R1-7B
- Architecture: Qwen2.5-VL-7B
- Format: full model weights in Safetensors, with tokenizer and processor files (not a LoRA adapter).
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
- 24