Views
No views yet



VideoMME, MLVU, EgoSchema, and VSI-bench (where it outperforms Qwen3-VL-8B-Instruct by 8.3 points).BLINK and MMBench.
1conda create -n moss_vl python=3.12 pip -y
2conda activate moss_vl
3pip install -i https://pypi.org/simple --no-build-isolation -r requirements.txt1import torch
2from transformers import AutoModelForCausalLM, AutoProcessor
3
4checkpoint = "path/to/checkpoint"
5image_path = "data/example_image.jpg"
6prompt = "Describe this image."
7
8
9def load_model(checkpoint: str):
10 processor = AutoProcessor.from_pretrained(
11 checkpoint,
12 trust_remote_code=True,
13 frame_extract_num_threads=1,
14 )
15 model = AutoModelForCausalLM.from_pretrained(
16 checkpoint,
17 trust_remote_code=True,
18 device_map="auto",
19 torch_dtype=torch.bfloat16,
20 attn_implementation="flash_attention_2",
21 )
22 return model, processor
23
24
25model, processor = load_model(checkpoint)
26
27text = model.offline_image_generate(
28 processor,
29 prompt=prompt,
30 image=image_path,
31 shortest_edge=4096,
32 longest_edge=16777216,
33 multi_image_max_pixels=201326592,
34 patch_size=16,
35 temporal_patch_size=1,
36 merge_size=2,
37 image_mean=[0.5, 0.5, 0.5],
38 image_std=[0.5, 0.5, 0.5],
39 max_new_tokens=256,
40 temperature=1.0,
41 top_k=50,
42 top_p=1.0,
43 repetition_penalty=1.0,
44 do_sample=False,
45 vision_chunked_length=64,
46)
47
48print(text)1import torch
2from transformers import AutoModelForCausalLM, AutoProcessor
3
4checkpoint = "path/to/checkpoint"
5video_path = "data/example_video.mp4"
6prompt = "Describe this video."
7
8
9def load_model(checkpoint: str):
10 processor = AutoProcessor.from_pretrained(
11 checkpoint,
12 trust_remote_code=True,
13 frame_extract_num_threads=1,
14 )
15 model = AutoModelForCausalLM.from_pretrained(
16 checkpoint,
17 trust_remote_code=True,
18 device_map="auto",
19 torch_dtype=torch.bfloat16,
20 attn_implementation="flash_attention_2",
21 )
22 return model, processor
23
24
25model, processor = load_model(checkpoint)
26
27text = model.offline_video_generate(
28 processor,
29 prompt=prompt,
30 video=video_path,
31 shortest_edge=4096,
32 longest_edge=16777216,
33 video_max_pixels=201326592,
34 patch_size=16,
35 temporal_patch_size=1,
36 merge_size=2,
37 video_fps=1.0,
38 min_frames=1,
39 max_frames=256,
40 num_extract_threads=4,
41 image_mean=[0.5, 0.5, 0.5],
42 image_std=[0.5, 0.5, 0.5],
43 max_new_tokens=256,
44 temperature=1.0,
45 top_k=50,
46 top_p=1.0,
47 repetition_penalty=1.0,
48 do_sample=False,
49 vision_chunked_length=64,
50)
51
52print(text)1import torch
2from transformers import AutoModelForCausalLM, AutoProcessor
3
4checkpoint = "path/to/checkpoint"
5processor = AutoProcessor.from_pretrained(
6 checkpoint,
7 trust_remote_code=True,
8 frame_extract_num_threads=1,
9)
10model = AutoModelForCausalLM.from_pretrained(
11 checkpoint,
12 trust_remote_code=True,
13 device_map="auto",
14 torch_dtype=torch.bfloat16,
15 attn_implementation="flash_attention_2",
16)
17
18queries = [
19 {
20 "prompt": "Describe sample A.",
21 "images": [],
22 "videos": ["data/sample_a.mp4"],
23 "media_kwargs": {"video_fps": 1.0, "min_frames": 8, "max_frames": 256},
24 "generate_kwargs": {
25 "temperature": 1.0,
26 "top_k": 50,
27 "top_p": 1.0,
28 "max_new_tokens": 256,
29 "repetition_penalty": 1.0,
30 "do_sample": False,
31 },
32 },
33 {
34 "prompt": "Describe sample B.",
35 "images": [],
36 "videos": ["data/sample_b.mp4"],
37 "media_kwargs": {"video_fps": 1.0, "min_frames": 8, "max_frames": 256},
38 "generate_kwargs": {
39 "temperature": 1.0,
40 "top_k": 50,
41 "top_p": 1.0,
42 "max_new_tokens": 256,
43 "repetition_penalty": 1.0,
44 "do_sample": False,
45 },
46 },
47]
48
49with torch.no_grad():
50 result = model.offline_batch_generate(processor, queries, vision_chunked_length=64)
51
52texts = [item["text"] for item in result["results"]][!NOTE] We welcome community feedback and contributions on any of these directions.
1@misc{mossvl,
2 title = {MOSS-VL Technical Report},
3 author = {Wang, Pengyu and Tan, Chenkun and Zhou, Shaojun and Zhou, Qirui and Chen, Yanxin and He, Xingyang and Zeng, Huazheng and Cheng, Jijun and Wang, Chenghao and Qian, Xiaomeng and Wang, Pengfei and Huang, Zhan and Gao, Shanqing and Huang, Wei and Cao, Longjun and Ran, Wu and Liu, Jie and Zhu, Changtai and Wang, Hongkai and Tian, Yixian and Liu, Chenghao and Ye, Zhen and Wang, Xinghao and Jiang, Botian and Feng, Guoguo and Fei, Zhaoye and Li, Ruixiao and Chen, Mingshu and Gao, Yang and Cheng, Qinyuan and Li, Shimin and Qiu, Xipeng},
4 year = {2026},
5 eprint = {2608.15045},
6 archivePrefix = {arXiv},
7 primaryClass = {cs.CV},
8 url = {https://arxiv.org/abs/2608.15045}
9}
10
11@misc{mossvideopreview,
12 title = {{MOSS-Video-Preview: Toward Real-Time Video Understanding via Cross-Attention}},
13 author = {Pengyu Wang and Chenkun Tan and Shaojun Zhou and Wei Huang and Qirui Zhou and Zhan Huang and Zhen Ye and Jijun Cheng and Xiaomeng Qian and Yanxin Chen and Xingyang He and Huazheng Zeng and Chenghao Wang and Pengfei Wang and Hongkai Wang and Shanqing Gao and Yixian Tian and Chenghao Liu and Xinghao Wang and Botian Jiang and Xipeng Qiu},
14 year = {2026},
15 eprint = {2606.07639},
16 archivePrefix = {arXiv},
17 primaryClass = {cs.CV},
18 url = {https://arxiv.org/abs/2606.07639}
19}