高带宽内存(HBM)一直是推动 AI 革命的关键技术。尽管 HBM 相对于其他形式的内存成本高昂,芯片设计者仍不断在 AI 加速器中封装越来越多的 HBM。客户一方面推动在设计中采用更新一代的 HBM,另一方面又通过增加更多内存立方体(cube)、采用更密集和更高的堆叠来提升每个 XPU 的容量。这导致 HBM 消耗的 DRAM 晶圆产能占比越来越高,最终造成了我们今天所面临的严重 DRAM 短缺。
虽然不同的 AI 工作负载对容量和带宽都有需求,但根据工作负载的不同,侧重点会有所倾斜,有的更看重带宽,有的更看重容量。我们可以将 AI 计算分为三大类:预训练计算、后训练/强化学习计算、推理计算。强化学习与推理非常相似,因此需要类似的架构。在这三类中,推理解码主要受带宽制约:每生成一个 token,都需要读取所有活跃的模型参数,以及存储在内存中的用户 KVCache。强化学习(因其类似推理)同样偏向于受带宽制约,但由于注重大批量处理,它比推理需要更大的容量。与此同时,预训练对容量要敏感得多,因为在一次训练过程中,HBM 不仅要存储权重,还要存储梯度和激活值,而不像推理前向传播那样只需存储权重和用户的 KV。
We use a Rubin Ultra NVL576 system as this will be a more representative scale up world size in the HBM4E era. We assume the HBM is HBM4E with 13Gbps speeds. 4-hi, 8-hi, and 12-hi means 128GB, 256GB, and 384GB per GPU respectively. For Kimi K3 on this NVL576 system, each GPU holds 16.8GB of weights which is 2.1GB per HBM stack. We can see that at a minimum SLA of 105 tok/s/user, 12-hi HBM doesn’t deliver more throughput than 8-hi HBM. Then when the interactivity is doubled further to 213 tok/s/user, there is no benefit to having taller than 4-hi stacks. In terms of maximum throughput benefits, 8-hi provides an 8% increase in maximum total tokens/s vs 4-hi while 12-hi provides a 10% improvement. However, again stepping down to the maximum throughput that 4-hi can deliver allows for more than double the interactivity. We also reiterate that in reality, as not all of the raw memory bandwidth can be utilized, actual results will shift these curves to the left, meaning that the higher capacity breakeven interactivity points are lower and could push into the speeds that users find unacceptably low.
Source: SemiAnalysis, Moonshot
We can see that while more capacity can deliver marginally more token throughput for these models (putting aside the benefit of faster tokens). The question then becomes, is that additional throughput worth the additional BOM cost associated with more memory. HBM is a significant part of accelerator BOM cost, and with HBM so tight, the cost per GB will rise dramatically next year.
When taking into account costs, we model the BOM cost increase the end owner pays relative to a baseline HBM4E 4-hi based Rubin Ultra for the Rubin Ultra NVL576 system. The all-in system cost increase (which we proxy as TCO as all-in system cost makes up the vast majority of TCO) of 8-Hi is 12.1% relative to a base 4-hi system and for 12-hi it becomes a 26.3% premium. We can then compare the increase in token throughput relative to the cost increase at different points on minimum interactivity to show whether more memory can deliver lower cost per token at any of those points.
Source: SemiAnalysis
Overall we see that the increase in throughput provided by 12-hi or 8-hi HBM comes in below the increased system cost associated with more memory, meaning at these memory prices (along with Nvidia’s margin stack), 12-Hi and 8-Hi HBM result in higher cost per token than 4-hi HBM. This comes before we even take into account more HBM conserving techniques, namely KVCache offloading to lower tiers of memory. This next section will show an actual production run we performed to show how lower memory impacts actual throughput.
A Real Experiment: KVCache Offloading Relieves Capacity Pressure
在模型权重能够容纳的前提下,虽然削减 HBM 容量会减少可存储的 KVCache,但第二层 DRAM 可以用来存储那些不那么“热”、但又需要即时检索的 KVCache。这种方式在智能体(agentic)工作负载中正变得越来越普遍:这类工作负载的上下文长度非常高,给 HBM 容量带来很大压力,同时轮次之间又存在较长的停顿,因此把 KVCache 驱逐到 DRAM 甚至存储设备上,比完全重新计算更加划算。在我们近期的 AgentX 基准测试中,许多工作负载的帕累托最优结果,都是在并发度超过一定阈值后通过 KVCache 卸载(offloading)获得的。
最优的硬件架构,就是能在稀缺资源下实现最大产出的架构。在构建 AI 基础设施方面,我们正面临诸多短缺。电力是其中的关键之一,这就是为什么优化 tokens/W(每瓦特令牌数)如此重要——它是推理服务商和硬件架构师努力优化的核心指标。当然,资金也是有限的资源,因此性能/TCO(总拥有成本)一直是驱动硬件决策的经久不变的评价标准。
与 8-hi 相比,采用 4-hi 后可获取的 HBM 堆叠块(cube)数量可能超过两倍。但这些堆叠块只有与加速器共同封装并装入系统才有价值。这意味着瓶颈将从 HBM 晶圆转移到供应链的其他环节,例如逻辑晶圆(既包括加速器,也包括 HBM 的基础裸片)、基板、PCB、下游集成产能,以及介于其间的许多其他组件。此外,别忘了部署更多系统还需要大量电力。不过总体而言,我们相信未来几年供应链其他环节的产能扩张速度能够超过 DRAM 供应。即使 AI 服务器供应链无法满足两倍 HBM 堆叠块所需的相关供应,这也会为传统 DRAM 释放出晶圆产能,去服务那些因 HBM 挤占整体 DRAM 供应而陷入内存短缺的其他应用。首先想到的就是服务器 DRAM——为了充分利用有限的服务器 DRAM 供应,每个插槽的 DRAM 配置已被大幅削减。这也与支持智能体(agentic)工作负载密切相关,因为在这类负载中,大量时间实际上花在等待 CPU 相关的执行上,而不是等待 GPU 解码令牌。