6 Inference and Deployment

本文为论文《LongCat-Flash-Omni 全模态技术报告》「论文原文」板块的对应章节,按 arXiv 官方全文逐字保留,层级与「中文全文翻译」板块一一对应。

6.1 Decoupled Framework

We propose a decoupled multimodal inference framework that separates modality-specific encoders/decoders and the LLM for optimized deployment. Each module is deployed on dedicated hardware and accelerators tailored to its computational characteristics, mitigating cross-modal resource contention. The optimizations of LLM deployment follow LongCat-Flash, including Prefill-Decode (PD) Disaggregation and Single Batch Overlap for ScMoE to improve inference efficiency. Compared with conventional hybrid deployment, this separation achieves lower latency and higher throughput despite minor communication overhead.

6.2 Asynchronous Streaming Pipeline

图

Figure 11: The asynchronous streaming pipeline for minimizing first packet latency.

We design a highly efficient asynchronous streaming pipeline for model serving. As shown in Figure 11, it consists of four sequentially linked and concurrently executed stages: VAD & Frame Sampling, Audio-Visual Encoding, LLM Prefilling & Decoding, and Audio Decoding. Each module supports incremental inference of streaming input and adaptive batching strategies, facilitating concurrent scheduling to reduce latency.

Sparse-Dense Sampling Strategy A voice activity detection (VAD) module is deployed to detect whether the user is speaking in real-time. When the user is speaking, densely sampled frames as well as the audio will be used as model input, facilitating a deeper analysis of the video content. Otherwise, only sparsely sampled frames are used to track the high-level overview of the video stream.

Speculative Prefill-Decode Switching Typically, the VAD model determines the end of a user turn by assessing whether the silence is longer than a predefined duration, referred to as the silent span $[t_{2},t_{4}]$. However, deferring the LLM state transition from prefill to decode until $t_{4}$ would incur substantial latency to the first packet. To overlap this latency with the latency of LLM decoding, we adopt a speculative prefill-decode switching strategy: The LLM starts decoding at an earlier speculative point $t_{3}$, reducing the latency from $t_{3}$ to $t_{4}$. If the user resumes speaking subsequently, a rollback is triggered, wherein the LLM’s generated content is discarded and the system reverts to the prefill state.

Audio Delivery and Interruption The audio will be delivered to the user once the VAD model explicitly detects the end of a turn, which is marked as $t_{4}$ in the figure, even if the first packet of audio response is generated earlier. However, should a user interrupt the audio generation at $t_{5}$, the process is immediately terminated. Consequently, the token sequence from the LLM is truncated at the nearest natural breakpoint, such as the most recent punctuation mark.

In our implementation, each request data packet from the user side consists of 1 second of audio and 2 corresponding video frames. Using the streaming prefill strategy, each request packet can be immediately prefilled, eliminating the need to wait until the user’s turn to finish before initiating computation. By overlapping the VAD endpoint detection ($600\sim 700ms$) and the prefill process, users can receive the model response within $100ms$ after the endpoint detection. This asynchronous pipeline enables real-time omni-modal interaction.