Live demo: https://optimus-solver.vercel.app/
This repository contains the official implementations for OptiMUS: Scalable Optimization Modeling with (MI) LP Solvers and Large Language Models. Check out this branch for an implementation of the older version.
You can download the dataset from https://nlp4lp.vercel.app/. Please note that NLP4LP is intended and licensed for research use only. The dataset is CC BY NC 4.0 (allowing only non-commercial use) and models trained using the dataset should not be used outside of research purposes (The updated version will be added soon).
pip install -r requirements.txt
grbgetkey YOUR_LICENSE
{
"openai_api_key": "OPENAI_API_KEY",
"openai_org_id": "OPENAI_ORG_ID",
"together_api_key": "TOGETHER_API_KEY",
"mistral_api_key": "MISTRAL_API_KEY",
}
OptiMUS
│ README.md
│ run.py
│ requirements.txt
│ config.json
│ LICENSE
│ agents/
│ data/
│ nlp4lp/
│ complexor/
│ nl4opt/
NLP4LP is available here. ComplexOR and NLP4LP datasets are available here (in the supplementary material): https://openreview.net/forum?id=HobyL1B9CZ
python run.py
You can modify the arguments to run the script on different datasets, models, and problems. For example:
python run.py --dataset nlp4lp --problem 1
or
python run.py --dataset complexor --problem Knapsack
Have questions? Want to implement this idea? Feel free to reach out via email (teshnizi /at/ stanford /dot/ edu)
@article{ahmaditeshnizi2024optimus,
title={OptiMUS: Scalable Optimization Modeling with (MI) LP Solvers and Large Language Models},
author={AhmadiTeshnizi, Ali and Gao, Wenzhi and Udell, Madeleine},
journal={arXiv preprint arXiv:2402.10172},
year={2024}
}