Sourcecodes of our IEEE TEVC paper "LlaMoCo: Instruction Tuning of Large Language Models for Optimization Code Generation".
@article{ma2026llamoco,
title={Llamoco: Instruction tuning of large language models for optimization code generation},
author={Ma, Zeyuan and Gong, Yue-Jiao and Guo, Hongshu and Chen, Jiacheng and Ma, Yining and Cao, Zhiguang and Zhang, Jun},
journal={IEEE Transactions on Evolutionary Computation},
year={2026},
publisher={IEEE}
}In this repository, we show an example of using our LLaMoCo-S to solve an optimization problems.LLaMoCo-M and LLaMoCo-L will be made public according to the acceptance.
You can experience the whole conversation with LLaMoCo-S step-by-step: 1. defining problems, 2. constructing prompts, 3. attaining optimization code from LLaMoCo-S.
In order to meet the requirements of anonymous, you need to download all the files by yourself and save it in the same directory(recommanded ./LLaMoCo). Then,you can run the shell to enter the project and use it:
cd LLaMoCoPython >=3.7.1 with the following packages installed:
numpy==1.21.2huggingface_hub==0.20.3torch==2.0.1transformers==4.37.2jupyter==1.0.0
You can install the necessary packages by running the bash belows:
pip install -r .\requirements.txtRunning the bash to start jupyter notebook:
jupyter notebookThen you can directly open the LLaMoCo_For_Review in jupyter notebook and interact with our LLaMoCo-s to get the output step by step.
if jupyter is not available in your environment,you can run the project by:
ipython -c "%run LLaMoCo_For_Review.ipynb"The model files are uploaded in https://huggingface.co/steven-0419/LLaMoCo/tree/main
To ensure that the program runs correctly, your hardware device needs to meet the following conditions:
Minimum hardware requirements:
GPU memory:4G
Recommended hardware requirements:
GPU:A800 or betterGPU memory:12G or more