Generative AI Fine Tuning LLM Models Crash Course

Поделиться
HTML-код
  • Опубликовано: 8 фев 2025
  • This video is a crash course on understanding how finetuning on LLM models can be performed uing QLORA,LORA, Quantization using LLama2, Gradient and Google Gemma model. This crash course includes both theoretical intuition and practical intuition on making you understand how we can perform finetuning.
    Timestamp:
    00:00:00 Introduction
    00:01:20 Quantization Intuition
    00:33:44 Lora And QLORA Indepth Intuition
    00:56:07 Finetuning With LLama2
    01:20:16 1 bit LLM Indepth Intuition
    01:37:14 Finetuning with Google Gemma Models
    01:59:26 Building LLm Pipelines With No code
    02:20:14 Fine tuning With Own Cutom Data
    Code Github: github.com/kri...
    -------------------------------------------------------------------------------------------------
    Support me by joining membership so that I can upload these kind of videos
    / @krishnaik06
    -----------------------------------------------------------------------------------
    ►Generative AI On AWS: • Starting Generative AI...
    ►Fresh Langchain Playlist: • Fresh And Updated Lang...
    ►LLM Fine Tuning Playlist: • Steps By Step Tutorial...
    ►AWS Bedrock Playlist: • Generative AI In AWS-A...
    ►Llamindex Playlist: • Announcing LlamaIndex ...
    ►Google Gemini Playlist: • Google Is On Another L...
    ►Langchain Playlist: • Amazing Langchain Seri...
    ►Data Science Projects:
    • Now you Can Crack Any ...
    ►Learn In One Tutorials
    Statistics in 6 hours: • Complete Statistics Fo...
    End To End RAG LLM APP Using LlamaIndex And OpenAI- Indexing And Querying Multiple Pdf's
    Machine Learning In 6 Hours: • Complete Machine Learn...
    Deep Learning 5 hours : • Deep Learning Indepth ...
    ►Learn In a Week Playlist
    Statistics: • Live Day 1- Introducti...
    Machine Learning : • Announcing 7 Days Live...
    Deep Learning: • 5 Days Live Deep Learn...
    NLP : • Announcing NLP Live co...
    ---------------------------------------------------------------------------------------------------
    My Recording Gear
    Laptop: amzn.to/4886inY
    Office Desk : amzn.to/48nAWcO
    Camera: amzn.to/3vcEIHS
    Writing Pad:amzn.to/3OuXq41
    Monitor: amzn.to/3vcEIHS
    Audio Accessories: amzn.to/48nbgxD
    Audio Mic: amzn.to/48nbgxD

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

  • @am4_m037
    @am4_m037 Месяц назад +1

    Timestamps (Powered by Merlin AI)
    00:02 - Learn how to perform fine tuning with LLm models in a crash course
    02:06 - This video will discuss about model quantization and its techniques.
    07:00 - Reducing memory usage for large models
    09:20 - Quantization reduces memory usage for faster inferencing
    14:01 - Quantization is crucial for compressing data efficiently.
    16:18 - Converting 32-bit weights to unsigned 8-bit values
    20:55 - Converting 32-bit number to unsigned inate range of 0 to 255.
    23:05 - Scale factor conversion from fp32 bit to U in 8
    27:41 - Quantisation is the process of converting high precision 32-bit values into smaller bits.
    30:06 - Post training quantization and quantization aware training are two techniques for creating quantized models.
    34:37 - LLA is crucial for finetuning LLM models
    36:48 - Models are pre-trained with large datasets for predicting next words.
    40:53 - The challenge of updating all weights in full parameter fine tuning
    43:11 - Tracking changes in fine tuning of weights
    47:29 - Decomposing bigger matrices into smaller ones reduces required parameters.
    49:33 - Metrix decomposition reduces trainable parameters.
    53:34 - Techniques for reducing parameters in Laura and CLA models
    55:31 - Convert model from 16bit to 4bit using quantization technique NH4
    59:29 - Using open source LLM models and specific prompts for fine-tuning data sets
    1:01:26 - Data set conversion using Llama 2 template
    1:04:57 - Training a fine-tuned model using a Lama 27b chart HF model with specific parameters.
    1:06:53 - Explanation of 4bit base model and parameters
    1:10:32 - Loading base model from Hugging Face using Auto model for casual LM
    1:12:25 - Configuration is key for supervised fine-tuning
    1:16:25 - Introducing fine tuning technique
    1:18:10 - Using multiple task model tokenizers and running on 39 GB RAM
    1:21:45 - Quantisation reduces model size for efficient performance
    1:23:35 - Introduction of 1-bit LLM model, BitNet.
    1:27:47 - In forward propagation, model weights are multiplied by inputs to get the output.
    1:29:43 - Paro Improvement technique reduces GPU requirements for finetuning/training
    1:33:44 - BitNet offers stronger modeling capacity and can match full Precision Baseline performance.
    1:35:52 - 1bit LLM models show reduced memory and latency for inferencing
    1:39:39 - Accessing and using Google Gamma model
    1:41:20 - Introduction to quantization and its benefits in model loading
    1:44:55 - Saving and accessing HF token in notebooks
    1:46:42 - Conversion of 32-bit to 4-bit using quantization for model optimization
    1:50:12 - Imagination is more than knowledge.
    1:51:58 - Fine tuning language model with specific data set
    1:55:55 - Training on a sample data for 100 steps
    1:57:55 - Fine tuning is important for optimizing performance.
    2:01:48 - Creating an AI project with query and output sections
    2:03:54 - Adding and utilizing custom data sets with smart functions
    2:07:23 - Implementing a search data set for RG system or document Q&A
    2:09:19 - Customize behavior for AI application prompt
    2:13:07 - Smart function allows multiple functions in one
    2:14:58 - Using the API key for post requests in Python programming.
    2:18:47 - Machine learning and fine-tuning LLM models with Gradient.a platform
    2:20:38 - Gradient is an AI platform for custom LL models and fine-tuning.
    2:24:01 - Using different base models for fine tuning and setting up the environment for fine tuning process.
    2:25:49 - Setting up environment variables for Gradient
    2:29:32 - Collecting data for fine tuning model
    2:31:22 - Krishna is a popular Creator specializing in data science
    2:35:04 - Fine tuning models efficiently using Gradient AI Cloud.
    2:36:48 - Wishing viewers a great day

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

    Amazing as always! So great tutorials and clear explanations! Thank you!

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

    Full Respect to you Krish, Great video !!

  • @yogeshmagar452
    @yogeshmagar452 9 месяцев назад +26

    Krish Naik respect Button❤

  • @Mohama589
    @Mohama589 9 месяцев назад +1

    full respect bro , from morocco MA.

  • @prekshamishra9750
    @prekshamishra9750 9 месяцев назад +1

    Krish...yet again!! I was just looking for your finetuning video here and you uploaded this..I cant thank you enough..really 👍😀

    • @sohampatil8681
      @sohampatil8681 9 месяцев назад

      Can we connect brother. I am new into generative AI and wanted to know the basics .

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

    Amazing content, big fan of you :) Much love from Hawaii

  • @muhammadhassan2484
    @muhammadhassan2484 6 месяцев назад +2

    Summary of the course.
    Course Overview: This crash course by Krish Naak covers theoretical concepts and practical implementation of fine-tuning large language models (LLMs), including techniques such as quantization, LoRA, and CLA PFT.
    Fine-Tuning Techniques: The course discusses different fine-tuning methods like quantization-aware training, matrix decomposition, and domain-specific fine-tuning for various applications like chatbots.
    Technical Concepts: Explains floating-point precision (FP32, FP16), tensor data types in TensorFlow, and quantization methods (e.g., 4-bit normal float) used to optimize model performance and memory usage.
    Implementation Steps: Demonstrates the process of preparing datasets, configuring training parameters (like optimizer, learning rate), and using the LoRA configuration for fine-tuning models such as LLaMA 2.
    Practical Application: Provides a hands-on example of loading datasets, setting up the training environment, and fine-tuning a model using custom data, with plans to push the fine-tuned model to platforms like Hugging Face.

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

    Awesome presentation Krish !!!! You are a superstar!!!

  • @BabaAndBaby11
    @BabaAndBaby11 9 месяцев назад

    Thank you very much Krish for uploading this.

  • @senthilkumarradhakrishnan744
    @senthilkumarradhakrishnan744 9 месяцев назад

    just getting your video at the right time !! Cudos brother

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

    GREAT WORK SIR! Love from ghaziabad

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

    Thank you so much for such an comprehensive tutorial. Really love your teaching style. Could you also refer some books on LLM fine tuning.

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

      Generative AI on AWS by Chris Fregly and Shelbee Eigenbrode
      its a good one

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

    1.5k+...Great tutorial Krish !!!

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

    Thank you sir

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

    You are awesome ❤

  • @tejasahirrao1103
    @tejasahirrao1103 9 месяцев назад +2

    Thank you krish

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

    Thanks Krish it's very helpful

  • @yourmirror6
    @yourmirror6 9 месяцев назад

    Brilliant brilliant 🙌

  • @karimAshraf-xj7lp
    @karimAshraf-xj7lp Месяц назад +1

    hi, this video is part of 7 videos playlist should i watch the whole 7 videos of the playlist or just watch the last one (2:36 hour)
    in other words, does the first 6 videos are equal to the last video

  • @tejasahirrao1103
    @tejasahirrao1103 9 месяцев назад +1

    Please make a complete playlist to secure a job in the field of Ai

  • @shalabhchaturvedi6290
    @shalabhchaturvedi6290 9 месяцев назад

    Big salute!

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

    Great RUclips ssshhhaaaaanel for LLM

  • @sadiazaman7903
    @sadiazaman7903 9 месяцев назад

    Thank you for an amazing course as always. Can we please get these notes as well. they are really good for quick revision.

  • @shakilkhan4306
    @shakilkhan4306 9 месяцев назад

    Thanks man!

  • @virkumardevtale9671
    @virkumardevtale9671 9 месяцев назад

    Thanks you very much sir🎉🎉🎉

  • @deepaksingh-qd7xm
    @deepaksingh-qd7xm 9 месяцев назад +2

    i dont know why i feel training a whole model from scratch is much more easier for me than to fine tune it ..............

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

      Ya if u see training the model from scratch for your dataset might look better and optimal but the energy is used in training a model from scratch is too much so finetuning a pretrained model is considered a better option than training model for specific data everytime....

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

    Different different :) video, from others!

  • @arunkrishna1036
    @arunkrishna1036 9 месяцев назад +1

    After the fine tuning process in this video, isn't it the same old model that is used here test the queries? We should have tested the queries with the "new_model" isn't it?

  • @foysalmamun5106
    @foysalmamun5106 9 месяцев назад

    Hi @krishnaik06,
    Thank you again for anther Crash Course.
    may I know which tools/software are you using for presentation?

  • @o__bean__o
    @o__bean__o 9 месяцев назад

    Krish bro ❤

  • @AshwaniKumar-r4p
    @AshwaniKumar-r4p 2 месяца назад

    I completed a fine training a llama 3.2 model with a custom data set and created a gguf file after training. but when we run this GGUF file the response of the model does not match what I trained with the data
    tell me how can trained model and get the same response as in available in the dataset ?

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

    Hi Krish. What device do you use to write on...like a board

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

    Hi Krish, the video is really good and more understanding. but I have one reason how to you choose this the right dataset and why? why you choosing that format_func function to format the dataset into the some kind of format. if you have any tutorial or blog please share the link.

  • @Ari_Shukla
    @Ari_Shukla 9 месяцев назад +1

    Can you make a good video around how to decide hyper parameters when training gpt 3.5

  • @Jeganbaskaran
    @Jeganbaskaran 9 месяцев назад

    Krish, most of the fine tuning done by the existing dataset from HF. however converting the dataset as per the format its a challenging for any domain dataset. How we can train our own data to finetune the model so that accuracy ll be even better. Any thoughts?

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

    hey could you tell me what are the pre req to follow this crash course? it would be greatly beneficial!!

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

    Hi krish, one question from my side..can I fine tune gpt2 for text classification

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

    RAG or fine-tuning? How should one decide?

  • @dear_nidhi
    @dear_nidhi 9 месяцев назад

    we want more video on fine tuning projects

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

    What documentation did you refer to in this video?

  • @jaaferklila1375
    @jaaferklila1375 4 месяца назад +1

    can we apply Lora for bert please reply

  • @rebhuroy3713
    @rebhuroy3713 9 месяцев назад

    Hi Krish, i Have seen entire video. i am confused with 2terms. some times you said its possible to train with my own data (own data refers from a url , pdfs , simple text etc) but when you are trying to train the llm model you are giving inputs as in certain format like### question : ans.
    Now if i want to train my llm in real life scenario i don't have my data in this instruction format right in that case what to do. And its not possible to transform my raw text to into that format right how to handle that situation . is it a only way to fine tune in specific format or i can train given in raw text format i know a process where i need to convert my text to chunks then pass to llm. those are really confusing can you clear those things

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

    Can anybody tell me how to fine-tune llm for multiple tasks?

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

    Anyone getting stuck at the import it is
    "from transformers import AutoModelForCausalLM"
    I kept getting error for reading it "casual" instead of "causal"😭

  • @RaahgirHarshal
    @RaahgirHarshal 3 месяца назад

    32GB RAM is less for Krish Bhai.....I want to be like Krish Bhai.

  • @soumyanath5595
    @soumyanath5595 26 дней назад

    Planning to fine tune GPT 2 small LLM model (145 million parameters.) locally in a machine
    Will a laptop consisting of i5 13th Gen and Nvidia RTX 3050 6GB Graphics card, able to do all this task

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

    actually sir this step cant able to run
    !pip install -q datasets
    !huggingface-cli login
    due to this dataset cant be load nd getting error in other step
    so is thier is any solution for this ?????

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

    Hi sir, I have tried your llama finetuning notebook to run on colab with free T4 gpu but it is throwing OOM error. So could you please guide

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

    err -2/4 is not equal to -5 but to -0.5, unless I missed something, did I?

  • @RAZYOUSUFI-z7h
    @RAZYOUSUFI-z7h 6 месяцев назад

    Krish, how to retrieve data from an API, like OpenWheatherData, instead of retrieving from Google and Wikipedia?

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

    i am unable to make gradient ai account it says not allowed while signing up

  • @hassanahmad1483
    @hassanahmad1483 9 месяцев назад

    How to deploy these?...I have seen deployment of custom LLM models...how to do this?

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

    can we fine tune this is our local system does it supports
    i have spec:
    16gb RAM
    ryzen 7 4000 8 core
    NVIDIA RTX 3050
    512 SSD

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

    how to finetune and quantize the phi3 mini model ,

  • @avd_suresh
    @avd_suresh 9 месяцев назад

    Hello Krishna sir ,
    Please make a playlist for genai and lanchain

    • @krishnaik06
      @krishnaik06  9 месяцев назад

      Already made please check

    • @avd_suresh
      @avd_suresh 9 месяцев назад

      @@krishnaik06 Thank you for replying me

  • @anupampandey1235
    @anupampandey1235 9 месяцев назад

    hello krish sir thank you for amazing lecture can please share the notes of session

  • @nitinjain4519
    @nitinjain4519 9 месяцев назад

    Can anyone suggest how to analyze audio for soft skills in speech using Python and llm models?

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

    Hello Sir, Hello, could you create a tutorial on fine-tuning vision-language models like LLaVA or Multimodal LLMs like IDEFICS for Visual Question Answering on datasets like VQA-RAD, including evaluation metrics?
    Please make a full step by step tutorial. Thanks in Advance!

  • @SheiphanJoseph
    @SheiphanJoseph 9 месяцев назад

    Please also provide the source. Research paper/Blog you might have referred for this video.

  • @nazarmohammed5681
    @nazarmohammed5681 26 дней назад

    Sir plz Fine Tune the model on own dataset eg: Resume , pdf ,csv

  • @nitishbyahut25
    @nitishbyahut25 9 месяцев назад

    Pre-requisites?

  • @rahulmanocha4533
    @rahulmanocha4533 9 месяцев назад

    If i would like to join data science community group where i can get the access, please let me know.

  • @salihedneer8975
    @salihedneer8975 9 месяцев назад

    Prerequisite ?

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

    hey krish , can you by any chance share the notes used in the video. would be really helpful. thanks !!

  • @rishiraj2548
    @rishiraj2548 9 месяцев назад

    🙏💯💯

  • @shivam_shahi
    @shivam_shahi 9 месяцев назад

    EK HI DIL HAI
    KITNE BAAR JITOGE SIR?

  • @gauravbhasin2625
    @gauravbhasin2625 18 дней назад

    I feel this time you have fallen way short of your general performance.....

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

    @krishnaik06 WANDB_Disabled is for disabling weights and Bais of the current model

  • @RensLive
    @RensLive 9 месяцев назад

    I understand this video just like your hairs sometime nothing some time something ❤🫠