LLM Fine Tuning Crash Course: 1 Hour End-to-End Guide

Поділитися
Вставка
  • Опубліковано 5 вер 2024
  • Welcome to my comprehensive tutorial on fine-tuning Large Language Models (LLMs)! In this 1-hour crash course, I dive deep into the essentials and advanced techniques of LLM fine-tuning. This video is your gateway to understanding and applying cutting-edge methods like LoRA, QLoRA, PEFT, and more in your LLM projects.
    🔍 What You'll Learn:
    LoRA - Low-Rank Adaptation: Discover how LoRA revolutionizes parameter-efficient tuning and how to select the optimal settings for custom LLM training.
    QLoRA - Quantized Low-Rank Adaptation: Understand the nuances of QLoRA for memory-efficient fine-tuning.
    PEFT - Parameter-Efficient Fine-Tuning: Explore the transformative approach of PEFT, its pros and cons, and how it optimizes LLMs for specific tasks.
    GPU Selection for Fine-Tuning: Get practical tips on choosing the right GPU for your project, with RunPod as an example.
    Axolotl Tool Overview: Learn how Axolotl simplifies the fine-tuning process, supporting a range of models and configurations.
    Hyperparameter Optimization: Gain insights into tweaking hyperparameters for optimal performance.
    👨‍💻 Features of Axolotl:
    Train models like llama, pythia, falcon, mpt.
    Supports techniques including fullfinetune, lora, qlora, relora, and gptq.
    Customize via YAML or CLI, handle various datasets, and integrate advanced features like xformer and multipacking.
    Utilize single or multiple GPUs with FSDP or Deepspeed.
    Log results to wandb, and more.
    Whether you're a beginner or an experienced AI practitioner, this video equips you with practical knowledge and skills to fine-tune LLMs effectively. I'll guide you through each step, ensuring you grasp both the theory and application of these techniques.
    👍 If you find this video helpful, please don't forget to LIKE and COMMENT! Your feedback is invaluable, and it helps me create more content tailored to your learning needs.
    🔔 SUBSCRIBE for more tutorials on Gen AI, machine learning, and beyond. Stay tuned for more insights and tools to enhance your AI journey!
    Axolotl GitHub: github.com/Ope...
    Join this channel to get access to perks:
    / @aianytime
    #llm #generativeai #ai

