arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.01935cs.LGcs.AIcs.PL
收藏

LiteCoOp: 轻量级多语言模型共享树推理用于模型服务编译器优化

MOSAIC: More LLMs, Less Cost through Collaborative Reasoning for Compiler Optimizations

A lternative C omputing T echnologies ( ACT ) Lab(替代计算技术实验室);University of California San Diego(加州大学圣地亚哥分校)

Annabelle Sujun Tang, Christopher Priebe, Lianhui Qin, Hadi Esmaeilzadeh

AI总结:

本文提出LiteCoOp,一种轻量级框架,通过将优化搜索树本身作为多语言模型协作机制,实现编译器优化过程中异构语言模型的协作,从而在降低编译成本的同时提升性能。

摘要:

LLM引导的编译器优化最近展现出潜力,但现有方法依赖于整个搜索过程中单一大型语言模型,使其昂贵且排除了较小模型。我们提出了研究问题:异构语言模型是否可以在编译器优化过程中协作,同时在编译成本低于由单一大型语言模型引导的优化时减少成本。关键的是,这必须在不引入代理框架的开销的情况下实现,这会与降低编译成本的目标相悖。为实现这些竞争目标,我们引入了LiteCoOp,一种轻量级框架,将优化搜索树本身作为多语言模型协作的机制,使异构模型能够共享进展而无需外部代理协调。在每个优化步骤中,LiteCoOp查询一个语言模型以提出编译器转换并选择下一步查询的语言模型。这些语言模型的提案被记录在共享的MCTS树中,因此所有模型依次被调用,但彼此的决策相互影响。共享的MCTS回传奖励,使一个模型的进步影响其他模型后续的决策。这使得MCTS树本身成为协作推理的机制,避免了模型间通信、重载推理轨迹或代理基础设施。我们通过LLM-aware UCT将这一想法实例化,该方法倾向于较小的语言模型以减少成本,同时保持编译器性能目标。在多样化的GPU和(CPU)基准测试中,LiteCoOp在单模型基线上持续表现优异,当将协作扩展到八个异构语言模型时,其最佳结果取得。八模型配置将总编译时间减少1.95x(1.74x),减少API成本4.47x(4.32x),并且只在总调用中调用最大模型的23.1%(23.9%),并展示了协作的可扩展性。

英文摘要:

LLM-guided compiler optimization has recently shown promise. However, current LLM-guided optimizers query a single LLM at every search step, so their cost grows with both that model's price and the search budget. A smaller model is cheaper but degrades the search: in our experiments, a recent single-LLM optimizer reaches 10.2% (6.0%) lower speedup on GPU (CPU) with gpt-5-mini than with GPT-5.2. Agentic multi-LLM frameworks add controllers, concurrent calls, and shared memory, whose overhead can offset the savings of cheaper models. This paper shows that the optimization search tree itself can coordinate heterogeneous LLMs: the tree already records which proposals improved the program, and we can augment the tree to record which model made them. That evidence can then be used to decide which model should propose next. To this end, we introduce MOSAIC, in which each Monte Carlo tree search (MCTS) node records a program and the LLM that expands it, and the active LLM proposes both a compiler transformation and the LLM for the next step. We also contribute an LLM-aware UCT that favors smaller models and a course-alteration rule that invokes the largest model only after repeated small-model regressions. Against that single-LLM optimizer run with GPT-5.2 alone and the same number of search iterations and tree parameters, on an NVIDIA GPU (Intel CPU), MOSAIC with eight LLMs improves the geometric-mean speedup on five kernels by 7.2% (14.4%) and the end-to-end Llama-3-8B speedup by 1.61x (1.41x), while reducing kernel compilation time by 1.95x (1.74x) and API cost by 4.47x (4.32x), with GPT-5.2 making only 23.1% (23.9%) of LLM calls. With the same eight models, random or round-robin model choice improves over the single-LLM baseline by only 2.5% on CPU, showing that the gains come from letting the LLMs choose the next model rather than from mixing the pool at random.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