arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.01131math.OCcs.AIcs.CLcs.LGcs.NEcs.SE
收藏

LLaMoCo:面向优化代码生成的大语言模型指令微调

LLaMoCo: Instruction Tuning of Large Language Models for Optimization Code Generation

School of Computer Science and Engineering, South China University of Technology(华南理工大学计算机科学与工程学院);School of Computing and Information Systems, Singapore Management University(新加坡管理大学计算与信息系统学院);Nanyang Technological University(南洋理工大学)

Zeyuan Ma, Hongshu Guo, Jiacheng Chen, Guojun Peng, Zhiguang Cao, Yining Ma, Yue-Jiao Gong

AI总结:

针对现有大语言模型优化方法效率低、依赖提示设计、缺领域知识的问题,提出首个代码到代码的优化代码生成指令微调框架LLaMoCo,通过含对比学习预热的两阶段策略微调,使小模型性能超越GPT-4 Turbo等竞品。

摘要:

近期研究探索了利用大语言模型(LLM)开展优化的两种路径:要么迭代式地从LLM获取下一步解,要么直接提示LLM生成优化器。但这些方法存在固有局限,包括运行效率低、对提示设计高度敏感,且缺乏领域特定知识。我们提出LLaMoCo,这是首个旨在让LLM以代码到代码的方式求解优化问题的指令微调框架。具体而言,我们构建了一套全面的指令集,包含描述清晰的问题提示与有效的优化代码。随后我们提出一种新颖的两阶段学习策略,在指令微调阶段前加入基于对比学习的预热流程,以改善模型微调过程中的收敛表现。实验结果表明,经我们的LLaMoCo微调的CodeGen(350M)模型,在合成问题集与真实问题集上,均取得了优于GPT-4 Turbo及其他竞品的优化性能。微调后的模型与使用说明可在https://anonymous.4open.science/r/LLaMoCo-722A获取。

英文摘要:

Recent research explores optimization using large language models (LLMs) by either iteratively seeking next-step solutions from LLMs or directly prompting LLMs for an optimizer. However, these approaches exhibit inherent limitations, including low operational efficiency, high sensitivity to prompt design, and a lack of domain-specific knowledge. We introduce LLaMoCo, the first instruction-tuning framework designed to adapt LLMs for solving optimization problems in a code-to-code manner. Specifically, we establish a comprehensive instruction set containing well-described problem prompts and effective optimization codes. We then develop a novel two-phase learning strategy that incorporates a contrastive learning-based warm-up procedure before the instruction-tuning phase to enhance the convergence behavior during model fine-tuning. The experiment results demonstrate that a CodeGen (350M) model fine-tuned by our LLaMoCo achieves superior optimization performance compared to GPT-4 Turbo and the other competitors across both synthetic and realistic problem sets. The fine-tuned model and the usage instructions are available at https://anonymous.4open.science/r/LLaMoCo-722A.

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

↑