Instructions to use XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B") 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("XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B") model = AutoModelForMultimodalLM.from_pretrained("XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B", 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 XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B", "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/XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B
- SGLang
How to use XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B 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 "XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B" \ --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": "XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B", "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 "XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B" \ --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": "XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B", "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 XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B with Docker Model Runner:
docker model run hf.co/XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B
Generalized CycleGRPO — Temporal OMTG 4B
Official OMTG-initialized temporal grounding model for Generalized CycleGRPO. It extends an OMTG policy with bidirectional region–text interfaces and cycle-consistent reinforcement learning. The underlying architecture is Qwen3-VL-4B; this is not a generic Qwen Instruct model.
Project page · Code · OMTG
Intended use
Temporal grounding: locate the time interval matching a textual event description in a source video. This is the model used for the OMTG + Ours TimeLens comparison. The main DOVE captioning model is instead Generalized-CycleGRPO-Temporal-4B. Do not interchange these two releases when reproducing the paper tables.
Reported results
| TimeLens dataset | R1@0.3 | R1@0.5 | R1@0.7 | tIoU |
|---|---|---|---|---|
| Charades-STA | 72.9 | 60.2 | 32.7 | 51.8 |
| ActivityNet Captions | 65.4 | 55.5 | 37.6 | 49.0 |
| QVHighlights | 80.4 | 70.9 | 53.7 | 64.5 |
All values are percentages under the paper's TimeLens protocol.
Loading
The repository is a standard Transformers Qwen3-VL checkpoint. Its original float32 weight serialization is retained. You can select bfloat16 for GPU inference without downloading a separate model variant.
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B"
model = AutoModelForImageTextToText.from_pretrained(
model_id, torch_dtype=torch.bfloat16, device_map="auto"
).eval()
processor = AutoProcessor.from_pretrained(model_id)
Provide the complete source video and the textual event query using the processor's multimodal chat template. For example, ask for the start and end times of the person opening a door. Use the official OMTG/TimeLens prompt, video-sampling, and parsing protocol for the reported numbers. A generic chat prompt is only an interface demonstration, not benchmark reproduction.
The video implementation and task-routing utilities are available in
generalized/.
No SAMTok mask tokenizer is required for temporal interval outputs.
Limitations and attribution
Ambiguous queries and repeated or visually similar occurrences can produce incorrect intervals. This release is intended for research and is not a validated event-detection system for safety-critical use. It builds on OMTG and the Qwen3-VL architecture/tokenizer. See NOTICE and LICENSE for attribution and license terms.
Authors
Xin Zhang, Haochen Wang, Beibei Lin, Zhaoxiang Zhang, Robby T. Tan, Jason Li, and Dacheng Tao.
- Downloads last month
- 12
Model tree for XinNUS/Generalized-CycleGRPO-Temporal-OMTG-4B
Base model
Qwen/Qwen3-VL-4B-Instruct