Fine-tuning Large Language Models (LLMs) | w/ Example Code

preview_player
Показать описание
This is the 5th video in a series on using large language models (LLMs) in practice. Here, I discuss how to fine-tune an existing LLM for a particular use case and walk through a concrete example with Python code.

Resources:

References:
[2] arXiv:2005.14165 [cs.CL] (GPT-3 Paper)
[3] arXiv:2303.18223 [cs.CL] (Survey of LLMs)
[4] arXiv:2203.02155 [cs.CL] (InstructGPT paper)
[6] arXiv:2106.09685 [cs.CL] (LoRA paper)
[7] Original dataset source — Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. 2011. Learning Word Vectors for Sentiment Analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 142–150, Portland, Oregon, USA. Association for Computational Linguistics.

--

Intro - 0:00
What is Fine-tuning? - 0:32
Why Fine-tune - 3:29
3 Ways to Fine-tune - 4:25
Supervised Fine-tuning in 5 Steps - 9:04
3 Options for Parameter Tuning - 10:00
Low-Rank Adaptation (LoRA) - 11:37
Example code: Fine-tuning an LLM with LoRA - 15:40
Load Base Model - 16:02
Data Prep - 17:44
Model Evaluation - 21:49
Fine-tuning with LoRA - 24:10
Fine-tuned Model - 26:50
Рекомендации по теме
Комментарии
Автор


--
References
[2] arXiv:2005.14165 [cs.CL] (GPT-3 Paper)
[3] arXiv:2303.18223 [cs.CL] (Survey of LLMs)
[4] arXiv:2203.02155 [cs.CL] (InstructGPT paper)
[6] arXiv:2106.09685 [cs.CL] (LoRA paper)
[7] Original dataset source — Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. 2011. Learning Word Vectors for Sentiment Analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 142–150, Portland, Oregon, USA. Association for Computational Linguistics.

ShawhinTalebi
Автор

Honestly the most straightforward explanation I've ever watched. Super excellent work Shaw. Thank you. It's so rare to find good communicators like you!

beaux
Автор

You have explained this so clearly, that even a novice in NLP can understand it.

JaishreeramCoder
Автор

Such a great video. This is the first one I watched from you. You explain everything so nicely, and in my opinion you provided just the right amount of information - not too little, so it doesn't feel superficial and you feel like you've learned something, but not too much, so that you can take what you've learned and read more about it yourself if you're interested. Looking forward to seeing more of your content!

lukaboljevicboljevic
Автор

A very clear and straightforward video explaining finetuning.

junjieya
Автор

One thing that really standout for me is not using Google Colab for explanation. Explaining all code without scrolling helps the audience better grasp the content as it goes with the flow without waiting for the code to execute and helps the audience to remember where the variables were defined and all. Great approach and thanks for the amazing content!

srinivasguptha
Автор

You're a fantastic communicator - this was very helpful. I would love to see more walkthroughs like this that have a good balance of theory, math and python.

Josia-pm
Автор

Just came to this video from HF and I have to say, I love they way you describe this! Thanks for the great video!

checkdgt
Автор

Hands down one of the most best explanations on youtube keep it up homie

fakharmursaleen
Автор

Hey YouTube, I really liked this kind of machine learning and fine tuning topics. Please recommend me more of these.

egemenklc
Автор

This video series is underrated. Loved it, thank you!

jonathanleroy
Автор

Excellent way of teaching. Keep doing this kind of good work.

ayyanarjayabalan
Автор

Hey YouTube algorithm, I loved this video . suggest me more of them

balubalaji
Автор

Wow dude, just you wait, this channel is gonna go viral! You explain everything so clearly, wish you led the courses at my university.

yoffel
Автор

I was struggling to understand some details, before this video, thanks a lot

AbdulademAljamel-nd
Автор

Thanks for the well defined video because it helped me prepare my proposal related to this topic.

Random-bqqc
Автор

excellent simple explanation to the point. Love it !

saraesshaimi
Автор

Thank you for the detailed explaination line by line. Finally a place, I can rely on with working example

sreeramch
Автор

Thanks for these great videos. I really love the fact that you focus on building an intuitive understanding as opposed to throwing jargons. Could you please start a langchain series?

soudaminipanda
Автор

Great video, I wanted to hear further discussion on mitigation techniques for overfitting.

Thanks for making the video!

EigenA