Тёмный

What If Your LLM Could Become an Expert on Anything You Want? 

Maya Akim
Подписаться 34 тыс.
Просмотров 12 тыс.
50% 1

Fine Tune your Large Language Model with PEFT, QLora and Transformers library over your data.
🤖 Join my Discord community: / discord
📰 My tutorials on Medium: / mayaakim
🐦 My twitter profile: / maya_akim
To rent a GPU from Massed Compute ⤵️
bit.ly/maya-akim
Code for 50% discount: MayaAkim
In this video I'll turn a regular Llama 2 with 7B parameters into an expert on RU-vid titles by first quantizing it with bitsandbytes library and training it later.
Code is here:
colab.research.google.com/dri...
Resources for deeper understanding:
1. What is PEFT - huggingface.co/blog/peft
2. What is quantized model - huggingface.co/blog/4bit-tran...
3. What is quantized model p2. 2 - towardsdatascience.com/introd...
4. Lora - arxiv.org/abs/2106.09685
5. QLora - www.cloudbooklet.com/qlora-ef...
6. QLora pt.2 - towardsdatascience.com/qlora-...
7. Fine Tuning in general - bdtechtalks.com/2023/07/10/ll...
Chapters:
0:00 - problem with llms
0:49 - what is fine tuning?
1:05 - overview of the video
1:38 - dataset
1:51 - libraries
3:02 - what is quantized model?
3:31 - training Llama 2
5:54 - testing the fine tuned model
7:15 - save the fine tuned model
#finetune #llama2 #llm #ai

Наука

Опубликовано:

 

