VideoJev: A System-One Model for Video Understanding and Interaction
VideoJev is a video understanding model, but it doesn’t work like typical video chat models. It doesn’t generate text. Instead, it scores candidate segments or options directly. You give it a video and a set of questions. It returns probabilities, time intervals, and option indices. This design lets temporal grounding and multiple-choice video QA share the same scoring logic, removing the uncertain text decoding step found in generative models.
When I first saw the project, I assumed it was another “video ChatGPT.” Then I looked at the output of predict_video and realized it takes a discriminative route. For engineering work, that has a clear advantage: the output can go straight into threshold filtering and post-processing without parsing natural language first.
What Problem Does VideoJev Solve?
VideoJev breaks video understanding into two scoreable tasks: temporal grounding and multiple-choice video QA. It doesn’t generate text answers. Instead, it has the model assign probabilities to candidate segments or options. Temporal grounding outputs which time ranges most likely match a query. Video QA outputs which option is most likely correct.
This approach solves a practical problem. In many video applications, you don’t need the model to “say a paragraph.” You need it to tell you “this happens from second 3 to second 10” or “the answer is A.” Generative models can do that too, but the output is unstable and expensive to parse. VideoJev gives scores directly, so post-processing is much simpler.
It supports two tasks:
-
Temporal grounding: Given a query like “The woman in green eats pasta,” the model outputs the matching time interval in the video. -
Multiple-choice video QA: Given a question and several options, the model outputs a probability for each option and returns the answer index.
The teaser below shows shared candidate scoring and video computation, along with the trade-off between grounding/QA quality and model forward latency.

Architecturally, VideoJev freezes the vision part and mainly adjusts the head and language backbone during training. That choice lowers training cost and keeps the vision encoder from being pulled off course by small datasets.

