LLaMoCo: Instruction Tuning of Large Language Models for Optimization Code Generation
Zeyuan Ma, Yue‐Jiao Gong, Hongshu Guo, Jiacheng Chen, Yining Ma, Zhiguang Cao, Jun Zhang
South China University of Technology · Chinese University of Hong Kong
Key points
From the paper's conclusion- We then develop a novel two-phase learning strategy with a contrastive learning-based warm-up to enhance convergence during instruction tuning.
Abstract
Recently, combining the strength of large language models (LLMs) and Evolutionary Computation (EC) has shown promising results for addressing optimization problems. It typically involves either iterative next-step solution seeking or directly prompting LLMs to generate critical optimization codes. However, these methods often suffer from low computational 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. LLaMoCo features a comprehensive instruction set that includes code-style problem descriptions as input prompts and robust optimization codes from expert EC optimizers as target outputs. We then develop a novel two-phase learning strategy with a contrastive learning-based warm-up to enhance convergence during instruction tuning. Extensive experiments demonstrate that a CodeGen (350M) model tuned by our LLaMoCo yields a powerful domain-specific model for generating high-performance optimizers, achieving superior performance compared to GPT-4 family and other competitors on both synthetic and realistic problem sets.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- FrugalEvo: Towards Cost-Aware LLM-Guided Program EvolutionarXiv · 2026
- Meta-Reflective Evolution Effectively Improves Production AI SystemsarXiv · 2026
- Multi-Task Evolution for Zero-Shot Cross-Problem Generalization using LLMsarXiv · 2026
- Directing to Diversify: Multi-Directional Search for Automatic Heuristic DesignarXiv · 2026
- $\varepsilon$-MemEvo: Adaptive Cross-Task Memory Transfer for LLM Program EvolutionarXiv · 2026
- Green Code or Costly Code? Evaluating the Energy Costs of Iterative LLM-Based Code OptimizationsarXiv · 2026