LoKA:大规模推荐模型中的低精度核应用
LoKA: Low-precision Kernel Applications for Recommendation Models At Scale
AI总结:
LoKA通过三个原则实现低精度计算在大规模推荐模型中的应用,包括在真实分布下评估安全区域、与硬件协同设计提升效率、以及跨核库调度最大化收益。
摘要:
近年来,新一代GPU通过更低精度的算术(如FP8)显著提高了FLOPs,尽管在大语言模型(LLMs)中成功应用,但在大规模推荐模型(LRMs)中的采用却受到限制。这是因为LRMs对数值敏感,主要由小矩阵乘法(GEMMs)后接归一化操作构成,并在通信密集型环境中训练。直接将FP8应用于LRMs通常会降低模型质量并延长训练时间。这些挑战是LRM工作负载的固有属性,不能仅通过引入更好的FP8内核来解决。相反,需要一种系统-模型协同设计方法来成功集成FP8。我们提出了LoKA(低精度核应用),通过三个原则使FP8在LRMs中变得实用:在真实分布下进行评估以了解低精度的安全区域,与硬件协同设计以扩展安全区域,以及跨核库调度以最大化收益。具体而言,LoKA Probe是一种基于统计的在线基准测试方法,学习激活和权重统计,并量化每层误差。此过程确定了FP8应用的安全和不安全、快速和缓慢的区域。LoKA Mods是一组可重用的模型调整,通过FP8提高数值稳定性和执行效率。LoKA Dispatch是一种运行时,利用LoKA Probe的统计洞察来选择满足精度要求的最快FP8内核。
英文摘要:
Recent GPU generations deliver significantly higher FLOPs using lower-precision arithmetic, such as FP8. While successfully applied to large language models (LLMs), its adoption in large recommendation models (LRMs) has been limited. This is because LRMs are numerically sensitive, dominated by small matrix multiplications (GEMMs) followed by normalization, and trained in communication-intensive environments. Applying FP8 directly to LRMs often degrades model quality and prolongs training time. These challenges are inherent to LRM workloads and cannot be resolved merely by introducing better FP8 kernels. Instead, a system-model co-design approach is needed to successfully integrate FP8. We present LoKA (Low-precision Kernel Applications), a framework that makes FP8 practical for LRMs through three principles: profile under realistic distributions to know where low precision is safe, co-design model components with hardware to expand where it is safe, and orchestrate across kernel libraries to maximize the gains. Concretely, LoKA Probe is a statistically grounded, online benchmarking method that learns activation and weight statistics, and quantifies per-layer errors. This process pinpoints safe and unsafe, fast and slow sites for FP8 adoption. LoKA Mods is a set of reusable model adaptations that improve both numerical stability and execution efficiency with FP8. LoKA Dispatch is a runtime that leverages the statistical insights from LoKA Probe to select the fastest FP8 kernel that satisfies the accuracy requirements.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。