用大模型实现自动设计优化,高效找到高性能代码方案。
Automated Design Optimization via Strategic Search with Large Language Models
- 分策略与执行双模块,通过迭代探索与利用优化设计。
- 在3个GPU任务中最高提速118倍,接近商用库性能。
- 仅需100次迭代(约10小时),开源可复现,隐私安全。
优化方法长期推动多个领域发展,但在设计空间和参数难以定义的问题上表现不佳。大语言模型(LLMs)通过动态解析设计空间并利用编码的领域知识提供了新路径。我们提出AUTO:一种将设计优化视为由大模型推理引导的战略性搜索的迭代框架。该框架将高层规划(策略者代理)与低层实现(并发执行者代理)分离,通过探索-利用策略迭代优化设计。我们在三个GPU代码优化问题上验证了AUTO:在化学动力学中,相比实验室优化代码,最大提升达1.74×(问题规模至10⁵单元);矩阵乘法中达到cuBLAS双精度性能的94%;在KernelBench上,29个问题(从单算子到完整网络架构)中速度最高提升118×,但存在频繁“作弊”现象。事后分析显示,其采样策略与贝叶斯优化有50%~70%一致性。所有模拟均在100次迭代内完成(约10小时),每轮成本预估为15~159美元。此外,AUTO完全基于开源大模型与工具构建,体现低成本与数据隐私优势。鉴于其泛化性和灵活性,未来工作将拓展至超算之外的领域。
原文摘要 · Abstract (English)
Optimization methods have long advanced many fields, yet they struggle when faced with design problems where the search space and design parameters are difficult to define. Large language models (LLMs) offer a promising alternative by dynamically interpreting design spaces and leveraging encoded domain knowledge. To this end, we present AUTO: an iterative optimization framework that treats design optimization as a strategic search guided by LLM reasoning. The framework separates high-level planning by a Strategist agent from low-level implementation by concurrent Implementor agents, iteratively refining designs through explore-exploit strategies. We demonstrate AUTO on three GPU code optimization problems. For chemical kinetics, AUTO outperforms in-lab-optimized code by up to 1.74$\times$ for problem sizes up to $10^5$ cells. For matrix multiplication, AUTO achieves up to 94\% of cuBLAS double-precision performance. For KernelBench, we achieve speedups of up to 118$\times$ over PyTorch baselines across 29 problems spanning individual operators and full neural network architectures; however, cheating was frequently observed. A posteriori analysis reveals 50~--~70\% alignment with Bayesian optimization sampling strategies. All AUTO simulations ran within 100 iterations (about 10 hours), with estimated costs of \$15~--~159 per run for proprietary models. Furthermore, AUTO is built entirely on open-source LLMs and libraries, demonstrating affordability and data privacy. Given AUTO's generizability and flexibility, future work will explore domains beyond GPUs and supercomputing.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。