Which Model Should You Use: VideoJev-4B or VideoJev-35B-A3B?
If you just want to run the pipeline and test ideas, choose VideoJev-4B. If you need stronger understanding or plan to run formal evaluations, choose VideoJev-35B-A3B. Both models use BF16 Safetensors format and provide Hugging Face checkpoints and examples.
| Model | Base model | Weight format | Usage |
|---|---|---|---|
| VideoJev-4B | Qwen3.5-4B | BF16 · Safetensors | Checkpoint & examples |
| VideoJev-35B-A3B | Qwen3.6-35B-A3B | BF16 · Safetensors | Checkpoint & examples |
The 4B version is good for single-GPU validation. The 35B-A3B version is larger, and training it also requires compiled grouped-GEMM and token-permutation extensions. The extra dependencies for 35B are listed separately, which tells you it isn’t just a model-name swap.
My take: if you’re building production-level video retrieval or interaction, start with 4B to get your data pipeline and evaluation flow working. Then decide whether you need 35B. Jumping straight to the large model often gets you stuck in environment setup, and you never see the actual results.
Quick Start: How to Run the 10-Second Demo
The key to running the demo is setting up the environment correctly, loading the model, and calling predict_video. There is a 10-second video example with copy-ready code. It uses ZhuYuhan/VideoJev-4B, and you can switch to ZhuYuhan/VideoJev-35B-A3B.
The environment requirements are Python 3.12, PyTorch 2.8 / CUDA 12.8, Triton 3.4, FlashAttention 2, and causal-conv1d. Install the matching CUDA packages first, then run:
pip install -r requirements.txt
source scripts/env.sh
Training also requires XTuner. The 35B version additionally needs compiled grouped-GEMM/token-permutation extensions. You can set XTUNER_ROOT before sourcing the environment, or install XTuner in that path.
Place the base models in models/Qwen3.5-4B and models/Qwen3.6-35B-A3B, or set the VIDEOJEV_BASE_4B and VIDEOJEV_BASE_35B environment variables.
Here is the demo code:
import json
import torch
from huggingface_hub import hf_hub_download
from transformers import AutoModel, AutoProcessor
video = hf_hub_download(
repo_id="ZhuYuhan/VideoJev-Demo", filename="eating_spaghetti.mp4",
repo_type="dataset", revision="7e2b9685bca592c3b929268f6fcf82c4ad74b267",
)
repo = "ZhuYuhan/VideoJev-4B"
processor = AutoProcessor.from_pretrained(repo, trust_remote_code=True)
model = AutoModel.from_pretrained(
repo, trust_remote_code=True, dtype=torch.bfloat16,
device_map={"": "cuda:0"}, attn_implementation="flash_attention_2",
)
model.prepare_for_inference()
questions = [
{"id": "grounding-1", "task": "grounding",
"query": "The woman in green eats pasta."},
{"id": "qa-1", "task": "choice",
"query": "What is the woman in green eating?",
"options": ["A. Pasta.", "B. Rice.", "C. Soup."]},
]
results = model.predict_video(
processor, video, questions,
fps=2.0, max_frames=2048, context=8192,
)
print(json.dumps(results, indent=2))
A few parameters matter here. fps=2.0 controls the sampling frame rate. max_frames=2048 limits the maximum number of frames. context=8192 is the context length. If your video is longer or you need finer temporal grounding, adjust these values. Increasing them uses more VRAM and compute time, but covers more content.
The model loads with attn_implementation="flash_attention_2", so FlashAttention 2 must be installed. If you skip the environment setup and run this directly, you will most likely hit an error when loading the model. The environment section comes before Quick start for a reason.
What Does the Inference Output Look Like?
The grounding task outputs a probability for each candidate segment and a final time interval. The choice task outputs a probability for each option, an answer index, and the answer text. Here is a recorded output from the 4B model:
[
{
"id": "grounding-1",
"task": "grounding",
"probabilities": [
0.005761092994362116,
0.010865824297070503,
0.026081746444106102,
0.9046059250831604,
0.9879851937294006,
0.9887627959251404,
0.9896195530891418,
0.9849089980125427,
0.833530068397522,
0.33037981390953064
],
"interval": [
3.0,
10.0
]
},
{
"id": "qa-1",
"task": "choice",
"probabilities": [
0.9999161958694458,
5.755242091254331e-05,
2.617507561808452e-05
],
"answer_index": 0,
"answer": "A. Pasta."
}
]
interval is in seconds. answer_index is zero-based, so 0 maps to the first option. For probabilities, grounding uses sigmoid and QA uses softmax. That means each grounding probability is independent, while QA option probabilities sum to 1.
The default grounding threshold is threshold=0.25. You can override it by passing threshold=... to predict_video or predict_features. This threshold decides which segments are kept as the final interval. Lowering it increases recall but may add false positives. Raising it increases precision but may miss some segments.
In this output, the QA answer is very confident: the first option has a probability near 1. The grounding probabilities are more layered, with several high-probability segments and a gradual drop after that. This output structure is easy to filter later. You can sort by probability or cut off at a threshold.
Training VideoJev: Data, Stages, and Launch Commands
Training VideoJev starts with JSONL data, then a command generates ready-to-train configs. Training has two stages: head warmup and joint. Vision stays frozen the whole time. Each stage runs for one epoch with a global batch of 64 packs.
Data preparation is covered in docs/DATA.md. After you prepare the JSONL data as described there, the command generates training configs for either the 4B or 35B model.
The training stages are:
| Stage | Trainable parameters | Grounding loss | QA loss |
|---|---|---|---|
| Head warmup | Head | BCE | CE |
| Joint | Language backbone + head | BCE + 2 × duration-weighted SoftIoU | CE |
In the head warmup stage, only the head is trained. Grounding uses BCE and QA uses CE. This stage lets the head first learn to align visual features with text queries. In the joint stage, the language backbone is unfrozen. The grounding loss becomes BCE plus 2× duration-weighted SoftIoU. QA still uses CE.
This two-stage design makes sense. If you start joint training immediately, the language backbone can be pulled off course by a randomly initialized head. Training the head alone first, then fine-tuning jointly once it stabilizes, gives a smoother training curve.
Launch commands use torchrun:
torchrun --standalone --nproc-per-node=8 scripts/train.py \
--config data/custom4b/configs/head_only.json --out runs/custom4b/head_only
torchrun --standalone --nproc-per-node=8 scripts/train.py \
--config data/custom4b/configs/joint.json --out runs/custom4b/joint \
--init-head runs/custom4b/head_only/head.pt
Note that the second command uses --init-head to load the head weights saved from the first stage. You cannot skip this link, or the joint stage starts from scratch.
For 35B-A3B training, use scripts/train_qwen36.py with its generated configs and scripts/env_qwen36.sh. GPU settings and data preparation details are in docs/DATA.md.
After 4B training, joint/hf_checkpoint/ is exported in Hugging Face format, preserving the base model’s BF16 dtype. Recovery files and the standalone 35B conversion process are in docs/CHECKPOINTS.md.
Evaluation and Verification: How to Check the Model Works
Evaluation uses scripts/evaluate_hf.py. Pass in a checkpoint and a manifest file, and specify an output directory. Verification uses pytest. QA evaluation uses a fixed 256K context.
Evaluation command:
source scripts/env.sh
python scripts/evaluate_hf.py \
--checkpoint ZhuYuhan/VideoJev-4B \
--manifest /path/to/eval.jsonl --out runs/eval4b
The same command supports ZhuYuhan/VideoJev-35B-A3B. QA uses a fixed 256K context, which means the context length is uniform during evaluation and does not change with video length. This setting has VRAM requirements, so check your GPU before running.
Verification command:
source scripts/env.sh
python -m pytest -q tests
For tokenizer checks, set VIDEOJEV_TEST_MODEL=/path/to/Qwen3.5-4B. When required local inputs are missing, tests skip automatically. This design is CI-friendly and won’t turn red just because the model isn’t present.
The most common issue during evaluation is the manifest format. The exact JSONL fields are covered in docs/EVALUATION.md. Prepare a small sample first, get it running, then scale up.
Documentation and Citation
Documentation entry points: Paper, Data, Evaluation, Checkpoint export. If you need to go deeper into a specific step, read the matching doc first. The main page only gives an overview and quick commands.
Citation:
@misc{zhu2026videojevmodelvideounderstanding,
title={VideoJev: System One Model for Video Understanding and Interaction},
author={Yuhan Zhu and Xiangyu Zeng and Qingyi Si and Chenxu Yang and Yifei Li and Luozheng Qin and Junhao Zhou and Dingyu Yao and Jun Zhang and Chuanyu Qin and Zhiqiu Zhang and Yuandong Yang and Yuqi Xu and Tianyu Zhang and Hongcheng Guo and Jiaqi Wang and Nan Duan and Limin Wang},
year={2026},
eprint={2610.18615},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2610.18615},
}
Acknowledgements mention Qwen, XTuner, TimeLens-100K, and TimeLens2-93K. The project uses Apache 2.0 license and includes a NOTICE file.
Practical Summary / Checklist
If you’re ready to try VideoJev, follow this order:
-
Confirm Python 3.12, PyTorch 2.8 / CUDA 12.8, Triton 3.4. -
Install FlashAttention 2 and causal-conv1d, then install requirements.txt. -
Run source scripts/env.shto activate the environment. -
Place base models in models/Qwen3.5-4Bandmodels/Qwen3.6-35B-A3B, or setVIDEOJEV_BASE_4BandVIDEOJEV_BASE_35B. -
Run the 10-second demo and confirm predict_videoreturns JSON. -
Prepare JSONL data and generate training configs. -
Run head warmup first, then joint. Remember --init-head. -
Evaluate with evaluate_hf.pyand run tests with pytest. -
For 35B, additionally compile grouped-GEMM/token-permutation extensions. -
Export checkpoints and verify BF16 format and Hugging Face directory structure.
One-Page Overview
| Item | Content |
|---|---|
| Model name | VideoJev |
| Core tasks | Temporal grounding, multiple-choice video QA |
| Core mechanism | Direct candidate scoring, no text generation |
| Model versions | VideoJev-4B, VideoJev-35B-A3B |
| Base models | Qwen3.5-4B, Qwen3.6-35B-A3B |
| Weight format | BF16 · Safetensors |
| Inference APIs | predict_video, predict_features |
| Default threshold | grounding threshold=0.25 |
| Probability functions | grounding sigmoid, QA softmax |
| Training stages | Head warmup, Joint |
| Vision part | Frozen |
| Evaluation context | QA fixed 256K |
| License | Apache 2.0 |
FAQ
Does VideoJev generate text answers?
No. It outputs probabilities, time intervals, and option indices through direct candidate scoring. It does not generate natural language text.
Can grounding and choice tasks run together?
Yes. The demo puts both questions in the same questions list. One call to predict_video returns both sets of results.
What unit is the grounding time interval in?
Seconds. The interval field gives start and end seconds directly.
Is answer_index zero-based?
Yes. 0 means the first option.
Why does grounding use sigmoid?
Because each candidate segment is judged independently for a match, not as a mutually exclusive classification. QA options are mutually exclusive, so they use softmax.
Can I change the default threshold of 0.25?
Yes. Pass threshold=... to predict_video or predict_features to override it.
Does the vision encoder update during training?
No. The vision part stays frozen. Only the head and language backbone are trained.
Can I run the 35B version with the 4B commands?
No. 35B uses scripts/train_qwen36.py and scripts/env_qwen36.sh, and it needs extra compiled extensions.
What context length does QA evaluation use?
A fixed 256K context.
What if the tests won’t run?
Check whether local inputs are missing. Tests skip automatically when they are. For tokenizer checks, set VIDEOJEV_TEST_MODEL=/path/to/Qwen3.5-4B.

