LLaMA-LoRA Tuner: UI tool to fine-tune and test your own LoRA models

Or “Train your own ChatGPT on Google Colab for free” as a clickbait

Pokai Chang
2 min readApr 11, 2023
Text inference with different LLaMA PEFT adaptor models on LLaMA-LoRA Tuner

Project on GitHub: https://github.com/zetavg/LLaMA-LoRA-Tuner

Since alpaca-lora proved it possible to fine-tune LLaMA for instruction-following on consumer hardware, I’ve been exploring with it, training LoRA adaptor models from fictional dialogues or owned data such as code, articles, email, and chat messages. During the exploration, I discovered simple-llama-finetuner created by lxe, which inspired me to use Gradio to create a UI to manage train datasets, do the training, and play with trained models for myself. With the demand of trying to fine-tune their own models of some of my friends who are not so familiar with programming, the tool soon evolved into a full for testing and fine-tuning LLaMA LoRA models.

It can run on Google Colab with normal (free) GPU runtime, with Google Drive mounted for storing your dataset and trained models. And as I turned to use Lambda Cloud, I also found a way of launching it on Lambda Cloud when I want to use it and terminate it when I’m done, using a single command with the help of SkyPliot — while my data stays in a mounted S3 bucket.

This project is based on alpaca-lora, and closely modeled after simple-llama-finetuner. Credits go to the authors of all the previous works. I’m new to LLM, Gradio, Python, PyTorch, Hugging Face Transformers, and PEFT, so there might be some mistakes or chaos in my code. Any corrections are appreciated.

If you’re interested, you can find the project on GitHub https://github.com/zetavg/LLaMA-LoRA-Tuner, an instruction video on YouTube https://youtu.be/IoEMgouZ5xU, and another video on how to run it on Colab https://youtu.be/lByYOMdy9h4.
I hope you have fun playing with it!

Fine-tuning with LLaMA-LoRA Tuner

--

--

Pokai Chang

All-round developer. Tech stuff I studied & talked about: http://bit.ly/2DdA4wo . (Git, ReasonML, GraphQL, NixOS & stuff).