Giter Site home page Giter Site logo

llama2_finetuning's Introduction

README

Introduction

This project involves fine-tuning the Llama-2 model using the Learning Rate Annealing (LoRA) technique with the "Jeopardy_csv.csv" dataset. The goal is to enhance the model's performance on question-answering tasks, leveraging the trivia-style format of the Jeopardy dataset.

Requirements

see requirement.txt

Dataset

The dataset used is "Jeopardy_csv.csv," which contains Jeopardy questions and answers. Ensure you have downloaded and placed this dataset in the appropriate directory before running the notebook.

Notebook Structure

Main Notebook: Bonus_LLAMA_2_FineTuning_LoRA.ipynb

Inference Notebook: Bonus_Make_Inference_from_saved_ft_model.ipynb

Data Loading and Preprocessing: Instructions on how to load and preprocess the Jeopardy dataset. Model Setup: Setting up the Llama-2 model and the LoRA parameters. Fine-Tuning Process: Detailed steps for fine-tuning the model with the dataset. Inference: Methods to evaluate the fine-tuned model's performance.

Llama Model Finetuning

base model: "NousResearch/Llama-2-7b-chat-hf"

Training details in Main Notebook: Bonus_LLAMA_2_FineTuning_LoRA.ipynb

LoRA Weights

LoRA Weights can be found via link:

https://drive.google.com/drive/folders/1J6Gx4TAW7UYQe2BXkFKKHaDEGp6RFMUu?usp=drive_link

Log file

Log can be found in: record.log

MAKE INFERENCE

To load the saved model and make inference, execute Colab file the function make_inference() will take test.txt as input and generate test-output.txt as output.

test.txt contains questions: Who is the president of United States? Which city is the capital of PRC? 1+1=?

test-output.txt contains answers generated by the fine-tuned model: Joe Biden Beijing 2

Contact

For any questions, please contact [email protected]

llama2_finetuning's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.