在进行网格搜索之前先思考:大语言模型服务的楼层优先分类法
Think Before You Grid-Search: Floor-First Triage for LLM Serving
AI总结:
研究大语言模型服务优化,提出楼层优先分类法,基于残差构建五维资源向量,通过墙排序比较部署方案,以案例分析模型在特定GPU上的情况,揭示布局判断与操作点的关系及不同布局差异的原因。
摘要:
大语言模型服务优化通常会对许多配置进行基准测试,当未达到延迟目标时会使用重型分析器。我们主张相反的原则:估计是分析层的分析——没有它,优化就会退化为网格搜索。楼层优先是一种基于残差的分类工作流程。每个解码步骤被建模为一个五维资源向量(HBM字节、FLOP、网络字节、网络消息、KV容量);在资源内求和并跨资源最大化得到一个乐观下限,普通求和得到一个悲观下限。测量值落在这个[最大值,总和]区间内时,在打开任何分析器之前读取重叠质量,只有当残差高于设定阈值时分析器才升级。通过墙排序比较部署方案——随着负载增加,哪个资源墙首先起约束作用——而不是通过点基准测试。该计算是组合性的:新的注意力或状态空间变体通过声明一个模块进入,工作流程作为一个零依赖计算器和一个在智能体优化循环中执行该原则的智能体技能交付。作为案例研究,我们在16个英伟达H20 GPU上分析了一个类似DeepSeek-V3.2风格的671B MoE/MLA模型,其约74 FLOP/字节的脊点(相比H100约590)使其成为一个极端面向解码的部分。下限表明TP16解码受KV容量限制,约为70个并发8K请求;稀疏注意力消除了KV带宽项但没有消除容量墙;EP16+DP注意力布局接受稍差的同批权重流量以获得高一个数量级的容量墙(约644)——而单流延迟使TP更具优势2.4倍。因此,布局判断是操作点的可计算函数,解释了相同硬件上的生产部署为何采用相反的注意力布局。
英文摘要:
LLM serving optimization typically benchmarks many configurations and reaches for heavy profilers when latency targets are missed. We argue for the reverse discipline: estimation is the analytical layer of profiling -- without it, optimization degenerates to grid search. Floor First is a residual-driven triage workflow. Each decode step is modeled as a five-dimensional resource vector (HBM bytes, FLOPs, network bytes, network messages, KV capacity); summing within a resource and maximizing across resources gives an optimistic floor, the plain sum a pessimistic one. Where a measurement lands inside this [max, sum] interval reads out overlap quality before any profiler is opened, and profilers escalate only on residuals above a stated threshold. Deployment alternatives are compared by wall ordering -- which resource wall binds first as load grows -- rather than by point benchmarks. The account is compositional: new attention or state-space variants enter by declaring one module, and the workflow ships as a zero-dependency calculator plus an agent skill that enforces the discipline in agentic optimization loops. As a case study we analyze a DeepSeek-V3.2-style 671B MoE/MLA model on 16 NVIDIA H20 GPUs, whose ridge point of ~74 FLOP/byte (vs ~590 for H100) makes it an extreme decode-oriented part. The floors show TP16 decoding is KV-capacity-limited to ~70 concurrent 8K requests; sparse attention removes the KV-bandwidth term but not the capacity wall; an EP16+DP-attention layout accepts slightly worse same-batch weight traffic for an order-of-magnitude higher capacity wall (~644) -- while single-stream latency favors TP by 2.4x. The layout judgment is thus a computable function of the operating point, explaining why production deployments on identical hardware have shipped opposite attention layouts.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。