# Repository Briefing: shuyansy/TGR-Reliance
> Source: https://repoforai.com/repo/shuyansy/TGR-Reliance (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/shuyansy/TGR-Reliance
- **Official Docs / Website**: https://huggingface.co/collections/sy1998/when-does-temporal-grounding-help-video-reasoning-6b058ea312ac2e5751e6b735
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: B+ (67/100 · Maintenance 35/35 · Adoption 1/25 · Releases 11/20 · License 20/20)
- **Review Snapshot**: 2026-12-01
- **Deployment / Stack Signals**: GPU, CLI
- **Momentum**: 33 ★ total (+29 24h / +33 7d) · 0 forks
- **Topics**: `benchmark`, `grpo`, `multimodal-llm`, `temporal-grounding`, `video-reasoning`, `video-understanding`
- **When to Use**: Best for: Multimodal research and model QA teams with GPU capacity that need to measure whether a VideoQA model uses the evidence it locates, or reproduce evidence-certified SFT followed by grounding-only GRPO. Skip if: You only need a generic answer-accuracy test, require turnkey evaluation for arbitrary inference backends, or need a production video-serving system rather than a research benchmark.

## Overview
```text
### Architecture & Core Mechanics
TGR-Reliance separates video inference, reliance scoring, and model training. `evaluation/eval_relianeedle.py` takes ReliaNeedle JSON annotations and MP4 files, configures the model, frame sampler, and prompt, and writes per-run JSONL. `evaluation/compute_regap.py` aggregates those results separately, so scoring can be rerun on saved outputs without launching model inference again.

The evaluation stack combines vLLM for inference, PyTorch and Transformers for model execution and integration, and video/image dependencies including decord, OpenCV, torchvision, and Pillow. Model adaptation is explicit: use `--system` and `--suffix` to supply prompting and adjust `evaluation/utils/parsing.py` for the model's answer and span syntax. The training path is separate, with LLaMA-Factory for SFT and verl for GRPO.

### Key Capabilities & Differentiators
ReliaNeedle includes 725 questions whose answers require evidence within an annotated time span. ReGAP measures reliance on the predicted span relative to random frames; R@0.3 is the share of predictions with temporal IoU of at least 0.3 against the evidence annotation. The trained Qwen3-VL-8B reaches ReGAP 1.225, 64.6% accuracy and 75.7% R@0.3. The trained Qwen2.5-VL-7B records 1.147, 60.8%, and 81.1%, respectively.

For training, RelyGen proposes candidate evidence spans for VideoQA pairs and keeps samples only when both judges answer correctly from the span alone and fail after its removal. This process yields the 20,000-sample EviCe dataset. The single-turn recipe fine-tunes Qwen2.5-VL-7B and Qwen3-VL-8B on EviCe, then applies GRPO with temporal IoU as the sole reward. A separate multi-turn implementation builds on Video-o3.

### Trade-offs & Limitations
Use ReGAP alongside accuracy and temporal localization, not as their replacement. On ReliaNeedle, Video-o3 has higher answer accuracy than the trained Qwen3-VL-8B (67.3% vs. 64.6%), despite lower ReGAP (0.611 vs. 1.225). The trained Qwen2.5-VL-7B achieves higher R@0.3 than the trained Qwen3-VL-8B despite lower ReGAP. Which model is preferable depends on whether the priority is answer correctness, localization, or reliance on the located evidence.

The reliance comparison adds inference work and is sensitive to frame sampling, prompts, and parsing. The supplied base and trained Qwen2.5-VL examples change both sampler and prompt, so reproduce those settings for a leaderboard comparison, but match them where possible when isolating the effect of training. EviCe's evidence labels are operational: they reflect the two judges' behavior under ablation, not proof that no other segment can support an answer.

### Hardware & Deployment Guide
The evaluation path is a local GPU CLI workflow. It requires Python 3.10 or newer and specifies `vllm==0.11.0`, `transformers==4.57.1`, and `torch==2.8.0`, plus torchvision, decord, opencv-python, Pillow, and NumPy. Fetch `sy1998/ReliaNeedle` from Hugging Face and pass `relianeedle.json` via `--annotations` and the dataset directory via `--video_root`. Make the selected model weights available to vLLM; the evaluation commands do not require a hosted inference API.

Check GPU driver compatibility with the pinned runtime, then pilot the exact model and frame sampler before a full run. VRAM and throughput depend on checkpoint size, visual token load, and concurrency; no fixed hardware minimum is specified. Training adds LLaMA-Factory, verl, and the separately downloaded EviCe dataset, with commands under `training/README.md`. There is no listed GitHub release; pin a repository revision, checkpoint revisions, and dataset revisions for repeatable runs.
```

## Key Capabilities
```text
- Evidence reliance: ReGAP tests the contribution of the model's predicted span against random frames; a score of 0 indicates no advantage over that baseline.
- Benchmark design: ReliaNeedle pairs 725 needle-in-a-haystack VideoQA questions with evidence spans and reports ReGAP, answer accuracy, and temporal recall at IoU ≥ 0.3.
- Evaluation interfaces: `evaluation/eval_relianeedle.py` writes JSONL results, which `evaluation/compute_regap.py` aggregates separately.
- Model integration: Qwen2.5-VL-7B and Qwen3-VL-8B examples exercise `grid`, `qwen25`, and `qwen3` samplers and the `tga` and `train` prompt presets.
- Evidence certification: RelyGen constructs EviCe's 20,000 VideoQA samples using two judges and both span-only and span-deletion tests.
- Training: LLaMA-Factory handles supervised fine-tuning before verl GRPO with a temporal IoU-only reward; `training/multiturn/` covers the Video-o3 tool-calling variant.
```

## Quick Start / Clone
```bash
hf download sy1998/ReliaNeedle --repo-type dataset --local-dir data/ReliaNeedle
```
