Skip to content

Fine-tuning Llama3.2:3B using Unsloth on BAAI/Infinity-Instruct for supervised instruction-following. Includes a terminal chatbot and the fine-tuned model hosted on Hugging Face.

Notifications You must be signed in to change notification settings

Mateorovere/FineTuning-LLM-Llama3.2-3b

Repository files navigation

Llama3.2:3B Fine-Tuning with Unsloth on BAAI/Infinity-Instruct

This repository demonstrates the fine-tuning of the Llama3.2:3B model using the BAAI/Infinity-Instruct dataset and the Unsloth library. The fine-tuned model, MateoRov/Llama3.2-3b-SFF-Infinity-MateoRovere, is now available on Hugging Face and can be used for conversational AI tasks.


Features

  • Fine-tunes the Llama3.2:3B model for supervised instruction-following tasks.
  • Utilizes Unsloth for efficient and scalable training.
  • Leverages the BAAI/Infinity-Instruct dataset for high-quality supervised fine-tuning.
  • Provides a terminal-based chat interface using the fine-tuned model.

Setup and Usage

1. Clone the Repository

git clone https://github.com/Mateorovere/FineTuning-LLM-Llama3.2-3b.git
cd FineTuning-LLM-Llama3.2-3b

2. Install Dependencies

Install the required Python packages:

pip install -r requirements.txt

And install PyTorch

3. Run Fine-Tuning (Optional)

If you want to perform fine-tuning yourself, open the Llama_3_2_3B_Finetuning.ipynb notebook and follow the steps to train the model using the Unsloth library and the BAAI/Infinity-Instruct dataset.

Both the Llama_3_2_3B_Finetuning.ipynb and the inference.ipynb are ment to run on google collab

4. Use the Fine-Tuned Model as a Chatbot

Run the main.py script to interact with the fine-tuned model in the terminal:

python main.py

Example running on main

Model Information

The fine-tuned model is hosted on Hugging Face:

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your proposed changes.

Future improvements

Making it compatible with Ollama

About

Fine-tuning Llama3.2:3B using Unsloth on BAAI/Infinity-Instruct for supervised instruction-following. Includes a terminal chatbot and the fine-tuned model hosted on Hugging Face.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published