Simple LLM Finetuner: An Overview
Simple LLM Finetuner is a welcoming and user-friendly tool designed for beginners to fine-tune various language models. It utilizes the LoRA (Low-Rank Adaptation) method through the PEFT library, making it accessible even with basic NVIDIA GPUs. The project aims to simplify the fine-tuning process for language models, allowing users to manage datasets, customize parameters, train, and evaluate models with ease.
Project Status
It's important to note that this project is considered inactive. Users are encouraged to explore alternative tools such as LLaMA-Factory, Unsloth, or the Text Generation Web UI for more current solutions.
Features of Simple LLM Finetuner
- User-Friendly Interface: The tool offers an intuitive interface where users can easily paste datasets separated by double blank lines.
- Flexible Adjustments: Users can adjust parameters tailored for fine-tuning and inference.
- Detailed Explanations: Provides explanations for each parameter, making it accessible for beginners.
Getting Started
Prerequisites
Before using Simple LLM Finetuner, ensure you have:
- Linux or Windows Subsystem for Linux (WSL)
- A modern NVIDIA GPU with at least 16 GB of VRAM, although smaller sample lengths might work with less.
Installation Guide
-
Set Up Environment: It is recommended to use a virtual environment, preferably Conda.
- Create and activate a new environment:
conda create -n simple-llm-finetuner python=3.10 conda activate simple-llm-finetuner
- Install necessary CUDA and PyTorch packages:
conda install -y cuda -c nvidia/label/cuda-11.7.0 conda install -y pytorch=2 pytorch-cuda=11.7 -c pytorch
- Create and activate a new environment:
-
Cloning the Repository:
- Clone the project and navigate into the directory:
git clone https://github.com/lxe/simple-llm-finetuner.git cd simple-llm-finetuner
- Install the required Python packages:
pip install -r requirements.txt
- Clone the project and navigate into the directory:
-
Launching the Application:
- Run the application:
python app.py
- Open the local server (http://127.0.0.1:7860/) in your web browser.
- Run the application:
Using the Finetuner
- Prepare Training Data: Separate each data sample with two blank lines and paste it into the provided textbox.
- Name Your Adapter: Enter a name for your new LoRA adapter in the designated textbox.
- Start Training: Click the train button. You may need to adjust sequence length and batch size based on your GPU capabilities. The fine-tuned model will be saved in the
lora/
directory.
Once training is complete, you can switch to the inference tab to test and explore your fine-tuned language model.
Visual Guide
A YouTube walkthrough is available for users who prefer visual guidance: YouTube Walkthrough.
License
The Simple LLM Finetuner is released under the MIT License, allowing for flexible use and modifications.