PEFT LoRA Finetuning With Oobabooga! How To Configure Other Models Than Alpaca/LLaMA Step-By-Step.

preview_player
Показать описание
This is my most request video to date! A more detailed walk-through of how to perform LoRA Finetuning!

In this comprehensive tutorial, we delve into the nitty-gritty of leveraging LoRAs (Low-Rank Adaption) to fine-tune large language models, utilizing Oogabooga and focusing on models like Alpaca and StableLM. The video begins with a discussion about the important considerations to bear in mind before beginning the fine-tuning process. It then transitions into the practical aspects, starting with the transformation of data sets (both structured and unstructured) into a suitable format for fine-tuning.

Through detailed examples, we show how to structure the fine-tuning file, the selection of the appropriate language model, data preprocessing techniques for various data types, and the challenges associated with each type. This includes the use of regex, OCR, and other tools for data extraction from unstructured sources.

The tutorial then moves on to a real-time demonstration using the MedQuAD medical Q&A dataset, where the host explains how to convert XML data into the Alpaca-supported JSON structure, how to upload the dataset for training, and ultimately, how to train the LoRAs using Lambda Labs. The video concludes with a discussion on setting up training for different large language models and how to prepare data for them.

This video serves as a guide for those interested in harnessing the power of LoRAs for fine-tuning their own language models, with a particular emphasis on practical application and a step-by-step approach. The next video promises to explore the 'Hyena' paper and its potential impacts on the world of large language models.

0:00 Intro
0:27 How to Choose a LLM
2:15 Preparing Data For Finetuning
4:03 Creating a Dataset
4:57 LoRA Training with Oobabooga
7:24 Validating Chat Results
9:00 Setting up Different LLM's
10:04 Outro

#AI #MachineLearning #LanguageModels #FineTuning #LoRAs #AlpacaModel #StableLM #LambdaLabs #OogaBooga #DataPreprocessing #LargeLanguageModels
Рекомендации по теме
Комментарии
Автор

wow such a in debt training. I am an IT/Cyber security senior and played with llm's couple of years back. training a statistics model. Your video's helped me a lot to get up to speed again. Thank you for the detailed training.

rezasayadi
Автор

Really clear and well explained video! Not many people are covering these topics and fewer are doing to well, so this is an easy subscribe for me!

msampsond
Автор

Very good :) I was waiting for this video and you delivered :)

netwar
Автор

I appreciate the technical details you provide. Keep it up!

sammay
Автор

Thank you so much for this video! It was incredibly clear and the concrete example you provided really helped to understand. Your content stands out, and it's greatly appreciated!☺

marieharmel
Автор

Excellent! This is really helpful. Appreciate how concise you explained it.

mwissel
Автор

Thank you for the video! I am wondering how to deploy the fine-tuned model from Oobabooga!

nickluo
Автор

An update to this would be very welcome. Because this does not work anymore in the current Oobabooga interface.

JelleDeLoecker
Автор

Nice video! I saw you used llama-2 7b as base model and it said "I'm sorry but I don't know" when you entered MedQuad questions. However, I entered the same question to the llama-2 model without any fine-tuning. The llama 2 was able to answer these questions. Do you have any clue on it?

tongwu
Автор

Man, this is great!! Thank you so much for the insight!! 😊

swannschilling
Автор

Such a wonderful explanation. Will you ever film the Validation explanation as you say here?

jbkwon
Автор

Well done! Really like your in depth approaches with actual examples…keep ‘em coming🦾

klammer
Автор

At 4:52 We see the dataset having fields 'instruction', 'input', and 'output'. But at 9:42 it seems you change the format of the dataset to 'prompt' and 'completion' for some reason. How does this work if your dataset file has fields not matching the format you're setting up?

Never mind, I figured it out. at 7:12 we can see that you're using the alpaca-format.json which does match the 'instruction', 'input', and 'output' fields in the training data. At 9:42 you were simply showing how you would change the format file if you were using a different training dataset.

kielerrr
Автор

Wow, this incredibly cool for a web inferface and to keep my training going while i wait for for my python to get better 😂

Would love to know about why you used that specific model and what models it can be ised with? I'd love to try it on an uncesored.

Larimuss
Автор

Great video! I am wondering if Oobagooga provides a command line way to perform training. I am using a lab server which the web UI is not accessible.

yutingguo
Автор

Awesome again, is there a major difference between MPT-7b to use LoRA?

timothymaggenti
Автор

Hi, are sure about the "Data format" you selected in the Training tab of the text generation webui? I've tried to train WizardLM 13B both using alpaca-chatbot-format and alpaca-format, using the dataset in alpaca instruction scheme.

It looks like I did get much better results when using "alpaca-format" even though I've been using Wizard, which uses chat format by design.

michakoodziej
Автор

using rtx3070, run Lora with ur data only in 5 minutes not hours!
but inference is time consuming.Thanks! professor!
and I'll be your fans.

gossipGirlMegan
Автор

Another great video! You are doing something I couldn't find on youtube in a simple, clear and practical way. I think your video approach very newbie friendly, so anyone intrested in AI and LLMs can easily get their hands dirty and try some fun and cool stuff! There's anyway that this fine-tuning process can be done in a free collab or a low cost remotely? can you like fine-tune a model for different tasks and apply more than one "fine-tune" simultaneously? example: fine-tune for a medical stuff, but also for physics stuff and apply both to the same model? I have another question: if you fine-tune using LoRA for longer responses can you get longer responses like, exceeding the 2000 or 4000 tokens? Once again, thank you so so much for your videos!

absinto
Автор

Very informative video. Is there a way to make the LLM answer only to specific domain. For example it should answer only questions related to medical field and ignore irrelevant questions ?

VishalRaghav