Skip to content

This repository provides a streamlined and efficient pipeline for fine-tuning LLaMA-based language models using the Unsloth library. It is designed for instruction-tuning tasks with support for QLoRA, PEFT, and Hugging Face datasets.

Notifications You must be signed in to change notification settings

krishnakant2607/LLaMA-Model-Fine-Tuning-with-Unsloth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

LLaMA Model Fine-Tuning with Unsloth

This repository provides a streamlined and efficient pipeline for fine-tuning LLaMA-based language models using the Unsloth library. It is designed for instruction-tuning tasks with support for QLoRA, PEFT, and Hugging Face datasets.

Overview

The finetuning_project_unsloth.py script enables fine-tuning of pre-trained LLaMA models with a focus on low memory usage and high performance. It incorporates the latest advancements in parameter-efficient fine-tuning and is well-suited for custom dataset applications such as chatbot instruction tuning or domain-specific model adaptation.

Key Features

  • Fine-tuning using QLoRA for memory-efficient training
  • Integration with the Unsloth framework and Hugging Face ecosystem
  • Support for instruction-format datasets with input and output fields
  • Flexible configuration for training parameters, model type, and dataset path
  • Compatible with both local GPU setups and cloud environments

Dependencies

To install the required dependencies:

pip install unsloth datasets trl peft accelerate

Ensure that your system meets the hardware requirements for running LLaMA-based models, preferably with a GPU (16GB+ VRAM recommended).

Dataset Format

The script expects datasets in JSON or Hugging Face-compatible format with the following structure:

{
  "input": "Your prompt here",
  "output": "Expected model response"
}

Usage

Update the model and dataset paths as required in the script, then execute:

python finetuning_project_unsloth.py

This will initiate the fine-tuning process and save the model checkpoint and LoRA adapters upon completion.

Output

  • Fine-tuned model artifacts are saved to the ./model directory
  • LoRA adapter weights are stored for efficient deployment or merging

About

This repository provides a streamlined and efficient pipeline for fine-tuning LLaMA-based language models using the Unsloth library. It is designed for instruction-tuning tasks with support for QLoRA, PEFT, and Hugging Face datasets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published