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

Комментарии • 58

  • @sailakkshmi9840
    @sailakkshmi9840 7 месяцев назад +6

    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

  • @user-iu4id3eh1x
    @user-iu4id3eh1x 8 месяцев назад +6

    I just able to fine tune to build my own SQLGPT... Thank you so much sir 🙏

    • @latlov
      @latlov 8 месяцев назад +2

      Tell us how. Make a tutorial series

    • @animeshdas4516
      @animeshdas4516 6 месяцев назад

      how you saved the model , can you please guide me

    • @QuickTechNow
      @QuickTechNow 24 дня назад

      @@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 ;)

    • @QuickTechNow
      @QuickTechNow 24 дня назад

      @@animeshdas4516 I see now. At the tab "Train", "Evalute & Predict" and so on, at the right, there is a "Export" Tab.

  • @AOSRoyal
    @AOSRoyal 8 месяцев назад +2

    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

  • @EmilioGagliardi
    @EmilioGagliardi 8 месяцев назад +3

    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.

  • @RaghavendraK458
    @RaghavendraK458 8 месяцев назад +1

    Thank you for the great work! Keep up creating these useful and concise videos.

  • @soulfuljourney22
    @soulfuljourney22 6 месяцев назад

    Interest jagaa diyaa aapne LLMs mein. Dhanyawaad:)

    • @AIAnytime
      @AIAnytime  6 месяцев назад

      Enjoy..... All the best

  • @chemaalonso7931
    @chemaalonso7931 7 месяцев назад

    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

  • @LoneRanger.801
    @LoneRanger.801 8 месяцев назад +2

    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 🙏🏼

    • @gkennedy_aiforsocialbenefit
      @gkennedy_aiforsocialbenefit 7 месяцев назад

      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

  • @HuemanInstrumentality
    @HuemanInstrumentality 4 месяца назад

    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 : /

  • @dr.aravindacvnmamit3770
    @dr.aravindacvnmamit3770 7 месяцев назад

    Excellent work!!!!!!

  • @FredyGonzales
    @FredyGonzales 8 месяцев назад

    Waoow, el internet de las cosas le van a agradecer porque muchas cosas se van a automatizar sin mucho codigo. Gracias.

  • @rudrachand6643
    @rudrachand6643 7 месяцев назад +1

    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"

  • @souravbarua3991
    @souravbarua3991 8 месяцев назад

    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.

  • @FinComInvestNegoSaleStart
    @FinComInvestNegoSaleStart 5 месяцев назад

    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?

  • @mcmarvin7843
    @mcmarvin7843 8 месяцев назад

    Thank you for the amazing content

  • @animeshdas4516
    @animeshdas4516 6 месяцев назад

    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.

  • @Mr.AIFella
    @Mr.AIFella 8 месяцев назад +1

    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?

  • @fabsync
    @fabsync 4 месяца назад

    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?

  • @harishapc2214
    @harishapc2214 6 месяцев назад

    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.

  • @ihaveacutenose
    @ihaveacutenose 6 месяцев назад

    I liked the video just because you like Manchester United!!!

    • @AIAnytime
      @AIAnytime  6 месяцев назад

      Thank you. #red #united

  • @gargantuan6241
    @gargantuan6241 6 месяцев назад

    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?

  • @NehalVaghasiya
    @NehalVaghasiya 4 месяца назад

    Does it collect our private data while finetuning by any chance?

  • @user-ew4lg3th6h
    @user-ew4lg3th6h 7 месяцев назад

    @AIAnytime we have trained the model, but how we can serve the trained custom LLM model as api end-point

  • @AMANSINGH-st8tu
    @AMANSINGH-st8tu 8 месяцев назад

    How to push the fine tuned. Model to hf hub ?.While exporting the model the gradio interface show error

  • @Gepe
    @Gepe 8 месяцев назад

    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.

  • @Cedric_0
    @Cedric_0 8 месяцев назад

    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

  • @prathamshah2058
    @prathamshah2058 6 месяцев назад

    Please also show how to push and access the finetuned model on huggingface

  • @DailyDigitalNews
    @DailyDigitalNews 2 месяца назад

    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?

  • @user-lw2mk2yz8b
    @user-lw2mk2yz8b 7 месяцев назад

    Any resource to learn fine tuning? I am beginner but can learn quickly.

  • @_vismayJain
    @_vismayJain 7 месяцев назад

    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

  • @babyfox205
    @babyfox205 6 месяцев назад

    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

  • @myrulezzz3533
    @myrulezzz3533 8 месяцев назад

    At which minute do you explain it? Thanks in advance

  • @ericadar
    @ericadar 6 месяцев назад

    excellent content. I advise you get a more professional microphone setup with a pop shield. it will pay dividends quickly.

    • @AIAnytime
      @AIAnytime  6 месяцев назад

      Thanks for writing. I will setup once I have some funds 🙂

  • @Lyricverse116
    @Lyricverse116 8 месяцев назад

    My disk is full while training the model where should i get more storage other than google collab

    • @AIAnytime
      @AIAnytime  8 месяцев назад +1

      Try Runpod. Watch my second last video where I have shown how one can use Runpod.

  • @volmarrwyrd
    @volmarrwyrd Месяц назад

    Good video, but you need to turn off the echo on your mic since it makes it hard to understand you. Thanks.

  • @myrulezzz3533
    @myrulezzz3533 8 месяцев назад

    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?

    • @AIAnytime
      @AIAnytime  8 месяцев назад

      Pls watch the video completely. I have explained that.

  • @LoneRanger.801
    @LoneRanger.801 8 месяцев назад

    Bhai, ring light ke saath chashma? 😅 Dost, aankhein darawni lag rahee hain. 😉

    • @AIAnytime
      @AIAnytime  8 месяцев назад

      Haha. I also observed that. Thanks for pointing out. Next video se will not use that.

  • @Jason-ju7df
    @Jason-ju7df 8 месяцев назад

    It kinda sounds like you have a headset microphone and computer microphone at the same time,

  • @munawarabbasi9683
    @munawarabbasi9683 6 месяцев назад

    Thanks for sharing knowledge. & Dude. You look so much like Sundar Pichai. Are you his brother or sth?

  • @saviosunnyrajagiri1347
    @saviosunnyrajagiri1347 5 месяцев назад +2

    can someone tell me where can i fine tune my model for free

  • @jasympa4894
    @jasympa4894 8 месяцев назад

    can you give address in hugging face to your finetuned model ?

  • @mabud_alam
    @mabud_alam 7 месяцев назад +1

    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