用共享搜索树让多个小模型协作优化编译,省时省钱还高效。
LiteCoOp: Lightweight Multi-LLM Shared-Tree Reasoning for Model-Serving Compiler Optimizations
- 构建共享MCTS搜索树,让不同大小的LLM按需协作,无需额外调度框架。
- 八模型协同使编译时间减少1.95倍,大模型调用仅占23%,成本降4.47倍。
- 适合资源受限场景下的智能编译优化,尤其关注成本与性能平衡的研究者。
LLM驱动的编译优化虽有潜力,但现有方法依赖单一大型LLM,成本高昂且排斥小型模型。本文提出LiteCoOp,一种轻量级框架,将优化搜索树本身作为多LLM协作机制,实现异构模型间无外部协调的协同推理。每个优化步骤中,系统调用一个LLM提出编译变换并选择下一跳模型;所有决策记录于共享的蒙特卡洛树(MCTS)中,通过回溯奖励机制使各模型共享进展。该设计避免了模型间通信、复杂推理日志及代理基础设施开销。我们引入对模型尺寸敏感的改进版UCT算法,优先选择较小模型以降低成本,同时保障编译性能。在多种GPU和CPU基准测试中,八模型异构协作配置表现最优:总编译时间降低1.95倍(1.74倍),API成本下降4.47倍(4.32倍),最大模型调用比例仅为23.1%(23.9%),验证了方案的可扩展性与高效性。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。