张量并行是什么?

张量并行是把模型权重按维度切分到多张加速卡上、让每张卡只保存并计算一部分的并行技术,核心是把矩阵运算横向拆开并在层内做归约以换取单卡显存下降,能力包括按行或按列切分权重、按注意力头切分、层内集合通信协同以及与低精度训练组合。它解决的是单卡装不下模型权重与激活的问题,并不解决跨机通信带宽不足的问题。

张量并行是把模型权重按维度切分到多张加速卡上、让每张卡只保存并计算一部分的并行技术,核心是把矩阵运算横向拆开并在层内做归约以换取单卡显存下降,能力包括按行或按列切分权重、按注意力头切分、层内集合通信协同以及与低精度训练组合。它解决的是单卡装不下模型权重与激活的问题,并不解决跨机通信带宽不足的问题。

张量并行的核心是用切分换显存,它可以帮助企业实现以下目标:

让单卡显存占用随切分规模下降。权重被平均分摊到多张卡上,模型规模的增长不再受限于单卡容量。

让训练与推理用同一套路径。大规模训练部署与在线推理服务复用同一套切分与通信实现,模型上线的迁移成本被压低。

让硬件互联优势被真正利用。在高速互联域内完成层内归约,切分带来的通信延迟被控制在可接受范围。

让大规模模型能真正跑起来。千亿参数级别的模型得以在集群上完成训练与部署,验证与推理服务具备可操作的前提,集群资源也能被充分盘活。

总之,张量并行可以帮助企业用多卡协同突破单卡容量瓶颈,把超大模型的训练与推理落地从理论可行变为工程可行,并保持训练与推理路径的一致以降低运维复杂度,同时需要按硬件拓扑精细选择切分比例,避免过细切分带来通信占比反升。

翻译

Tensor parallelism splits model weights along a dimension across several accelerator cards so that each card holds and computes only part of them. Its core is breaking matrix computation apart horizontally and reducing within a layer in exchange for lower per-card memory, with capabilities covering row and column weight splitting, splitting by attention head, in-layer collective communication and combination with low-precision training. It solves the problem of model weights and activations not fitting on a single card, but it does not solve the problem of insufficient interconnect bandwidth across machines.

At the heart of tensor parallelism is trading splitting for memory, which can help companies achieve the following:

Make per-card memory fall as the split scales. Weights are spread evenly over many cards, and growth in model size is no longer capped by the capacity of one card.

Let training and inference share one path. Large-scale training deployment and online inference reuse the same splitting and communication implementation, so the cost of moving a model into production falls.

Turn fast interconnect into real gains. In-layer reduction runs inside a high-speed interconnect domain, and the latency introduced by splitting is kept within an acceptable range.

Let very large models actually run. Models with hundreds of billions of parameters can be trained and served across a cluster, which is what makes validation and inference services a practical proposition.

In short, tensor parallelism can help enterprises break through the single-card capacity barrier with multi-card cooperation, turning the training and inference of very large models from theoretically possible into engineering reality, and keep training and inference on one path to reduce operational complexity, while choosing split ratios carefully for the hardware topology so that over-fine splitting does not let communication overhead grow instead.

💬 评论
🔗 本文链接

以专业为基,引领科技向善向新

Rooted in professionalism, we lead technology toward social good and innovation.

数智化转型网 · 了解更多产业资讯与选型数据 →

📰 你可能也喜欢

向量数据库 Milvus 行业百科

向量数据库 Milvus

向量数据库Milvus是面向亿级以上向量的近似最近邻(ANN)检索专用数据库系统,由Zilliz团队在2019年前后开源并持续演进。
📅 11-26 · 👁 2026年11月26日
智能体框架 LangGraph 行业百科

智能体框架 LangGraph

LangGraph是由LangChain团队在2024年开源的基于有向图(DirectedGraph)编排Agent状态、工具与流程的框架,作为LangChai…
📅 11-26 · 👁 2026年11月26日
思维树 行业百科

思维树

思维树(TreeofThoughts,ToT)是一种通过多路径探索与自我评估扩展大语言模型推理质量的提示策略,由Princeton与GoogleDeepMind…
📅 11-26 · 👁 2026年11月26日
DPO 行业百科

DPO

DPO(DirectPreferenceOptimization,直接偏好优化)是一种无需独立奖励模型、直接在偏好数据上对大语言模型做策略优化的训练方法,由St…
📅 11-26 · 👁 2026年11月26日
变革管理 行业百科

变革管理

变革管理(ChangeManagement)是一套在组织、文化与流程层面系统化推动变革落地的管理方法论,由哈佛大学KurtLewin、JohnKotter等学者…
📅 11-26 · 👁 2026年11月26日
低代码平台 Mendix 行业百科

低代码平台 Mendix

Mendix是面向企业级应用开发的可视化低代码平台,由Mendix公司在2005年前后推出,是低代码领域的早期代表项目之一,现为Siemens业务板块。
📅 11-26 · 👁 2026年11月26日