Anyone can Fine Tune LLMs using LLaMA Factory: End-to-End Tutorial
HTML-код
- Опубликовано: 11 сен 2024
- Welcome to an exciting journey where I guide you through the world of Large Language Model Fine-Tuning using the incredible 'LLaMA-Factory'! This tutorial is tailored for anyone eager to delve into the realm of Generative AI without getting bogged down by complex coding.
LLaMA-Factory stands out as a user-friendly fine-tuning framework that supports a variety of language models including LLaMA, BLOOM, Mistral, Baichuan, Qwen, and ChatGLM. What makes this tool remarkable is its simplicity and effectiveness, allowing you to learn and fine-tune language models with just a few clicks.
In this video, I demonstrate how effortlessly you can fine-tune these models using a no-code tool within Google Colab Pro, leveraging powerful GPUs like the V100 or A100. Whether you're a beginner or an experienced enthusiast in Generative AI, this tutorial will unlock new potentials in your language model projects.
Key Highlights:
1. Introduction to LLaMA-Factory and its capabilities
2. Step-by-step guide on fine-tuning different language models
3. Tips for optimizing performance with Google Colab Pro's GPUs
4. Practical examples to get you started immediately
Remember, the world of Generative AI is vast, and with tools like LLaMA-Factory, it's more accessible than ever. So, if you find this tutorial helpful, please hit the 'Like' button, share it with your friends, and subscribe to the channel for more content on Generative AI and language model fine-tuning. Your support helps me create more helpful content like this.
Let's dive into the world of easy and powerful language model fine-tuning together!
LLaMA Factory here: github.com/hiy...
Fine Tuning Playlist: • Fine Tuning of LLMs
Join this channel to get access to perks:
/ @aianytime
#generativeai #ai #llm
00:05 LLAMA Factory makes fine-tuning large language models accessible to anyone.
02:23 Llama Factory provides a framework for fine-tuning LLMs on various datasets and models.
06:42 LLAMA Factory can be set up locally or on the public cloud as per your requirement.
08:48 Importance of understanding large language models and the need for sustainable growth in your career
12:59 Defining prompt, query, and response for fine-tuning LLMs
15:19 Using LLaMA Factory for fine tuning LLMs
19:33 Advanced configuration and quantization are crucial for model loading and performance.
21:30 Adjusting the LLM pre-training parameters for compute constraints.
25:29 Fine-tuning LLMs using LLaMA Factory: Model weight download and training process
27:13 Model is generalizing well and not overfitting.
30:57 Fine-tuning LLMs with LLaMA Factory for Docker related queries
32:49 LLMs can be fine-tuned easily with personalization options
I just able to fine tune to build my own SQLGPT... Thank you so much sir 🙏
Tell us how. Make a tutorial series
how you saved the model , can you please guide me
@@animeshdas4516 LLaMA Factory creates a folder at "{where you installed LLaMA Factory}/saves/{model name}/lora/train_{date}/trained_adapters.safetensors". I believe that this is either the Low Rank Adaptation or the entire new model, but I'll have to try myself. I'll edit this message when I'm done too ;)
@@animeshdas4516 I see now. At the tab "Train", "Evalute & Predict" and so on, at the right, there is a "Export" Tab.
amazing content. thank you for sharing your knowledge. cybersecurity engineer here but im super intrigued by LLMs. im going to try to finetune a chat model on my own proprietary data next
very cool stuff. I didn't realize how deep the hugging face web site was. I just did a fine tune with openai and creating my own dataset was time intensive. Now I'll look at HF to see if someone has made a dataset. I'd love to see a video on building a docker container to host an LLM and how to do some basic things with a model loaded in a Docker. One thing is, how would you store all user input/model output to automate the generation of new training data once your app is in production and you need to monitor its performance in real-time.
Thank you for the great work! Keep up creating these useful and concise videos.
Interest jagaa diyaa aapne LLMs mein. Dhanyawaad:)
Enjoy..... All the best
I think you are the best youtuber out there, could you male a course for newbies about all of this, cause we got a lot of confussion about AI, deep learning, machine learning, LLM, LMM, LLMs, fine tunning, models, datasets, parameters, tokens etc... Nobody did a course from SCRATCH EXPLAINING all this concepts, could you make one or how can I learn all of this? Some courses or resources for non technical people, I just want to understand all of this and how can I insert my data and make a better AI for my things or some other things.. I dont't understand what is the BEST AI for generate code, why some understand spanish and others dont etc etc
One fine-tuning question NO ONE has been able to explain to me bhai -
How does one go about fine-tuning when the source is a non-fiction book? It needs to be ‘fine-tuning’ specifically. So then, what kind of data preparation I need to do with the book contents (TEXT file). Thoda detail mein explanation mil jaaye toh samajh aaye. Thank you 🙏🏼
you would have to have the text of the book as a text document. The characters, narration from the book could then be broken down sentence by sentence in order with the names of the character (or narrator) who is speaking and or describing what is going on in the story. You can then have an an AI model GPT4, Llama2, Mistral+++, create your dataset(s) following the rules for how the dataset should be prepared for the particular LLM (GPT4, Llama2, Mistral+++). Hope this explanation is helpful. All the best
I can't get llama 2 to work, or llama 3 for that matter, and every single tutorial video I've seen for Llama Factory isn't using a llama model at all : /
Excellent work!!!!!!
Waoow, el internet de las cosas le van a agradecer porque muchas cosas se van a automatizar sin mucho codigo. Gracias.
Hi , I became your subscriber today :) , Nice work indeed ..Can you please help which video you have shown , " How to create your own dataset for fine tuning"
Very nice and informatic tutorial of fine tuning. I have one question that what is the difference between agents and fine tuning ?As in both cases we are loading our local dataset and from there we can do the chat.
hey, can you help us by making a video about how do you learn all these new concepts, what are those fundamentals or pre-requisite that you have learned which helps you in learning these things very easily?
Thank you for the amazing content
best video about LLaMA Factory in youtube, but please show how to save the model and push to hugging face with this LLaMa factory .
Thank you.
Great video and efforts. Question. If I had a dataset that has questions only not question-answer pair. Is it possible to make the llm iterate over the questions in the dataset and generate responses for these questions?
it will be great to see how you do it with pdf.. do you clean first the pdf.. or will LamaFactory will take care of that?
While export directory path getting error even i tried to add colab one single folder path, and tried drive folder path to save the trained model its not working.
I liked the video just because you like Manchester United!!!
Thank you. #red #united
Does this mean we can train a LORA? Does fine tune mean train a lora file that we could use in a program like koboldcpp, of which Silly Tavern connects to?
Does it collect our private data while finetuning by any chance?
@AIAnytime we have trained the model, but how we can serve the trained custom LLM model as api end-point
How to push the fine tuned. Model to hf hub ?.While exporting the model the gradio interface show error
Which path to specify for export "Export dir
Directory to save exported model." ? I specify this path for the files and the page is reset. Help /content/LLaMA-Factory/saves.
very good , videos , but i ma getting issue on implementing imbedings with greater sequence length like Jina ai jinaai/jina-embeddings-v2-base-en , if there is aw y ican use it hlep it has 8k tokesn , i was implementing RAG a asked longer question and it say max token or sequcnce maybe i was using BGE large imbedding wich has 512 sequence and Qdrant , thank you
Please also show how to push and access the finetuned model on huggingface
hi lets say dataset to be like different type of column how to handle that in data_info like this name some dates,sl nos, phone number this type of heading on dataset how to map?
Any resource to learn fine tuning? I am beginner but can learn quickly.
okay i am facing an error of connecton errored out on gradio web when the process goes on checking shards checkpoints stage , i tried changing browser , clearing cache it was working fine a day and erroed out on next day. Please if you can help me !! Anyone
What is the best model to fine tune for a rare DSL new programming language? It's fully documented but is not popular yet, and I need to use it (called "Verse" for unreal engine in Fortnite) don't know which model to fine tune for it
At which minute do you explain it? Thanks in advance
excellent content. I advise you get a more professional microphone setup with a pop shield. it will pay dividends quickly.
Thanks for writing. I will setup once I have some funds 🙂
My disk is full while training the model where should i get more storage other than google collab
Try Runpod. Watch my second last video where I have shown how one can use Runpod.
Good video, but you need to turn off the echo on your mic since it makes it hard to understand you. Thanks.
Thanks for the tip
Excellent video.can i use the fi etu ed llm to execute the docker commands on my docker.Or for example if i finetune with an sql dataset how can i use the model to execute the sql qyeries on my database and bring me the results in natural language format?
Pls watch the video completely. I have explained that.
Bhai, ring light ke saath chashma? 😅 Dost, aankhein darawni lag rahee hain. 😉
Haha. I also observed that. Thanks for pointing out. Next video se will not use that.
It kinda sounds like you have a headset microphone and computer microphone at the same time,
Thanks for sharing knowledge. & Dude. You look so much like Sundar Pichai. Are you his brother or sth?
can someone tell me where can i fine tune my model for free
can you give address in hugging face to your finetuned model ?
00:05 LLAMA Factory makes fine-tuning large language models accessible to anyone.
02:23 Llama Factory provides a framework for fine-tuning LLMs on various datasets and models.
06:42 LLAMA Factory can be set up locally or on the public cloud as per your requirement.
08:48 Importance of understanding large language models and the need for sustainable growth in your career
12:59 Defining prompt, query, and response for fine-tuning LLMs
15:19 Using LLaMA Factory for fine tuning LLMs
19:33 Advanced configuration and quantization are crucial for model loading and performance.
21:30 Adjusting the LLM pre-training parameters for compute constraints.
25:29 Fine-tuning LLMs using LLaMA Factory: Model weight download and training process
27:13 Model is generalizing well and not overfitting.
30:57 Fine-tuning LLMs with LLaMA Factory for Docker related queries
32:49 LLMs can be fine-tuned easily with personalization options