16 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 48   
@maya-akim
@maya-akim 10 месяцев назад
Thanks for watching and in case you'd like to see me cover some other topic in the next video, let me know!
@alexdw5
@alexdw5 10 месяцев назад
Great video, thank you Maya! Can you do a video on other use cases for fine-tuning LLMs and provide some examples?
@getlucky8952
@getlucky8952 10 месяцев назад
I'd like to get a deeper understanding of this topic. Can you please suggest any materials for this?
@maya-akim
@maya-akim 10 месяцев назад
@@alexdw5 Thanks for the feedback! That's a great idea and I think It might be the topic of my next video!
@alexdw5
@alexdw5 10 месяцев назад
@@maya-akim oh awesome! Your videos rule! I’ve subscribed and will keep an eye out for it
@maya-akim
@maya-akim 10 месяцев назад
@@getlucky8952 I just updated description box with the resources that I've been using for this video, so you can check it out! One more thing that I can recommend is perplexity.ai It does all the research for you and provides links to sources. It's very easy to research new topics this way. It's GPT4 + access to internet
@unshadowlabs
@unshadowlabs 8 месяцев назад
Thanks for the great video. Could you please provide a link to your dataset or what an example of the dataset looks like when it is formatted?
@MoeMomin
@MoeMomin 4 месяца назад
supersmart! deep understanding of complex topics! Amazing video! keep it up :)
@medoeldin
@medoeldin 7 месяцев назад
Hi Maya, great video. I love your ability to convey dense material in an easy to follow manner. With respect to finetuning a model to posses your tone of voice, what criteria should be considered when selecting a base model? Also, what is the optimal structure of a writing sample and how many samples should we incorporate for best results ? Looking forward to more great videos! Thanks!
@tk0150
@tk0150 4 месяца назад
Thanks for your clear and educational videos!
@MaJetiGizzle
@MaJetiGizzle 10 месяцев назад
Great video on simple fine-tuning with LoRA for better quality model outputs!
@volt8399
@volt8399 2 месяца назад
Thank you so much for making this video
@RichardGetzPhotography
@RichardGetzPhotography 5 месяцев назад
Another great video- Thanks!!
@1littlecoder
@1littlecoder 10 месяцев назад
Nicely made video 🎉
@maya-akim
@maya-akim 10 месяцев назад
Thanks a lot 🙏🏻
@isidoras.radojkovic2074
@isidoras.radojkovic2074 10 месяцев назад
Great video! Thank you! 👌
@davesandberg
@davesandberg 5 месяцев назад
Awesome videos! Thank you for putting them together. Sincerely appreciated! The "pacing" can be a little intense on this one....
@zZzzZz_803
@zZzzZz_803 9 месяцев назад
Thank you for this great video. Can you show how to use the saved fine tuned model directly on a different colab?
@animehypeofficial
@animehypeofficial 10 месяцев назад
Thanks for video! can you do it using another opensource model like LLaMa-2, because meta access takes time, and can you show your own dataset so we know how to organize ours, also cover like what if you have three paraments like tweet disaster prediction(kaggle) .
@echofloripa
@echofloripa 9 месяцев назад
Thanks a lot for the video! 👏😻 Can I fine tune with a questionnaire answer and question, and after train with full text files?
@youtub-user
@youtub-user 8 месяцев назад
thank you for this video could you provide the link to your dataset or an example similar to it .
@kunalr_ai
@kunalr_ai 5 месяцев назад
very beautiful video
@saviewer
@saviewer 10 месяцев назад
Great video. What sort of computing power is needed to run this? Do you run it on the cloud or locally? Thanks.
@PredictAnythingSoftware
@PredictAnythingSoftware 9 месяцев назад
She is running it in the cloud, but you can also run it in a much more user-friendly manner using the text-generation GUI. However, this approach requires a substantial amount of RAM to operate. But don't worry, the investment in resources is worthwhile. By utilizing this method, you can train your own AI model that has the potential to outperform even GPT-4 in terms of intelligence. The catch is that this AI model can achieve excellence in only one particular area, though not necessarily a comprehensive mastery across diverse tasks like GPT-4 does with its trillion parameters. Consider the analogy of specialized tools versus a Swiss Army knife. The cloud-based approach with a text-generation GUI is akin to a specialized tool that is tailored for a specific task. For instance, think of a precision instrument designed solely for crafting intricate woodwork. It excels in this task but wouldn't be ideal for opening a bottle, unlike a Swiss Army knife that can handle various tasks reasonably well. Imagine you wish to develop AI for medical diagnosis and language translation. Instead of aiming for an all-knowing AI on a consumer-grade PC, you could train one AI model meticulously for medical diagnostics and another for language translation. This focused training allows each AI to excel in its dedicated field, just like having a medical specialist and a linguistic expert. In essence, the principle here is specialization. If you want an AI that is outstanding at a specific task, it's best to concentrate its training on that area, much like how an Olympic athlete dedicates themselves to excelling in one sport. This doesn't mean your AI won't be intelligent or useful; it means it will be exceptionally proficient in its chosen field. In conclusion, the prospect of training specialized AI models, each dedicated to excelling in a particular task, is akin to cultivating experts in various fields rather than seeking an all-encompassing omniscient AI. This strategy optimizes resource usage and results in AI systems that are highly competent in their designated domains.
@gokulraja1580
@gokulraja1580 10 месяцев назад
i have an doubt , you are using lora adapter but where you freezed the pre trained weight in that code, i'm beginner. plese explain
@jamesjonnes
@jamesjonnes 10 месяцев назад
QLora can finetune quantized model. The video is very good, but I'm hesitant to request access for the Colab lol
@trackerprince6773
@trackerprince6773 6 месяцев назад
Is fine-tuning sufficient to make domain expert llm? I mean would it be better to combine fine tuning + embeddings?
@larawehbee
@larawehbee 10 месяцев назад
Great Video!! Thanks for sharing. I didnt notice before that we cannot merge the quantized model! I have few questions here: 1. Can we quantize the merged model ? I mean after merging peft adapters with the base model, can we quantize it and use the finetuned llama2 quantized model ? 2. The merged model now is HF model, how can i load it for inference? In the google colab code, you used it directly from the merged model but i want to load it from file Thanks!!
@echofloripa
@echofloripa 9 месяцев назад
Check the page "Baby Step: Fine-Tune Falcon-7B and LLaMa-7b Large Language Models for your custom datasets." It shows how to train and then load for inference.
@amparoconsuelo9451
@amparoconsuelo9451 9 месяцев назад
Can a subsequent SFT and RTHF with different, additional or lesser contents change the character, improve, or degrade a GPT model? Can you modify a GPT model? How?
@Udayanverma
@Udayanverma 7 месяцев назад
could you show how to use this trained model with steps. I have internally hosted wiki pages with loads of contents on it. how can we train the model on such unstructured content.
@khalilchi5726
@khalilchi5726 7 месяцев назад
Can we get a link to the dataset you used ?
@echofloripa
@echofloripa 9 месяцев назад
Did you say "the quantisized version has 7gigabytes as the full version is only .7 gigabytes"? Isn't the other way around?
@alasdairgrant9087
@alasdairgrant9087 3 месяца назад
I'm getting this error: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable. How to resolve?
@naveene7927
@naveene7927 10 месяцев назад
well explained ,Thank you
@Aurora12488
@Aurora12488 10 месяцев назад
Fine-tuning is to assist in *behavior*, not knowledge. Results can end up worse if you're trying to use fine-tuning to add additional knowledge to the LLM. Data lookups injected into the context are the only reliable way to assist with making LLMs have access to new data.
@maya-akim
@maya-akim 10 месяцев назад
Very well said!
@oryxchannel
@oryxchannel 9 месяцев назад
Why does everyone gloss over the feeling I have that any quantized LLM is 20% of the full model experience. It's not you alone. Quantization is accepted under the unspoken implication that it's "local" or "native" and therefore private. Yeah it's private if your cpu/gpu is powerful enough to sit through one sentence outputted per minute and not second. And a quantized version is subject to knowing things like system prompt versus standard prompt as well as fine tuning.
@geekyprogrammer4831
@geekyprogrammer4831 10 месяцев назад
Beautiful girls are also interested in AI now!
@waleedkazmi6680
@waleedkazmi6680 7 месяцев назад
Hi Maya, thank you for your video. Can you really dumb it down for a non coder. I feel a lot of people will watch your video where you teach most of this by showing how you code and what does your code do. There's a lot of us in communities that are turning towards programming because of AI.
@verasalem5071
@verasalem5071 10 месяцев назад
Can I suggest that you do not move back and forth in your chair, it's quite distracting to focus on what you are saying with a large white chair moving behind you. Other than that, this is one of the more informative compact form videos I've seen on fine tuning
@chrisBruner
@chrisBruner 10 месяцев назад
suggestion, I can't listen to your rapid fire pace of speech. Please slow down, and take a breath. I get exhausted just trying to keep up.
@fkxfkx
@fkxfkx 10 месяцев назад
Settings, how do they work?
@mikect05
@mikect05 3 месяца назад
🥣🤖feeding algo
Далее
Merge LLMs to Make Best Performing AI Model
20:17
Просмотров 40 тыс.
Eddie Hall VS Neffati Brothers
00:11
Просмотров 1,7 млн
Top 5 LLM Fine-Tuning Use Cases You Need to Know
11:04
Fine-tuning LLMs with PEFT and LoRA
15:35
Просмотров 112 тыс.
Prepare Fine-tuning Datasets with Open Source LLMs
15:22
keren sih #iphone #apple
0:16
Просмотров 1,6 млн
AI от Apple - ОБЪЯСНЯЕМ
24:19
Просмотров 116 тыс.