LongVILA-R1-7B
supports both
multiple-choice
questions and
open-ended
questions. It can switch between thinking and non-thinking modes.
LongVILA-R1-7B
demonstrates strong performance in long video reasoning, achieving
70.7%
on VideoMME (w/ sub.) and surpassing Gemini-1.5-Pro across diverse reasoning tasks.
Long-RL
is a codebase that accelerates long video RL training by up to
2.1×
through its MR-SP system. It supports RL training on image, video, and omni inputs across VILA, Qwen/Qwen-VL, and diffusion models.
Evaluation:
Video QA Benchmarks
Models
VideoMME (w/o sub)
VideoMME (w sub)
ActivityNet-QA (test)
LongVideoBench (val)
PerceptionTest (val)
NExT-QA (mc)
VNBench (val)
LongVILA-7B
60.1
65.1
59.5
57.1
58.1
80.7
63.0
LongVILA-R1-7B
65.0
70.7
64.8
58.0
68.9
81.5
75.5
LongVideo-Reason-eval
Models
Temporal
Goal
Plot
Spatial
Overall
LongVILA-R1-7B
68.1
85.7
70.6
53.3
72.0
Usage
General Inference
from transformers import AutoModel
model_path = "Efficient-Large-Model/LongVILA-R1-7B"
model = AutoModel.from_pretrained(model_path, trust_remote_code=True, device_map="auto")
use_thinking = True# Switching between thinking and non-thinking modes
system_prompt_thinking = "You are a helpful assistant. The user asks a question, and then you solves it.\n\nPlease first think deeply about the question based on the given video, and then provide the final answer. The reasoning process and answer are enclosed within <think> </think> and <answer> </answer> tags, respectively, i.e., <think> reasoning process here </think> <answer> answer here </answer>.\n\n Question: {question}"
prompt = "What is the main purpose of the video?"
video_path = "video.mp4"if use_thinking:
prompt = system_prompt_thinking.format(question=prompt)
response = model.generate_content([prompt, {"path": video_path}])
print("Response: ", response)
with vLLM engine
Tested on
vllm==0.9.1
. We need to get the remote code first.
Then, you can use the following code for model generation.
import os
from transformers import AutoModel
from vllm import LLM, SamplingParams
from remote_code.media import extract_media
from remote_code.mm_utils import process_images
from remote_code.tokenizer_utils import tokenize_conversation
model_path = "path_to/Efficient-Large-Model/LongVILA-R1-7B"
model_encoder = AutoModel.from_pretrained(model_path, trust_remote_code=True, device_map="auto", llm_only_need_embed=True)
# you can change gpu_memory_utilization according to GPU memory
llm = LLM(model=os.path.join(model_path, "llm"), enable_prompt_embeds=True, gpu_memory_utilization=0.5)
use_thinking = True# Switching between thinking and non-thinking modes
system_prompt_thinking = "You are a helpful assistant. The user asks a question, and then you solves it.\n\nPlease first think deeply about the question based on the given video, and then provide the final answer. The reasoning process and answer are enclosed within <think> </think> and <answer> </answer> tags, respectively, i.e., <think> reasoning process here </think> <answer> answer here </answer>.\n\n Question: {question}"
prompt = "What is the main purpose of the video?"
video_path = "video.mp4"if use_thinking:
prompt = system_prompt_thinking.format(question=prompt)
conversation = [{"from": "human", "value": [prompt, {"path": video_path}]}]
media = extract_media(conversation, model_encoder.config)
input_ids = tokenize_conversation(conversation, model_encoder.tokenizer, add_generation_prompt=True).unsqueeze(0).cuda()
media["video"] = [
process_images(images, model_encoder.vision_tower.image_processor, model_encoder.config).half()
for images in media["video"]
]
inputs_embeds, _, _ = model_encoder._embed(input_ids, media, {"video": {}}, None, None)
completions = llm.generate(prompts=[{"prompt_embeds": inputs_embeds.squeeze(0)}], sampling_params=SamplingParams(max_tokens=1024))
response = completions[0].outputs[0].text
print("Response: ", response)
LongVILA-R1 Model Card
Model details
Model type:
LongVILA-R1 addresses the unique challenges of long video reasoning by integrating three critical components: (1) a large-scale dataset, LongVideo-Reason, comprising 104K long video QA pairs with high-quality reasoning annotations across diverse domains such as sports, games, and vlogs; (2) a two-stage training pipeline that extends VLMs with chain-of-thought supervised fine-tuning (CoT-SFT) and reinforcement learning (RL); and (3) a training infrastructure for long video RL, named Multi-modal Reinforcement Sequence Parallelism (MR-SP), which incorporates sequence parallelism and a vLLM-based engine tailored for long video, using cached video embeddings for efficient rollout and prefilling. In our experiments, LongVILA-R1-7B achieves strong performance on video benchmarks, reaching 65.0% and 70.7% accuracy on VideoMME without and with subtitles, respectively, and consistently outperforming LongVILA-R1 across multiple benchmarks. Moreover, LongVILA-R1 shows steady performance improvements as the number of input video frames increases.
Model date:
LongVILA-R1-7B was trained in July 2025.
@misc{long-rl,
title = {Long-RL: Scaling RL to Long Sequences},
author = {Yukang Chen, Wei Huang, Shuai Yang, Qinghao Hu, Baifeng Shi, Hanrong Ye, Ligeng Zhu, Zhijian Liu, Pavlo Molchanov, Jan Kautz, Xiaojuan Qi, Sifei Liu,Hongxu Yin, Yao Lu, Song Han},
year = {2025},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/NVlabs/Long-RL}},
}
@article{chen2025longvila-r1,
title={Scaling RL to Long Videos},
author={Yukang Chen and Wei Huang and Baifeng Shi and Qinghao Hu and Hanrong Ye and Ligeng Zhu and Zhijian Liu and Pavlo Molchanov and Jan Kautz and Xiaojuan Qi and Sifei Liu and Hongxu Yin and Yao Lu and Song Han},
year={2025},
eprint={2507.07966},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
@inproceedings{chen2024longvila,
title={LongVILA: Scaling Long-Context Visual Language Models for Long Videos},
author={Yukang Chen and Fuzhao Xue and Dacheng Li and Qinghao Hu and Ligeng Zhu and Xiuyu Li and Yunhao Fang and Haotian Tang and Shang Yang and Zhijian Liu and Ethan He and Hongxu Yin and Pavlo Molchanov and Jan Kautz and Linxi Fan and Yuke Zhu and Yao Lu and Song Han},
booktitle={The International Conference on Learning Representations (ICLR)},
year={2025},
}
Primary intended uses:
The primary use of LongVILA-R1 is research on large multimodal models and chatbots.
Primary intended users:
The primary intended users of the model are researchers and hobbyists in computer vision, natural language processing, machine learning, and artificial intelligence.
Input:
Input Type:
Video and Text
Input Format:
MP4 and other video fromats
Output:
Output Type:
Text
Output Format:
String
[Preferred/Supported] Operating System(s):
Linux
Inference:
Engine:
[Tensor(RT), Triton, Or List Other Here]
PyTorch
Test Hardware:
A100
H100
A6000
Ethical Considerations
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
Runs of Efficient-Large-Model LongVILA-R1-7B on huggingface.co
528
Total runs
12
24-hour runs
-6
3-day runs
11
7-day runs
462
30-day runs
More Information About LongVILA-R1-7B huggingface.co Model
LongVILA-R1-7B huggingface.co
LongVILA-R1-7B huggingface.co is an AI model on huggingface.co that provides LongVILA-R1-7B's model effect (), which can be used instantly with this Efficient-Large-Model LongVILA-R1-7B model. huggingface.co supports a free trial of the LongVILA-R1-7B model, and also provides paid use of the LongVILA-R1-7B. Support call LongVILA-R1-7B model through api, including Node.js, Python, http.
LongVILA-R1-7B huggingface.co is an online trial and call api platform, which integrates LongVILA-R1-7B's modeling effects, including api services, and provides a free online trial of LongVILA-R1-7B, you can try LongVILA-R1-7B online for free by clicking the link below.
Efficient-Large-Model LongVILA-R1-7B online free url in huggingface.co:
LongVILA-R1-7B is an open source model from GitHub that offers a free installation service, and any user can find LongVILA-R1-7B on GitHub to install. At the same time, huggingface.co provides the effect of LongVILA-R1-7B install, users can directly use LongVILA-R1-7B installed effect in huggingface.co for debugging and trial. It also supports api for free installation.