LLM-guided compiler optimization has recently shown promise, but existing approaches rely on a single large LLM throughout search, making them expensive and excluding smaller models. We pose the research question: whether heterogeneous LLMs can collaborate during compiler optimization while reducing compilation cost below optimization guided by a single large LLM. Crucially, this must be achieved without introducing overhead from agentic frameworks, which would run counter to the goal of lower compilation cost. To achieve these competing objectives, we introduce LiteCoOp, a lightweight framework that turns the optimization search tree itself into the mechanism for multi-LLM collaboration, enabling heterogeneous models to share progress without external agentic coordination. At each optimization step, LiteCoOp queries one LLM to propose both a compiler transformation and select the LLM to query at the next step. These LLM proposals are recorded in a shared MCTS tree, so all models are invoked serially and yet are informed by each other's decisions. The shared MCTS backpropagates the rewards, allowing progress made by one model to influence later decisions by others. This makes the MCTS tree the collaborative reasoning mechanism itself, avoiding inter-model communication, heavy reasoning traces, or agentic infrastructure. We instantiate this idea with an LLM-aware UCT that biases model selection toward smaller LLMs to reduce cost while still preserving the compiler performance objective. Across diverse GPU and (CPU) benchmarks, LiteCoOp consistently outperforms single-model baselines, with the best results obtained when scaling collaboration to eight heterogeneous LLMs. This eight-model config reduces total compilation time by 1.95x (1.74x), reduces API cost by 4.47x (4.32x), and invokes the largest model for only 23.1% (23.9%) of total calls while demonstrating collaboration scalability.


翻译:LLM引导的编译器优化近期展现出潜力,但现有方法在整个搜索过程中依赖单一大型LLM,导致成本高昂且排除了较小模型。我们提出研究问题:异构LLM能否在编译器优化过程中协同工作,同时将编译成本降低至低于单一大型LLM引导的优化水平?关键挑战在于,必须在避免智能体框架引入额外开销的前提下实现这一目标——这类框架会违背降低编译成本的核心目标。为平衡这些相互矛盾的目标,我们提出LiteCoOp——一种轻量级框架,将优化搜索树本身转化为多LLM协作机制,使异构模型无需外部智能体协调即可共享进展。在每个优化步骤中,LiteCoOp仅查询一个LLM,由其同时提出编译器变换方案并选择下一步待查询的LLM。这些LLM提案被记录在共享的MCTS树中,使得所有模型串行调用却能相互获悉彼此的决策。共享MCTS通过反向传播奖励值,使某个模型的进展能够影响后续其他模型的决策。这使MCTS树本身成为协作推理机制,避免了模型间通信、繁重推理轨迹或智能体基础设施。我们通过一种LLM感知的UCT算法实现该思想,该算法在模型选择时偏向较小LLM以降低成本,同时保持编译器性能目标。在多样化GPU和CPU基准测试中,LiteCoOp始终优于单模型基线,当扩展至八种异构LLM协作时取得最佳结果。该八模型配置将总编译时间减少1.95倍(1.74倍),将API成本降低4.47倍(4.32倍),且最大模型的调用次数仅占总调用的23.1%(23.9%),展现了协作的可扩展性。

0
下载
关闭预览

相关内容

编译器(Compiler),是一种计算机程序,它会将用某种编程语言写成的源代码(原始语言),转换成另一种编程语言(目标语言)。
使用 Canal 实现数据异构
性能与架构
20+阅读 · 2019年3月4日
NLP通用模型诞生?一个模型搞定十大自然语言常见任务
人工智能头条
10+阅读 · 2018年6月29日
放弃 RNN/LSTM 吧,因为真的不好用!望周知~
人工智能头条
19+阅读 · 2018年4月24日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
VIP会员
最新内容
美海军陆战队将三型无人机整合入统一战场网络
专知会员服务
2+阅读 · 今天9:39
《无人机蜂群:释放人类-蜂群编队的潜能》
专知会员服务
1+阅读 · 今天9:12
《战略战术化:一项综合性述评》
专知会员服务
1+阅读 · 今天9:08
美陆军-工业界协同推进反无人机系统技术发展
专知会员服务
1+阅读 · 今天8:46
《跨域指挥背景下的领导力发展》最新报告
专知会员服务
1+阅读 · 今天8:40
俄乌无人机战争的六大启示
专知会员服务
10+阅读 · 8月3日
《无人机空中监控:通信实验洞察》
专知会员服务
8+阅读 · 8月3日
从采集到决策:美军视角下的战术情报范式重构
相关VIP内容
相关基金
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员