LoRA & QLoRA Fine-tuning Explained In-Depth

  Рет қаралды 48,924

Entry Point AI

Entry Point AI

Күн бұрын

Пікірлер: 77
@DanielTompkinsGuitar
@DanielTompkinsGuitar 10 ай бұрын
Thanks! This is among the clearest and most concise explanations of LoRA and QLoRA. Really great job.
@Vinayakan-s4y
@Vinayakan-s4y 11 ай бұрын
I have been using thiese techniques for a while now without having a good understanding of each of the prameters. Thanks for giving a good overview of both the techniques and the papers
@mandrakexTV
@mandrakexTV 2 ай бұрын
This is the best detailed video and nicest explanation on youtube right now. I do think your channel will grow because you are doing an EXCELENT job. Thank you man.
@gayathrisaranath666
@gayathrisaranath666 10 күн бұрын
Thanks for this clear explanation about the topic! Your way of relating back to research papers is very interesting and helpful!
@andrepemmelaar8728
@andrepemmelaar8728 3 ай бұрын
Very useful! Marvelous clear explanation with the right amount of detail about a subject that’s worth understanding
@YLprime
@YLprime 8 ай бұрын
Dude u look like the lich king with those blue eyes
@practicemail3227
@practicemail3227 7 ай бұрын
True. 😅 He should be in acting career ig.
@EntryPointAI
@EntryPointAI 6 ай бұрын
You mean Lich King looks like me I think 🤪
@titusfx
@titusfx 9 ай бұрын
🎯 Key Takeaways for quick navigation: 00:00 🤖 *Introduction to Low Rank Adaptation (LoRA) and QLoRA* - LoRA is a parameter-efficient fine-tuning method for large language models. - Explains the need for efficient fine-tuning in the training process of large language models. 02:29 🛡️ *Challenges of Full Parameter Fine-Tuning* - Full parameter fine-tuning updates all model weights, requiring massive memory. - Limits fine-tuning to very large GPUs or GPU clusters due to memory constraints. 04:19 💼 *How LoRA Solves the Memory Problem* - LoRA tracks changes to model weights instead of directly updating all parameters. - It uses rank-one matrices to efficiently calculate weight changes. 06:11 🎯 *Choosing the Right Rank for LoRA* - Rank determines the precision of the final output table in LoRA fine-tuning. - For most tasks, rank can be set lower without sacrificing performance. 08:12 🔍 *Introduction to Quantized LoRA (QLoRA)* - QLoRA is a quantized version of LoRA that reduces model size without losing precision. - It exploits the normal distribution of parameters to achieve compression and recovery. 10:46 📈 *Hyperparameters in LoRA and QLoRA* - Discusses hyperparameters like rank, alpha, and dropout in LoRA and QLoRA. - The importance of training all layers and the relationship between alpha and rank. 13:30 🧩 *Fine-Tuning with LoRA and QLoRA in Practice* - Emphasizes the need to experiment with hyperparameters based on your specific data. - Highlights the ease of using LoRA with integrations like Replicate and Gradient.
@SantoshGupta-jn1wn
@SantoshGupta-jn1wn 9 ай бұрын
great video, i think the best explanation i've seen on this, i'm also really confused about why they picked the rank and alpha that they did.
@thelitbit
@thelitbit 5 ай бұрын
great video! referring to the paper and explaining each thing in detail really helps understand the concept to the fullest. Kudos!
@steve_wk
@steve_wk 11 ай бұрын
I've watched a couple other of your videos - you're a very good teacher - thanks for doing this.
@naevan1
@naevan1 6 ай бұрын
I love this video man. watched it at least 3 times and came back to it before a job interview also. Please do more tutorials /explanations !
@SanjaySingh-gj2kq
@SanjaySingh-gj2kq 11 ай бұрын
Good explanation of LoRA and QLoRA
@drstrangeluv1680
@drstrangeluv1680 8 ай бұрын
I loved the explanation! Please make more such videos!
@VerdonTrigance
@VerdonTrigance 10 ай бұрын
It was incredible and very helpful video. Thank you man!
@user-wr4yl7tx3w
@user-wr4yl7tx3w 8 ай бұрын
This is really well presented
@UfcFan-d6s
@UfcFan-d6s 3 ай бұрын
Amazing for struggling students. Love from Korea😂
@varun_skywalker
@varun_skywalker 10 ай бұрын
This is really helpful, Thank you!!
@brianbarnes746
@brianbarnes746 4 ай бұрын
Great explanation, best that I've seen
@anujlahoty8022
@anujlahoty8022 6 ай бұрын
Loved the contnt! Simply explained no BS.
@user-wp8yx
@user-wp8yx 4 ай бұрын
I'm pulling for another vid on alpha. Oobabooga suggests twice your rank. The Chinese alpaca lora people use a rank 8 with alpha 32 and I guess it worked. I've tried high alphas that make the model kinda crazy. Need guidence.
@EntryPointAI
@EntryPointAI 4 ай бұрын
When in doubt, set alpha = rank for the effective scale factor to be 1. There are better ways to have a larger impact on training than bluntly multiplying the change in weights, like improving your dataset or dialing in the learning rate.
@user-wp8yx
@user-wp8yx 4 ай бұрын
@@EntryPointAI this does make sense they way you put it. Thanks so much for your reply!
@Sonic2kDBS
@Sonic2kDBS 5 ай бұрын
Some nice details here. Keep on.
@SergieArizandieta
@SergieArizandieta 7 ай бұрын
wow I'm noobie in this field n I been testing fine-tunen my own chatbot with differents techniques, n I found a lot of stuff, but It's not commonly find a some explanation to understand the main reason of the use of it, ty a lot < 3
@RafaelPierre-vo2rq
@RafaelPierre-vo2rq 7 ай бұрын
Awesome explanation! Which camera you use?
@EntryPointAI
@EntryPointAI 7 ай бұрын
Thanks, it’s a Canon 6d Mk II
@AbdoGhazala-y5p
@AbdoGhazala-y5p Ай бұрын
can you share the presentation document
@stutters3772
@stutters3772 6 ай бұрын
This video deserves more likes
@CatarinaReis-g3y
@CatarinaReis-g3y 4 ай бұрын
Thisa saved me. Thank you. Keep doing this :)
@nachiketkathoke8281
@nachiketkathoke8281 5 ай бұрын
really grate explanation
@archchana7756
@archchana7756 3 ай бұрын
very well explained, thanks :)
@aashwinsharma8194
@aashwinsharma8194 4 ай бұрын
Great explanation...
@Gayatritravelandfitnessvlogs
@Gayatritravelandfitnessvlogs 2 ай бұрын
Thanks a ton!
@markironmonger223
@markironmonger223 11 ай бұрын
This was wonderfully educational and very easy to follow. That either it makes you a great educator or me an idiot :P Regardless, thank you.
@EntryPointAI
@EntryPointAI 11 ай бұрын
let's both say it's the former and call it good! 🤣
@TheBojda
@TheBojda 7 ай бұрын
Nice video, congrats! LoRA is about fine-tuning, but is it possible to use it to compress the original matrices to speed up inference? I mean decompose the original model's original weight matrices to products of low-rank matrices to reduce the number of weights.
@rishiktiwari
@rishiktiwari 7 ай бұрын
I think you mean distillation with quantisation?
@EntryPointAI
@EntryPointAI 7 ай бұрын
Seems worth looking into, but I couldn't give you a definitive answer on what the pros/cons would be. Intuitively I would expect it could reduce the memory footprint but that it wouldn't be any faster.
@TheBojda
@TheBojda 7 ай бұрын
@@rishiktiwari Ty. I learned something new. :) If I understand well, this is a form of distillation.
@rishiktiwari
@rishiktiwari 7 ай бұрын
​@@TheBojdaCheers mate! Yes, in distillation there is student-teacher configuration and the student tries to be like teacher with less parameters (aka. weights). This can also be combined with quantisation to reduce memory footprint.
@chrisanderson1513
@chrisanderson1513 5 ай бұрын
Saving me somr embarrassment in future work meetings. :) thanks for sharing.
@louisrose7823
@louisrose7823 7 ай бұрын
Great video!
@tgzhu3258
@tgzhu3258 2 ай бұрын
so good!!
@NathanielMaymon
@NathanielMaymon 2 ай бұрын
What's the name of the paper you referenced in the video?
@EntryPointAI
@EntryPointAI 2 ай бұрын
Here's LoRA: arxiv.org/abs/2106.09685 and QLoRA: arxiv.org/abs/2305.14314
@nafassaadat8326
@nafassaadat8326 6 ай бұрын
can we use QLoRA in a simple ML model like CNN for image classification ?
@ecotts
@ecotts 7 ай бұрын
LoRa (Long Range) is a physical proprietary radio communication technique that uses a spread spectrum modulation technique derived from chirp spread spectrum. It's a low powered wireless platform that has become the de facto wireless platform of Internet of Things (IoT). Get your own acronym! 😂
@EntryPointAI
@EntryPointAI 7 ай бұрын
Fair - didn’t create it, just explaining it 😂
@princekhunt1
@princekhunt1 Ай бұрын
Nice
@egonkirchof
@egonkirchof 5 ай бұрын
Why do we call training a model pre-training it ?
@EntryPointAI
@EntryPointAI 5 ай бұрын
Not sure if that's a rhetorical question, but I'll give it a go. You can call it just "training," but that might imply that it's ready to do something useful when you're done. If you call it "pre-training" it implies that you'll train it more afterward, which is generally true. So it may be useful in being a little more specific.
@Ian-fo9vh
@Ian-fo9vh 11 ай бұрын
Bright eyes
@kunalnikam9112
@kunalnikam9112 7 ай бұрын
In LoRA, Wupdated = Wo + BA, where B and A are decomposed matrices with low ranks, so i wanted to ask you that what does the parameters of B and A represent like are they both the parameters of pre trained model, or both are the parameters of target dataset, or else one (B) represents pre-trained model parameters and the other (A) represents target dataset parameters, please answer as soon as possible
@EntryPointAI
@EntryPointAI 6 ай бұрын
Wo would be the original model parameters. A and B multiplied together represent the changes to the original parameters learned from your fine-tuning. So together they represent the difference between your final fine-tuned model parameters and the original model parameters. Individually A and B don't represent anything, they are just intermediate stores of data that save memory.
@kunalnikam9112
@kunalnikam9112 6 ай бұрын
@@EntryPointAI got it!! Thank you
@ArunkumarMTamil
@ArunkumarMTamil 6 ай бұрын
how is Lora fine-tuning track changes from creating two decomposition matrix?
@EntryPointAI
@EntryPointAI 6 ай бұрын
The matrices are multiplied together and the result is the changes to the LLM's weights. It should be explained clearly in the video, it may help to rewatch.
@ArunkumarMTamil
@ArunkumarMTamil 6 ай бұрын
@EntryPointAI My understanding: Orignal weight = 10 * 10 to form a two decomposed matrices A and B let's take the rank as 1 so, The A is 10 * 1 and B is 1 * 10 total trainable parameters is A + B = 20 In Lora even without any dataset training if we simply add the A and B matrices with original matric we can improve the accuracy slighty And if we use custom dataset in Lora the custom dataset matrices will captured by A and B matrices Am I right @EntryPointAI?
@EntryPointAI
@EntryPointAI 6 ай бұрын
@@ArunkumarMTamil Trainable parameters math looks right. But these decomposed matrices will be initialized as all zeroes so adding them without any custom training dataset will have no effect.
@Larimuss
@Larimuss 3 ай бұрын
QLORA let's me train on a 4070ti with only 12gb vram. Though I can't go over 7b model
@vediodiary1754
@vediodiary1754 8 ай бұрын
Oh my god your eyes 😍😍😍😍everybody deserves hot teacher😂❤
@DrJaneLuciferian
@DrJaneLuciferian 10 ай бұрын
I wish people would actually share links to papers they reference...
@EntryPointAI
@EntryPointAI 10 ай бұрын
LoRA: arxiv.org/abs/2106.09685 QLoRA: arxiv.org/abs/2305.14314 Click "Download PDF" in top right to view the actual papers.
@DrJaneLuciferian
@DrJaneLuciferian 10 ай бұрын
@@EntryPointAI Thank you, that's kind. I did already go look it up. Sorry I was frustrated. It's very common for people to forget to putlikes to papers in show note :^)
@nabereon
@nabereon 9 ай бұрын
Are you trying to hypnotize us with those eyes 😜
@619vijay
@619vijay 4 ай бұрын
Eyes!
@kritarthlohomi3305
@kritarthlohomi3305 2 ай бұрын
bradley cooper in limitless tf
@rohitvishwakarma2871
@rohitvishwakarma2871 4 ай бұрын
Gojo ?
@TR-707
@TR-707 10 ай бұрын
Ahh very interesting thank you! *goes to fine tune pictures of anime girls*
@coco-ge4xg
@coco-ge4xg 6 ай бұрын
omg I always distracted by his blue eyes😆and ignoring what his talking
@Ben_dover5736
@Ben_dover5736 5 ай бұрын
your have beautiful eyes
@EntryPointAI
@EntryPointAI 4 ай бұрын
Thank you!
@partymarty1856
@partymarty1856 3 ай бұрын
blud why your eyes like that
LoRA explained (and a bit about precision and quantization)
17:07
Prompt Engineering, RAG, and Fine-tuning: Benefits and When to Use
15:21
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 8 МЛН
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 16 МЛН
МЕНЯ УКУСИЛ ПАУК #shorts
00:23
Паша Осадчий
Рет қаралды 4,8 МЛН
ML Was Hard Until I Learned These 5 Secrets!
13:11
Boris Meinardus
Рет қаралды 339 М.
RAG vs. Fine Tuning
8:57
IBM Technology
Рет қаралды 59 М.
QLoRA-How to Fine-tune an LLM on a Single GPU (w/ Python Code)
36:58
What is LoRA? Low-Rank Adaptation for finetuning LLMs EXPLAINED
8:22
AI Coffee Break with Letitia
Рет қаралды 47 М.
RLHF & DPO Explained (In Simple Terms!)
19:39
Entry Point AI
Рет қаралды 2,6 М.
The moment we stopped understanding AI [AlexNet]
17:38
Welch Labs
Рет қаралды 1,3 МЛН
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 8 МЛН