КОМЕНТАРІ • 91

  • @user-hg4hg5ix7f
    @user-hg4hg5ix7f 8 місяців тому +37

    bro we really needed a serie like this is a complex topic with too many and disordered infos on the entire internet. please keep it going !

    • @AIAnytime
      @AIAnytime  8 місяців тому +9

      More to come!

    • @akashsalmuthe9846
      @akashsalmuthe9846 7 місяців тому +4

      @@AIAnytime We would like to see how to Fine tuning LLAVA

  • @user-xr8hh1sk6k
    @user-xr8hh1sk6k 8 місяців тому +6

    I just wanted to say a big thank you for creating this playlist. Your videos are amazing because they explain things in an easy way that I can understand.
    Learning about fine-tuning models can be really tricky, but your videos make it much simpler. They've been a huge help for me. I appreciate how you break down difficult ideas and make them easier to grasp.
    Your videos have made a big difference for me. Thank you so much for putting in the effort to teach us. I'm excited to watch more of your videos in the future!

  • @ash142k4
    @ash142k4 4 місяці тому +6

    00:05 Introduction to fine-tuning large language models
    02:25 Three approaches: pre-training, fine-tuning, Lowa and Q Laura
    07:36 Tokenizing and vocab are crucial for data preparation.
    10:47 Language Model Fine Tuning
    16:28 Fine-tuning involves task-specific data sets and optimizing model parameters.
    19:01 Fine tuning involves adjusting pre-trained model parameters and using gradient-based optimization algorithms.
    23:52 LLM fine-tuning has memory reduction benefits.
    26:01 Quantization provides lossless performance and massive memory reductions
    30:18 Options for renting GPUs or using a GPU
    32:20 Diversify data for better model performance
    36:23 Configuring and setting up LLM Fine Tuning
    38:13 Installing required libraries using pip.
    42:28 Fine-tuning process and data downloading
    44:39 Fine tuning process completed in about 2 hours
    48:42 Demonstrating the usage of interface and generating responses
    50:40 Understanding the LLM fine-tuning process
    55:40 Improved memory efficiency enables fine-tuning tasks
    57:47 Lura paper recommends rank of 8 for better results, with flexibility to adjust for computational power.
    1:02:12 Fine-tuning process explained
    1:04:48 Understanding the naming convention of the model layers
    1:08:53 Quantization techniques and new data type nf4 are crucial for LLM fine tuning.
    1:10:53 Hyperparameters in gradient descent
    1:15:34 Learning rate determines the speed of model improvement.
    1:17:37 Summary of pre-training, fine-tuning, and low-code tool for language models.
    Crafted by Merlin AI.

  • @RICHARDSON143
    @RICHARDSON143 8 місяців тому +5

    Aha I not even able to sit in class during my btech but now I don't know how I am focusing on your vedios for such a long time without getting bored finally got some idea on tuning my data thanks bro wish u happy new years last and first vedio Is this crash course ❤

    • @AIAnytime
      @AIAnytime  8 місяців тому +1

      Loved the comment... Keep developing skills in your Btech days.

    • @RICHARDSON143
      @RICHARDSON143 8 місяців тому

      @@AIAnytime completed btech in 2020 now I was in infosys, and thanks for that medical chatbot I have modified that and used to create one for my team love you and your Playlist.

  • @sivi3883
    @sivi3883 7 місяців тому +5

    Awesome video man! You sound very humble and really appreciate helping beginners like me. Can't wait for the next set of videos!

  • @Hellow_._
    @Hellow_._ 7 місяців тому +2

    on the point. simple in explanation. required video. looking for this kind of content since month

    • @AIAnytime
      @AIAnytime  7 місяців тому +1

      Glad it was helpful!

  • @neev091
    @neev091 3 місяці тому

    Love your work brother 😊. As a Chatbot Devloper working on GenAI Stack had to fine tune my model. This video helped. Gratitude!

  • @99bkchang
    @99bkchang 3 місяці тому

    An awesome, excellent and clear explain on fine tunning! I think most of us will excited your next video on Unsloth!

  • @RanjeetKumar_23
    @RanjeetKumar_23 2 місяці тому

    Thanks for uploading such valuable content. I have recently started learning about LLMs, and your content has been one of the best. 🚀

  • @bec_Divyansh
    @bec_Divyansh 8 місяців тому +2

    Great Initiative Sonu! Will have this playlist on my things to do in the new year! Thanks a lot for your efforts.

  • @CalifaEl
    @CalifaEl 2 місяці тому

    This man is doing God's work!!! Much appreciated information

  • @LucesLab
    @LucesLab 8 місяців тому +2

    Great topics, excellent! . Pls ot would be great explaining how to prepare dataset properly. Keep doing this kind of videos!

  • @MuhammadAdnan-tq3fx
    @MuhammadAdnan-tq3fx 4 місяці тому

    for learning GenAI this channel is best.

  • @pallavggupta
    @pallavggupta 8 місяців тому

    Thanks for the video, one of the things everyone wants to know is how do we create a dataset for our own specific data

  • @thangarajerode7971
    @thangarajerode7971 8 місяців тому +2

    Thanks for detailed information.Please create the video fine-tuning local llm model with local dataset example may be pdf,doc or csv

    • @AIAnytime
      @AIAnytime  8 місяців тому +1

      As soon as possible

  • @varunachar4195
    @varunachar4195 8 місяців тому

    I just loved it. Simple and crisp.
    Can you please make a video on how to build custom langchain RAG Agents like creating our own function and pass it as a tool to the agents

  • @chaithanyavamshi2898
    @chaithanyavamshi2898 8 місяців тому +1

    Thank you ! Also please cover how to prepare a dataset for fine tuning most of them do not cover this topic. I request you to please emphasize on importance of creating high quality dataset and data preparation for fine tuning

    • @AIAnytime
      @AIAnytime  8 місяців тому +5

      Absolutely, that's the next video. It's a playlist. So expect 10-12 videos in this series.

    • @user-fv6nc7qi2x
      @user-fv6nc7qi2x 8 місяців тому +1

      @@AIAnytime im excited to see that as well as im curious to see what stuff u will cover throughout the series

  • @josephj1643
    @josephj1643 5 місяців тому

    Subscribed right away! Exactly what I wanted to learn!

  • @protimaranipaul7107
    @protimaranipaul7107 7 місяців тому

    Thank you share such wonderfull video! Waiting for a video that discuss about finetuning large text and the following
    Have you or any person worked with the folloing?
    0) How did we measure performance after fine tuning? Did they perform well? Perplexity?
    1) Json files? Creating graphs to store the context?
    2) and or Large csv/sql file? As llama code sql code is not working well
    3) Any image/diffusion models?
    Appreciate it!

  • @nunoalexandre6408
    @nunoalexandre6408 8 місяців тому

    Love it!!!!!!! Thank you and Have a Fantastic year of 2024!!!!!!!!!!!!!!

    • @AIAnytime
      @AIAnytime  8 місяців тому

      Thank you! I wish you a very happy new year 🎊..More in 2024.

  • @kevon217
    @kevon217 7 місяців тому

    excellent tutorial. Appreciate your tips and explanations.

    • @AIAnytime
      @AIAnytime  7 місяців тому

      Glad it was helpful!

  • @muhammedajmalg6426
    @muhammedajmalg6426 7 місяців тому

    really appreciate your work, go ahead brother!

    • @AIAnytime
      @AIAnytime  7 місяців тому

      Thank you, I will

  • @dinonovak743
    @dinonovak743 7 місяців тому +1

    Hi, excellent video. As you as using axolotl can you please advises how to set up dataset in yaml for Mistral Instruct model. I have dataset where text field is set up as [INST] {instruction} {question}[/INST] {response} format. also all other fields are separate so I am struggling how to define dataset in yaml correctly

  • @programwithpradhan
    @programwithpradhan 8 місяців тому

    Really excited for the playlist 😃

  • @rakeshkumarrout2629
    @rakeshkumarrout2629 8 місяців тому

    This is really useful. Can you share any dedicated video on instruction tuning??

  • @reynoldoramas3138
    @reynoldoramas3138 8 місяців тому

    Really nedeed series, thank you for the awesome content.

  • @satheeshthangaraj5614
    @satheeshthangaraj5614 8 місяців тому

    Thank You, most expected video

  • @user-iu4id3eh1x
    @user-iu4id3eh1x 8 місяців тому

    This is what I needed.... Thanks bro

  • @SanjayBakshi-ih3ec
    @SanjayBakshi-ih3ec 4 місяці тому

    Thx for detailed and nicely paced video. Can you please share your scratch pad? Thx...

  • @himanipriyadarshini3990
    @himanipriyadarshini3990 7 місяців тому

    In video sometimes your handwritten slides don't visible as you stayed on github. So from where i can find the notes? Great video..Enjoyed thoroughly.

  • @sushicommander
    @sushicommander 6 місяців тому

    What if you don't have pairs? for example, if you wanted to finetune a LLM on a writing style and your source material is hypothetically books or essays.

  • @d_e_e_p_a_k_000
    @d_e_e_p_a_k_000 4 місяці тому

    Can suggest any course or liks, articals for beginners or who so ever want to learn LLM ?

  • @kanshkansh6504
    @kanshkansh6504 7 місяців тому

    Can you do a tutorial on yarn method of fine tuning to increase context length

  • @asiddiqi123
    @asiddiqi123 6 місяців тому

    Can you make a video of fine tuned LLM for social media posts that also consider pdf files besides training set?

  • @narendraparmar1631
    @narendraparmar1631 5 місяців тому

    Thanks for the explaination

  • @nimesh.akalanka
    @nimesh.akalanka 4 місяці тому

    How can I fine-tune the LLAMA 3 8B model for free on my local hardware, specifically a ThinkStation P620 Tower Workstation with an AMD Ryzen Threadripper PRO 5945WX processor, 128 GB DDR4 RAM, and two NVIDIA RTX A4000 16GB GPUs in SLI? I am new to this and have prepared a dataset for training. Is this feasible?

  • @Ajmal_Yazdani
    @Ajmal_Yazdani 8 місяців тому

    Great Initiative Sonu bhai! Do you have a good book suggestion around this?

  • @thangarajerode7971
    @thangarajerode7971 6 місяців тому

    In this video you have mentioned the fine tune playlist will be created with various model. Is this done? , Is it available to private membership subscriber?. Could you pls share the procedure/plan to join the membership?

  • @ramp2011
    @ramp2011 8 місяців тому

    Great video. Thank you for sharing. What are other pakacges like Axolotl? Thank you

  • @juanrozo95
    @juanrozo95 7 місяців тому

    When i try to do accelerate, the output console send me that: /bin/bash: line 1: accelerate: command not found
    What i do for fix that? Thanks master

  • @mcmarvin7843
    @mcmarvin7843 8 місяців тому

    Keep them coming....

  • @VijayDChauhaan
    @VijayDChauhaan 7 місяців тому

    Can anyone help me for the google colab payment method, I am having trouble making payment through SBI debit card, if anyone has made successful payment could specify which bank debit card you used?

  • @gerenier2271
    @gerenier2271 7 місяців тому

    Awesome project!

  • @researchforumonline
    @researchforumonline 6 місяців тому

    Thanks from Englad!

  • @user-rp9ec1fz1n
    @user-rp9ec1fz1n 8 місяців тому

    Thank you for your efforts to the community :))) I wanted to know if you have a video/resource where instead of giving the prompt to query the entire pdf , I want to query my prompt to each page of pdf in a loop to get answers from LLM instead querying the entire pdf and get the output of each page from the prompt into a csv ¿

  • @muhammedaslama9908
    @muhammedaslama9908 5 місяців тому

    Can i get your written notes that you are casting in the videos ?

  • @susdoge3767
    @susdoge3767 6 місяців тому +1

    saviour

  • @PrathameshShete-ik2xo
    @PrathameshShete-ik2xo 7 місяців тому

    I want to create classifier for review moderation can you suggest me how can I start for training I had 2k rows of dataset only 😢 please help me anyone..

  • @andresrubio2015
    @andresrubio2015 7 місяців тому

    Top as always

  • @deepakwalia9878
    @deepakwalia9878 8 місяців тому

    Keep up the good work 🙌🙌

  • @user-wo7nn8eh3p
    @user-wo7nn8eh3p 7 місяців тому

    This is great!

  • @adityashinde436
    @adityashinde436 8 місяців тому

    i am planning to fine tune mixtral model which might take about $5 in runpod, whats the procedure to deploy that fine tune model and use it whenever we want (will it cost more)

  • @protimaranipaul7107
    @protimaranipaul7107 7 місяців тому

    Facing ERROR: Cannot install None and axolotl[deepspeed-configs,flash-attn]==0.4.0 because these package versions have conflicting dependencies.

    • @protimaranipaul7107
      @protimaranipaul7107 7 місяців тому

      Only started to work with docker on runpod, lets see

  • @gangs0846
    @gangs0846 8 місяців тому

    Fantastic

  • @siliconberry
    @siliconberry 6 місяців тому

    Thanks!

    • @AIAnytime
      @AIAnytime  6 місяців тому

      Thanks for your support.

  • @rajjaiswal1637
    @rajjaiswal1637 8 місяців тому

    thank you sir

  • @mssandy123
    @mssandy123 7 місяців тому

    bro! the screen is frozen at 1.00.00. Great video BTW!

  • @ramrayavarapu7321
    @ramrayavarapu7321 6 місяців тому

    can i get your written notes that you are casting in the videos
    brother!

  • @fraternitas5117
    @fraternitas5117 5 місяців тому

    coding starts at 39:56

  • @rewatiramansingh3534
    @rewatiramansingh3534 Місяць тому

    i need ur notes where u explained these

  • @SonGoku-pc7jl
    @SonGoku-pc7jl 6 місяців тому

    wow, increible :)

  • @simplyviki
    @simplyviki 7 місяців тому

    may be its just me, but this is just like any other video on internet, couldn't understand the actual implementation strategy of lora, basic concepts are same in other videos too. But good try, thanks

  • @fitandvirile
    @fitandvirile 5 місяців тому

    What about RAG?

  • @PaulSchwarzer-ou9sw
    @PaulSchwarzer-ou9sw 8 місяців тому

    🎉🎉

  • @user-xj9ce6pl4v
    @user-xj9ce6pl4v 8 місяців тому

    Can you share the notes for this please?

  • @loknathbasak1533
    @loknathbasak1533 7 місяців тому

    Any upate?

  • @airlow6784
    @airlow6784 4 місяці тому

    Е*ать мои панамские веники, так чётко всё объяснил, что я даже и не знаю, как жить с этим дальше.....

  • @datahacker1405
    @datahacker1405 6 місяців тому

    Bro are you from Bihar

    • @AIAnytime
      @AIAnytime  6 місяців тому +1

      Partially, Yes.

    • @datahacker1405
      @datahacker1405 6 місяців тому

      @@AIAnytime gazab guru thanks for the content.

  • @MrKB_SSJ2
    @MrKB_SSJ2 7 місяців тому

    34:00

  • @funnyfails_official
    @funnyfails_official 6 місяців тому

    stop focusing on writing and wasting our time. I just wasted 60 mins in your 80 mins video just seeing your type. Rest 20 mins was worth it

  • @Coding_Buddy
    @Coding_Buddy 7 місяців тому +1

    crashed Blah blahh..blah

  • @sailakkshmi9840
    @sailakkshmi9840 6 місяців тому +1

    00:05 Introduction to fine-tuning large language models
    02:25 Three approaches: pre-training, fine-tuning, Lowa and Q Laura
    07:36 Tokenizing and vocab are crucial for data preparation.
    10:47 Language Model Fine Tuning
    16:28 Fine-tuning involves task-specific data sets and optimizing model parameters.
    19:01 Fine tuning involves adjusting pre-trained model parameters and using gradient-based optimization algorithms.
    23:52 LLM fine-tuning has memory reduction benefits.
    26:01 Quantization provides lossless performance and massive memory reductions
    30:18 Options for renting GPUs or using a GPU
    32:20 Diversify data for better model performance
    36:23 Configuring and setting up LLM Fine Tuning
    38:13 Installing required libraries using pip.
    42:28 Fine-tuning process and data downloading
    44:39 Fine tuning process completed in about 2 hours
    48:42 Demonstrating the usage of interface and generating responses
    50:40 Understanding the LLM fine-tuning process
    55:40 Improved memory efficiency enables fine-tuning tasks
    57:47 Lura paper recommends rank of 8 for better results, with flexibility to adjust for computational power.
    1:02:12 Fine-tuning process explained
    1:04:48 Understanding the naming convention of the model layers
    1:08:53 Quantization techniques and new data type nf4 are crucial for LLM fine tuning.
    1:10:53 Hyperparameters in gradient descent
    1:15:34 Learning rate determines the speed of model improvement.
    1:17:37 Summary of pre-training, fine-tuning, and low-code tool for language models.

    • @AIAnytime
      @AIAnytime  6 місяців тому

      Thanks for the summary.