- ๐ Table of Contents
- ๐ LLM Instruction tuning for school math questions
- ๐บ๏ธ Roadmap
- โ๏ธ License
- ๐ Links
- ๐ References & Citations
End-to-end MLOps LLM instruction finetuning based on PEFT & QLoRA to solve math problems.
Base LLM: OpenLLaMA
Dataset: Grade School Math Instructions Dataset
- NLP: PyTorch, Hugging Face Transformers, Accelerate, PEFT
- Research: Jupyter Lab, MLflow
- Framework: FastAPI
- Deployment: Docker, Amazon Web Services (AWS), GitHub Actions
- Version Control: Git, DVC, GitHub
Project structure template can be found here.
โโโ LICENSE
โโโ Makefile <- Makefile with commands like `make data` or `make train`
โโโ README.md <- The top-level README for developers using this project.
โโโ requirements.txt <- The requirements file for reproducing the analysis environment, e.g.
โ generated with `pip freeze > requirements.txt`
|
โโโ config <- Stores pipelines' configuration files
| โโโ data-config.yaml
| โโโ model-config.yaml
| โโโ model-parameters.yaml
|
โโโ data
โ โโโ external <- Data from third party sources.
โ โโโ interim <- Intermediate data that has been transformed.
โ โโโ processed <- The final, canonical data sets for modeling.
โ โโโ raw <- The original, immutable data dump.
โ
โโโ assets <- Store public assets for readme file
โโโ docs <- A default Sphinx project; see sphinx-doc.org for details
โ
โโโ models <- Trained and serialized models, model predictions, or model summaries
โ
โโโ notebooks <- Jupyter notebooks for research.
โ
โโโ setup.py <- Make this project pip installable with `pip install -e`
โโโ src <- Source code for use in this project.
โ โโโ __init__.py <- Makes src a Python module
โ โ
| โโโ logging <- Define loggers for the app
| โโโ utils
| | โโโ __init__.py
| | โโโ common.py <- Functions for common utilities
| |
โ โโโ data <- Scripts to download or generate data
| | โโโ components <- Classes for pipelines
| | โโโ pipeline <- Scripts for data aggregation
| | โโโ configuration.py <- Class to manage config files
| | โโโ entity.py <- Stores configuration dataclasses
โ โ โโโ make_dataset.py <- Script to run data pipelines
โ โ
โ โโโ models <- Scripts to train models and then use trained models to make
โ โ predictions
| โโโ components <- Classes for pipelines
| โโโ pipeline <- Scripts for data aggregation
| โโโ configuration.py <- Class to manage config files
| โโโ entity.py <- Stores configuration dataclasses
โ โโโ predict_model.py <- Script to run prediction pipeline
โ โโโ train_model.py <- Script to run model pipelines
โ
โโโ main.py <- Script to run model training pipeline
โโโ app.py <- Script to start FastApi app
|
โโโ .env.example <- example .env structure
โโโ Dockerfile <- configurates Docker container image
โโโ .github
| โโโ workflows
| โโโ main.yaml <- CI/CD config
|
โโโ .gitignore <- specify files to be ignored by git
โโโ .dvcignore <- specify files to be ignored by dvc
|
โโโ .dvc <- dvc config
โโโ dvc.lock <- store dvc tracked information
โโโ dvc.yaml <- specify pipeline version control
- Clone the project
git clone https://github.com/Logisx/LLMath-QLoRA- Go to the project directory
cd my-project- Install dependencies
pip install -r requirements.txt- Start the app
python app.py- Testing features: Develop unit tests and integrations test
- Hyperparameter tuning: Train a better model by hyperparameter tuning
- User interface: Create a frienly app interface
- Efficient Fine-Tuning with LoRA: A Guide to Optimal Parameter Selection for Large Language Models
- Grade School Math Instructions Fine-Tune OPT
@article{cobbe2021gsm8k,
title={Training Verifiers to Solve Math Word Problems},
author={Cobbe, Karl and Kosaraju, Vineet and Bavarian, Mohammad and Chen, Mark and Jun, Heewoo and Kaiser, Lukasz and Plappert, Matthias and Tworek, Jerry and Hilton, Jacob and Nakano, Reiichiro and Hesse, Christopher and Schulman, John},
journal={arXiv preprint arXiv:2110.14168},
year={2021}
}
@software{openlm2023openllama,
author = {Geng, Xinyang and Liu, Hao},
title = {OpenLLaMA: An Open Reproduction of LLaMA},
month = May,
year = 2023,
url = {https://github.com/openlm-research/open_llama}
}
@software{together2023redpajama,
author = {Together Computer},
title = {RedPajama-Data: An Open Source Recipe to Reproduce LLaMA training dataset},
month = April,
year = 2023,
url = {https://github.com/togethercomputer/RedPajama-Data}
}
@article{touvron2023llama,
title={Llama: Open and efficient foundation language models},
author={Touvron, Hugo and Lavril, Thibaut and Izacard, Gautier and Martinet, Xavier and Lachaux, Marie-Anne and Lacroix, Timoth{\'e}e and Rozi{\`e}re, Baptiste and Goyal, Naman and Hambro, Eric and Azhar, Faisal and others},
journal={arXiv preprint arXiv:2302.13971},
year={2023}
}

