Skip to content

MetaEvo/LLaMoCo

Repository files navigation

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}
}

LLaMoCo

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.

Installations

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 LLaMoCo

Requirements

Python >=3.7.1 with the following packages installed:

  • numpy==1.21.2
  • huggingface_hub==0.20.3
  • torch==2.0.1
  • transformers==4.37.2
  • jupyter==1.0.0

You can install the necessary packages by running the bash belows:

pip install -r .\requirements.txt

Quick Start

Running the bash to start jupyter notebook:

jupyter notebook

Then 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

Notice

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 better
  • GPU memory:12G or more

About

Inference code for LLaMoCo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors