Instructions to use leizhao7/VideoEdit-Qwen3.5-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use leizhao7/VideoEdit-Qwen3.5-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="leizhao7/VideoEdit-Qwen3.5-9B") 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("leizhao7/VideoEdit-Qwen3.5-9B") model = AutoModelForMultimodalLM.from_pretrained("leizhao7/VideoEdit-Qwen3.5-9B", 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 leizhao7/VideoEdit-Qwen3.5-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "leizhao7/VideoEdit-Qwen3.5-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leizhao7/VideoEdit-Qwen3.5-9B", "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/leizhao7/VideoEdit-Qwen3.5-9B
- SGLang
How to use leizhao7/VideoEdit-Qwen3.5-9B 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 "leizhao7/VideoEdit-Qwen3.5-9B" \ --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": "leizhao7/VideoEdit-Qwen3.5-9B", "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 "leizhao7/VideoEdit-Qwen3.5-9B" \ --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": "leizhao7/VideoEdit-Qwen3.5-9B", "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 leizhao7/VideoEdit-Qwen3.5-9B with Docker Model Runner:
docker model run hf.co/leizhao7/VideoEdit-Qwen3.5-9B
VideoEdit-Qwen3.5-9B
Paper ยท Project page ยท GitHub ยท Training guide
Reinforcement learning for long-horizon video editing. We train Qwen3.5-9B to inspect footage, reason about editing decisions, and use editing tools across multiple turns. Our tasks are constructed from 49 real films and their trailers, covering Content Selection, Narrative Sequencing, Rough Cut, and Fine Cut.
This model reaches 0.4467 overall, compared with 0.2841 for the base model and 0.4133 for outcome-only GRPO. Fine Cut improves by 45.4% relative to outcome-only GRPO, from 0.2015 to 0.2929.
Selected editing examples
Three Fine Cut tasks, each comparing the untrained base with this VideoEdit checkpoint.
Whiplash ยท Fine Cut.
| Untrained base | VideoEdit |
|---|---|
Untrained video ยท Trained video
Deadpool & Wolverine ยท Fine Cut.
| Untrained base | VideoEdit |
|---|---|
Untrained video ยท Trained video
Sinners ยท Fine Cut.
| Untrained base | VideoEdit |
|---|---|
Untrained video ยท Trained video
Selected individual rollouts, not an estimate of average performance. Whiplash and Deadpool & Wolverine use HD presentation reconstructions; Sinners uses the original renders. Recorded editing choices and rendering failures are preserved; scores refer to the original evaluated files. Film media are outside the model license.
Model overview
| Item | Setting |
|---|---|
| Base model | Qwen/Qwen3.5-9B |
| Model type | Dense vision-language model |
| Training | GRPO+PRM with a decayed process-reward weight |
| Checkpoint | Optimizer update 50 |
| Weights | Full BF16 safetensors, approximately 18.8 GB; no adapter required |
| Evaluated context budget | 131,072 tokens |
Video-editing results
Scores average four complete evaluation repetitions over 81 held-out validation tasks. Higher is better; bold marks the best value in each column.
| Policy | CS | NS | RC | FC | Overall |
|---|---|---|---|---|---|
| Base model | 0.6569 | 0.3028 | 0.2051 | 0.1516 | 0.2841 |
| Outcome-only GRPO | 0.8206 | 0.5000 | 0.3557 | 0.2015 | 0.4133 |
| This model | 0.8037 | 0.5518 | 0.3477 | 0.2929 | 0.4467 |
CS: Content Selection ยท NS: Narrative Sequencing ยท RC: Rough Cut ยท FC: Fine Cut.
Evaluation protocol and checkpoint selection
Each policy is evaluated on all 81 tasks in four repetitions, giving 324 scored rollouts. These are repeated evaluations of one trained checkpoint, not independent training seeds or best-of-four selection.
Overall averages the 81 tasks: 14 CS, 15 NS, 26 RC, and 26 FC. It is not an unweighted mean of the four task columns. Task types use different scoring criteria, so their absolute scores are not directly comparable measures of difficulty.
We select this release by the highest reported overall validation score among the comparable evaluated checkpoints at its model size. The four task types are constructed independently; Fine Cut keeps picture timing fixed while coordinating dialogue, music, and transitions.
Usage
Use the checkpoint with the editing agent and tool environment to run multi-turn editing tasks. The following example loads the policy and its multimodal processor in an environment with PyTorch, Transformers, Accelerate, Pillow, and a compatible Torchvision build.
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "leizhao7/VideoEdit-Qwen3.5-9B"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id, dtype=torch.bfloat16, device_map="auto"
)
The agent loop supplies the task brief, executes tool calls, and submits the final edit. Runtime memory must accommodate the weights, activations, and KV cache.
Decoding settings and compatibility
Evaluation uses thinking mode, temperature 1.0, top-p 1.0, no top-k filtering, a 131,072-token context budget, up to 16,384 output tokens per turn, and up to 100 turns. Set these explicitly when reproducing the scores; inherited generation defaults may differ.
Keep the supplied tokenizer, processor, and chat template with the weights. Architecture, tokenizer, and text/image preprocessing checks pass with Transformers 5.8.0 and PyTorch 2.11.0. The export excludes auxiliary multi-token-prediction weights, so MTP speculative decoding is unsupported.
Training data and method
Our scalable task-generation pipeline constructs editing tasks from 49 real films and their trailers. Filtering and sampling retain 797 tasks: 716 for training and 81 for validation, with no films shared between splits. AI assists with task descriptions; the underlying films and trailers are real media. The dataset is not distributed. The pipeline guide describes how to construct tasks from your own media.
The policy receives final outcome feedback and LLM-judged process rewards. The process-reward weight is 0.5 through update 20, decays cubically to zero over updates 20โ30, and remains zero afterward. Training continues from the fixed-weight PRM checkpoint at update 20, preserving its optimizer state.
Training combines SkyRL, vLLM, and an OpenCode-based editing agent. The base revision is c202236235762e1c871ad0ccb60c8ee5ba337b9a. This repository contains inference weights and model assets; training data and optimizer state are excluded.
Scope and limitations
Results cover movie-trailer editing under our tool and grading protocols. Performance may change with different media, prompts, tools, or interaction budgets. The reported scores do not measure general-purpose video quality or guarantee task completion.
Paper and authors
Lei Zhao ยท University of Pennsylvania
Zongheng Cao ยท Philo Labs
Xinyu Hu ยท Philo Labs
Part of this work was completed while Lei Zhao was an intern at Philo Labs.
Contact: leizhao7@upenn.edu
Citation
If you use this model or our framework, please cite the paper:
@misc{zhao2026finegrained,
title = {When Fine-Grained Credit Assignment Helps and Hurts: Multimodal Agentic Reinforcement Learning through Video Editing},
author = {Lei Zhao and Zongheng Cao and Xinyu Hu},
year = {2026},
eprint = {2610.35497},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2610.35497}
}
License
The model is derived from Qwen and distributed under Apache 2.0. The companion code uses MIT. See NOTICE for attribution and model modifications.
- Downloads last month
- -