A package used to fine tune a model.
To perform training/fine-tuning and evaluation for LLM models on Google colab, please follow the instruction at finetuning/llm/finetune_text_generation_model.ipynb.
To perform training/fine-tuning and evaluation for LLM models locally, please follow the following steps.
For development or research, you can clone and install the repo locally:
git clone https://github.com/tigerrag/tiger.git && cd OpenTune
pip install --upgrade -e .This will install the OpenTune repo and all necessary dependencies.
On an non-intel Mac you may need to downgrade transformers library: pip install transformers==4.30.
If you do not have a dataset, you can start with ours toy data in the opentune/datasets folder.
The setup for training and evaluation can be effortlessly executed provided you possess a jsonl file containing data entries with two fields: Input, Output.
You can leverage our example scripts directly if you'd like.
Fine tune meta-llama/Llama-2-7b-chat-hf model.
python3 opentune/finetuning/llm/example.pyTo be added.