通过模态级拆分,用低成本显卡组合实现多模态大模型高效推理。
Cost-Efficient Multimodal LLM Inference via Cross-Tier GPU Heterogeneity
- 在视觉编码与语言生成间做模态级拆分,大幅降低跨设备传输量。
- 实测在相同硬件下吞吐提升54%,成本节省达37%。
- 适合预算有限但需高性价比多模态推理的部署场景。
多模态大语言模型推理分为计算密集型的视觉编码和内存带宽敏感的语言生成两个阶段。研究发现,在标准Transformer KV缓存机制下,以模态边界作为分割点能最小化跨设备数据传输,相比传统阶段级拆分将传输量从$O(L * s_ctx)$字节(GB级KV缓存)降至$O(N_v * d)$字节(MB级嵌入),实现$O(L)$量级压缩,该优势在不同注意力机制、动态视觉分辨率及模型规模下均成立,且随模型加深而增强。传统阶段级拆分依赖高带宽互联(如NVLink),而模态级拆分可支持异构硬件通过通用PCIe连接。闭式成本模型预测可节省31.4%成本,实测达40.6%。构建了HeteroServe运行时系统,支持模态级分割与跨层级调度,在LLaVA-1.5-7B和Qwen2.5-VL上评估,4xA100环境下吞吐最高提升54%;固定预算下,异构集群($38k)的每美元生成词数比同规模同价均质集群($64k)高出37%且延迟无恶化。
原文摘要 · Abstract (English)
Multimodal large language model (MLLM) inference splits into two phases with opposing hardware demands: vision encoding is compute-bound, while language generation is memory-bandwidth-bound. We show that under standard transformer KV caching, the modality boundary (between vision encoder and language model) minimizes cross-device transfer among all partition points that preserve standard stage-based execution. Partitioning here reduces transfer complexity from $O(L * s_ctx)$ bytes (GB-scale KV caches under stage-level disaggregation) to $O(N_v * d)$ bytes (MB-scale embeddings), an O(L) reduction where L is the transformer depth. The result holds across attention mechanisms (MHA/GQA), dynamic vision resolutions, and model scales, and the advantage grows as models deepen. A direct implication is that existing stage-level disaggregation systems are constrained to high-bandwidth interconnects (e.g., NVLink), whereas modality-level disaggregation enables cross-tier heterogeneous serving over commodity PCIe. A closed-form cost model shows that heterogeneous deployment is cost-optimal under phase-separable workloads (predicts 31.4% savings; observed 40.6%). We build HeteroServe, a phase-aware runtime with modality-level partitioning and cross-tier scheduling, and evaluate it on LLaVA-1.5-7B and Qwen2.5-VL against vLLM v0.3.0. On identical 4xA100 hardware, engine optimizations raise throughput by up to 54%. Under a fixed budget, a heterogeneous cluster (\$38k) improves Tokens/\$ by 37% over a homogeneous baseline (\$64k) without degrading latency.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。