Instructions to use longvideoagent/longvideoagent-qwen3-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use longvideoagent/longvideoagent-qwen3-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="longvideoagent/longvideoagent-qwen3-4b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("longvideoagent/longvideoagent-qwen3-4b") model = AutoModelForCausalLM.from_pretrained("longvideoagent/longvideoagent-qwen3-4b") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use longvideoagent/longvideoagent-qwen3-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "longvideoagent/longvideoagent-qwen3-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": "longvideoagent/longvideoagent-qwen3-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/longvideoagent/longvideoagent-qwen3-4b
- SGLang
How to use longvideoagent/longvideoagent-qwen3-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 "longvideoagent/longvideoagent-qwen3-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": "longvideoagent/longvideoagent-qwen3-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "longvideoagent/longvideoagent-qwen3-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": "longvideoagent/longvideoagent-qwen3-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use longvideoagent/longvideoagent-qwen3-4b with Docker Model Runner:
docker model run hf.co/longvideoagent/longvideoagent-qwen3-4b
LongVideoAgent Qwen3-4B
This repository hosts the released LLM checkpoint for LongVideoAgent, a multi-agent framework for long-video question answering. This model is a Qwen3-4B-based checkpoint used in the LongVideoAgent project.
Overview
This model is trained based on the official repository: longvideoagent/LongVideoAgent.
LongVideoAgent utilizes a multi-agent collaboration framework to decompose complex long-video reasoning into specialized roles. For detailed methodology and agent architecture, please refer to our paper on arXiv: https://arxiv.org/abs/2512.20618.
This checkpoint is intended for use with the official LongVideoAgent codebase and evaluation pipeline.
Performance
On the LongTVQA+ test set, this model achieves an accuracy of 72%, while gpt-4o-mini achieves 74% on the same benchmark.
This demonstrates that our model delivers strong performance, achieving reasoning capabilities comparable to advanced closed-source models while utilizing a significantly smaller parameter size.
Intended Use
Use this model for:
- Research on long-video question answering
- Reproducing LongVideoAgent experiments
- Studying agentic reasoning over long videos
This checkpoint is not a general-purpose video model by itself. For inference and evaluation, please use the official repository:
Usage
Note on Context Length: This model natively supports a context length of 262,144. If you experience Out-Of-Memory (OOM) errors or have limited VRAM during inference, you can reduce the maximum context length in your vLLM parameters. For example: max_model_len=120000.
Please follow the setup and inference instructions in the official repository and project documentation:
If you use this checkpoint in your work, please also cite the LongVideoAgent paper below.
Citation
@misc{liu2025longvideoagentmultiagentreasoninglong,
title={LongVideoAgent: Multi-Agent Reasoning with Long Videos},
author={Runtao Liu and Ziyi Liu and Jiaqi Tang and Yue Ma and Renjie Pi and Jipeng Zhang and Qifeng Chen},
year={2025},
eprint={2512.20618},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={[https://arxiv.org/abs/2512.20618](https://arxiv.org/abs/2512.20618)},
}
- Downloads last month
- 7