[论文解读] TaxBreak: Unmasking the Hidden Costs of LLM Inference Through Overhead Decomposition
TaxBreak 提出了一种基于跟踪的方法,将主机可见的 LLM 推理开销分解为框架翻译、CUDA 库翻译以及内核启动成本,并引入 Host–Device Balance Index (HDBI) 来诊断主机与设备绑定的工作负载。
Large Language Model (LLM) inference is widely used in interactive assistants and agentic systems. In latency-sensitive deployments, inference time can become dominated by host-side overheads. Existing approaches typically expose this cost only as an aggregate residual or a launch/queue metric, which is often insufficient to identify which execution layer should be optimized. This work presents TaxBreak, a trace-driven methodology for decomposing host-visible orchestration overhead into three components: framework translation time, CUDA library translation time, and kernel launch-path time. We validate TaxBreak on NVIDIA H100 and H200 systems and use it to derive our proposed Host-Device Balance Index (HDBI), a boundedness summary index that relates device-active execution to host-visible orchestration. Across representative dense and mixture-of-experts workloads in both prefill and decode, we show that aggregate latency, GPU inactivity, or boundedness ratios alone can obscure the dominant optimization target. TaxBreak instead distinguishes cases where optimization should reduce software-stack overhead from cases where the primary win comes from reducing device-side work. We further show that MoE models dispatch 8-11x more kernels per output token than dense models, and that for such host-bound workloads, CPU single-thread performance is a first-order parameter: a faster host CPU reduces orchestration overhead by 10-29% and improves end-to-end latency by up to 14%, even when paired with a slower-clocked GPU. These results position TaxBreak as a diagnostic tool for assessing whether optimization effort should target the software stack or the device-side workload execution.
研究动机与目标
- 动机:说明需要将 LLM 推理的低效归因于主机端抽象层和执行阶段。
- 提出按层解耦的主机开销分解,将其分为三部分:框架翻译、CUDA 库翻译和内核启动成本。
- 引入 Host–Device Balance Index (HDBI) 以量化 CPU–GPU 的绑定程度并指导优化重点。
- 在 NVIDIA H100/H200 平台上对密集/专家混合(Mixture-of-Experts, MoE)工作负载在 prefill 与 decode 阶段进行验证。
- 证明聚合指标可能掩盖主要的优化目标,CPU 性能对端到端延迟具有实质性影响。
提出的方法
- 将每个内核的主机端延迟分解为三个项:DeltaFT(框架翻译)、DeltaCT(CUDA 库对库驱动内核的翻译)、DeltaKT(硬件底座的内核启动成本)。
- 采用两阶段流水线进行测量:阶段 1 全模型跟踪以构建内核数据库;阶段 2 在无内核底座的情况下进行独立重放以分离调度和启动开销。
- 将内核分为库驱动型(I_lib = 1)或框架原生型(I_lib = 0),以区分 DeltaCT 与 DeltaFT 的归因。
- 计算 Host–Device Balance Index:HDBI = T_DeviceActive / (T_DeviceActive + T_Orchestration),以指示主机端 vs 设备端的调度平衡状态。
- 提供一个内核家族分类法以及将重放内核与跟踪内核匹配的程序(精确匹配、子字符串匹配、最常见匹配)。
- 在两台 NVIDIA 平台(H100 和 H200)以及密集和 MoE 工作负载下,比较 prefill 与 decode 阶段。
实验结果
研究问题
- RQ1如何将主机端 LLM 推理开销分解为框架翻译、CUDA 库前端以及内核启动路径?
- RQ2Host–Device Balance Index 是否能可靠指示优化应针对软件栈还是设备端执行?
- RQ3在 prefill 与 decode 过程中,密集模型与 MoE LLM 在内核碎片化以及主机绑定 vs 设备绑定行为方面有何差异?
- RQ4CPU 单线程性能对主机编排和端到端延迟有何影响?
- RQ5阶段特定的测量能否揭示超越粗粒度 GPU 利用率的优化目标(如内核融合、CUDA 图、运行时编译等)?
主要发现
- TaxBreak 实现了对主机开销的三阶段分解:框架翻译、CUDA 库翻译以及内核启动底座成本。
- Mixture-of-Experts 模型在相同活动参数量下向每个输出标记调度 8–11 倍以上的内核数量,导致更高的主机开销。
- 更快的 CPU 单线程性能可将主机编排开销降低 10–29%,并将端到端延迟提高最多 14%,即使 GPU 时钟较慢。
- HDBI 提供了一个界定性摘要,明确应降低软件栈开销还是设备端工作量,区分主机绑定与设备绑定的情形。
- 在 H200 上的 GPT-2 实验中,TaxBreak 显示主机编排在批大小变化时基本维持平坦,而设备端工作量驱动延迟增加,说明 HDBI 相较于聚合的启动指标具有实用性。
- 在密集和 MoE 工作负载以及 prefill 与 decode 的对比中,聚合指标本身可能掩盖主导的优化目标,强调需要跨栈归因。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。