Selective state space models (SSMs) have rapidly become a compelling backbone for large language models, especially for long-context workloads. Yet in deployment, their inference performance is often bounded by the memory capacity, bandwidth, and latency limits of a single GPU, making multi-GPU execution increasingly necessary. Although tensor parallelism (TP) is widely used to scale Transformer inference, applying it to selective SSM blocks is non-trivial because the SSM mixer couples large projections with a sequence-wise recurrent state update and local mixing whose efficiency depends on preserving locality and avoiding synchronization in the critical path. This paper presents a communication-efficient TP design for selective SSM inference that addresses three practical engineering challenges: enabling TTFT improvements via an SSM state cache across prefill and decode, partitioning the mixer's packed parameter tensor so that recurrent updates remain local while minimizing communication, and reducing TP aggregation overhead with quantized AllReduce. We evaluate on three representative SSM-based LLMs spanning pure-SSM and hybrid architectures - Mamba, Falcon-Mamba, and Zamba - on NVIDIA A6000 and A100 clusters. Our experiments show substantial throughput gains from tensor-parallel SSM inference, improving batch-request throughput by ~1.6-2.1x on 2 GPUs and ~2.6-4.0x on 4 GPUs for Mamba, with the largest benefits at long context lengths, and achieving a further ~10-18% throughput improvement from quantized all-reduce by lowering synchronization bandwidth overhead.


翻译:选择性状态空间模型(SSMs)已迅速成为大型语言模型的有力骨干架构,尤其在长上下文任务中表现突出。然而在实际部署中,其推理性能往往受限于单个GPU的内存容量、带宽和延迟,使得多GPU执行变得日益必要。尽管张量并行(TP)已广泛用于扩展Transformer推理,但将其应用于选择性SSM模块却非易事,因为SSM混合器将大规模投影与序列级递归状态更新及局部混合相耦合,其效率依赖于保持数据局部性并避免关键路径中的同步。本文提出了一种通信高效的TP设计方案用于选择性SSM推理,解决了三个实际工程挑战:通过跨预填充和解码阶段的SSM状态缓存实现首词元时间优化;对混合器的打包参数张量进行分区,使递归更新保持局部性同时最小化通信;以及通过量化AllReduce降低TP聚合开销。我们在NVIDIA A6000和A100集群上评估了三种代表性基于SSM的LLM(涵盖纯SSM与混合架构)——Mamba、Falcon-Mamba和Zamba。实验表明张量并行SSM推理带来显著的吞吐量提升:对于Mamba模型,在2GPU上实现约1.6-2.1倍、4GPU上约2.6-4.0倍的批处理请求吞吐量增长,且长上下文场景收益最大;通过量化全归约降低同步带宽开销,可进一步获得约10-18%的吞吐量提升。

0
下载
关闭预览

相关内容

非Transformer不可?最新《状态空间模型(SSM)》综述
专知会员服务
75+阅读 · 2024年4月16日
使用多模态语言模型生成图像
专知会员服务
32+阅读 · 2023年8月23日
专家报告|深度学习+图像多模态融合
中国图象图形学报
12+阅读 · 2019年10月23日
专访俞栋:多模态是迈向通用人工智能的重要方向
AI科技评论
26+阅读 · 2019年9月9日
人工智能顶刊TPAMI2019最新《多模态机器学习综述》
人工智能学家
29+阅读 · 2019年1月19日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
技术、多域威慑与海上战争(报告)
专知会员服务
3+阅读 · 今天15:04
“在云端防御”:提升北约数据韧性(报告)
专知会员服务
2+阅读 · 今天14:54
人工智能及其在海军行动中的整合(综述)
专知会员服务
2+阅读 · 今天14:07
美军MAVEN项目全面解析:算法战架构
专知会员服务
16+阅读 · 今天8:36
从俄乌战场看“马赛克战”(万字长文)
专知会员服务
10+阅读 · 今天8:19
相关基金
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员