通过基于LLM的多智能体系统优化PyTorch推理
Optimizing PyTorch Inference with LLM-Based Multi-Agent Systems
AI总结:
本文提出基于LLM的多智能体系统用于优化PyTorch推理,发现exploit策略与error-fixing智能体结合效果最佳,实现2.88倍速度提升。
摘要:
最大化现有GPU硬件性能是现代AI推理系统持续面临的挑战。传统方法包括编写定制GPU内核和使用专用模型编译器调整高级代码以适应特定GPU目标。最近的研究表明,基于LLM的多智能体系统能有效执行此类调优,通常优于现有编译器并消除手动内核开发的需要。然而,此类系统在该任务中的动态特性尚待探索。本文提出一个逻辑框架用于比较多智能体PyTorch优化系统。评估显示,exploit密集策略与error-fixing智能体结合效果最佳,性能与优化步骤的粒度相关。最佳实现可在H100 GPU上实现2.88倍的PyTorch Eager速度提升(1.85倍torch.compile),在KernelBench基准套件的多样化任务中表现优异。代码可在https://github.com/pike-project/pike公开获取。
英文摘要:
Maximizing performance on available GPU hardware is an ongoing challenge for modern AI inference systems. Traditional approaches include writing custom GPU kernels and using specialized model compilers to tune high-level code for specific GPU targets. Recent work shows that LLM-based multi-agent systems can effectively perform such tuning, often outperforming existing compilers and eliminating the need for manual kernel development. However, the dynamics of multi-agent systems for this task remain unexplored. In this work, we present a logical framework for comparing multi-agent PyTorch optimization systems. Our evaluation shows that exploit-heavy strategies perform best when paired with error-fixing agents, and that performance correlates with the granularity of optimization steps. The best implementation achieves an average 2.88x speedup over PyTorch Eager (1.85x over torch.compile) on an H100 GPU across diverse tasks in KernelBench, a benchmark suite covering a range of machine learning architectures in PyTorch. Code is publicly available at: https://github.com/pike-project/pike
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。