Optimizing PyTorch Inference with LLM-Based Multi-Agent Systems

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Nagaitsev, Kirill, Grbcic, Luka, Williams, Samuel, Iancu, Costin
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913125117198336
author Nagaitsev, Kirill
Grbcic, Luka
Williams, Samuel
Iancu, Costin
author_facet Nagaitsev, Kirill
Grbcic, Luka
Williams, Samuel
Iancu, Costin
contents 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
format Preprint
id arxiv_https___arxiv_org_abs_2511_16964
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Optimizing PyTorch Inference with LLM-Based Multi-Agent Systems
Nagaitsev, Kirill
Grbcic, Luka
Williams, Samuel
Iancu, Costin
Multiagent Systems
Artificial Intelligence
Distributed, Parallel, and Cluster Computing
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
title Optimizing PyTorch Inference with LLM-Based Multi-Agent Systems
topic Multiagent Systems
Artificial Intelligence
Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2511.16964