Shared Context, Separate Engines:边缘SoC上多模态大模型的有状态流式推理
Shared Context, Separate Engines: Stateful Streaming Inference for Multimodal LLMs on Edge SoCs
论文提出让一个引擎直接读取另一个引擎构建的KV历史来回答查询,使CPU与GPU可同时分别处理摄取与解码,并配合SDEP按各引擎持有的状态和排队任务决定预填充与解码位置。
论文给出跨CPU与GPU引擎共享KV状态、按状态调度预填充与解码的方法,并列出三类边缘SoC上的时延与吞吐数据。
arXiv:2610.35309v5 Announce Type: replace Abstract: Streaming multimodal large language models (MLLMs) must take in new video frames while answering questions about what they have already seen. On an edge SoC, if one engine does both, ingestion and answering compete for its time while the other engines sit idle. To take over a query, another engine must first import or rebuild the accumulated history, because each runtime keeps it as KV state in its own format. \name lets one engine answer from history that another engine built. Each query reads the history as it stood when the query was asked, so one engine can keep ingesting while another answers. The CPU and GPU can also decode answers to different queries simultaneously. Phase-level state continuation lets an engine prefill a query, pass its KV state to another engine for decoding, and return to ingestion. State-Driven Execution Planning (SDEP) chooses where each query is prefilled and decoded, based on the state each engine holds and the work queued on it. Across M4 Max, RK3588, and QCS6490, \name outperforms single-engine execution. On a live M4 Max stream, SDEP cuts p95 time to first token by $76\%$, and every query receives its first token within one second. Under backlog, it raises request throughput by up to $35\%$. For two concurrent video streams on RK3588, SDEP delivers $19.6\%$ higher request throughput than single-engine execution and $27.2\%$ more than running both engines in parallel without shared state. \name delivers up to $2.48\times$ the throughput of the same engines run serially. Every answer matches serial execution token for token.
来源:arXiv (AI + Vision + Imaging) · arxiv.org