Views
No views yet


| Component | Format |
|---|---|
| 252 self-attention/MLP Linear layers in 36 non-cross language layers | compressed-tensors FP8 E4M3 weights with channel-wise static scales and per-token dynamic FP8 input activations |
| 12 cross-attention language layers | BF16 |
| Vision encoder and merger | BF16 |
Embeddings, norms and lm_head | BF16 |
| Transformers KV cache | HQQ INT8, group size 64, BF16 residual length 128 |
| Attention backend | FlashAttention 2 |
generation_config.json enables HQQ KV8 automatically. Load the checkpoint
directly and do not pass a second quantization configuration or replace its
generation config with the BF16 source file.
device_map="auto".1git clone https://github.com/OpenMOSS/MOSS-VL.git
2cd MOSS-VL
3
4conda create -n moss_vl_quant python=3.12 pip -y
5conda activate moss_vl_quant
6pip install -i https://pypi.org/simple --no-build-isolation -r requirements.txt
7pip install -i https://pypi.org/simple \
8 compressed-tensors==0.14.0.1 \
9 hqq==0.2.8.post1
10python -m pip check| Package | Version |
|---|---|
| Python | 3.12.8 |
| PyTorch | 2.8.0 + CUDA 12.8 |
| Transformers | 4.57.1 |
| Accelerate | 1.12.0 |
| FlashAttention | 2.8.1 |
| compressed-tensors | 0.14.0.1 |
| HQQ | 0.2.8.post1 |
PATH.1import torch
2from transformers import AutoModelForCausalLM, AutoProcessor
3
4checkpoint = "OpenMOSS-Team/MOSS-VL-Realtime-FP8"
5
6processor = AutoProcessor.from_pretrained(
7 checkpoint,
8 trust_remote_code=True,
9 frame_extract_num_threads=1,
10)
11model = AutoModelForCausalLM.from_pretrained(
12 checkpoint,
13 trust_remote_code=True,
14 device_map="auto",
15 torch_dtype=torch.bfloat16,
16 attn_implementation="flash_attention_2",
17)
18model.eval()1import time
2from PIL import Image
3
4session = model.create_realtime_session(
5 processor,
6 initial_prompt=(
7 "Describe important changes in the video as they happen. "
8 "Stay silent when there is no meaningful update."
9 ),
10 frame_queue_size=1,
11 max_tokens_per_turn=12,
12 max_new_tokens=4096,
13 do_sample=False,
14)
15
16frame_paths = [
17 "data/frame_0001.jpg",
18 "data/frame_0002.jpg",
19 "data/frame_0003.jpg",
20]
21
22try:
23 session.start()
24 for index, frame_path in enumerate(frame_paths):
25 image = Image.open(frame_path).convert("RGB")
26 session.push_frame(image, timestamp=float(index))
27 while True:
28 chunk = session.poll_output(timeout=0.0)
29 if chunk is None:
30 break
31 print(chunk, end="", flush=True)
32 time.sleep(1.0)
33finally:
34 session.close()<|silence|>, <|round_start|>,
and <|round_end|>; applications should filter or render them according to
their protocol.1source /inspire/qb-ilm/project/video-understanding/public/train/moss_vl_streaming/8B/quant/venv/bin/activate
2
3/inspire/qb-ilm/project/video-understanding/public/train/moss_vl_streaming/8B/quant/venv/bin/python \
4 /inspire/qb-ilm/project/video-understanding/public/train/moss_vl_streaming/8B/quant/benchmark_mossvl_quant.py \
5 --label streaming_fp8_reproduce \
6 --checkpoint /inspire/qb-ilm/project/video-understanding/public/train/moss_vl_streaming/8B/final_release/quant/MOSS-VL-0708-Streaming-FP8-Dynamic-KV8-HQQ \
7 --gpu 0 \
8 --frames 30 \
9 --attention-backend flash_attention_2 \
10 --timeout 300/inspire/qb-ilm/project/video-understanding/public/train/moss_vl_streaming/8B/quant/transformers_validation_20260811config.json: model and FP8 weight/activation configuration.generation_config.json: Transformers HQQ KV8 configuration.recipe.yaml: compressed-tensors quantization recipe.modeling_moss_vl.py: checkpoint-local streaming and quantized-cache code.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}