Stanford's new ALPACA 7B LLM explained - Fine-tune code and data set for DIY

Поділитися
Вставка
  • Опубліковано 15 січ 2025

КОМЕНТАРІ • 33

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w Рік тому +6

    this is the best video on fine tuning alpaca yet.

    • @code4AI
      @code4AI  Рік тому +1

      Glad it was helpful!

  • @dylan_curious
    @dylan_curious Рік тому +3

    Wow, this was a great dive into the model. These guys really thought outside of the box. Impressive.

  • @MuhammadAhmad-sf1hp
    @MuhammadAhmad-sf1hp Рік тому +18

    I think your next video should be on making custom datasets using other models like chat GPT etc

  • @vedantpotekar8905
    @vedantpotekar8905 Рік тому +1

    You explained very well, but I want to know how do I run the model present on original tatsu_lab-stanford-alpaca on my laptop? I cant figure out how to do it... everywhere there are other repositories like dalai and etc I dont want to use those.

    • @vedantpotekar8905
      @vedantpotekar8905 Рік тому +1

      By run I mean Build, Train and Predict

    • @code4AI
      @code4AI  Рік тому +1

      Got clone the repo. Any internet search will show you how to do it on your machine (either PC, any Cloud platform, ...)

    • @vedantpotekar8905
      @vedantpotekar8905 Рік тому

      @@code4AI yes i cloned the repo. i dont want to generate data so i dont need open ai API.

    • @vedantpotekar8905
      @vedantpotekar8905 Рік тому

      @@code4AI Do i need to get LLAMA model from somewhere else? it is not included in alpaca's repo

    • @vedantpotekar8905
      @vedantpotekar8905 Рік тому

      one more query, i am unable to run because i have intel iris gpu

  • @sitrakaforler8696
    @sitrakaforler8696 Рік тому

    Hum... it's kind of cool 12:31
    Thanks for the vidéo !

  • @waeldimassi3355
    @waeldimassi3355 Рік тому

    Amazing work !!!!

  • @a---------------
    @a--------------- Рік тому

    Wait so can we add more data sets to our liking? Can you train Alpaca with GPT 3.5?

    • @code4AI
      @code4AI  Рік тому

      Yes. In my new video (to be released today) I show you how to set the target modules mapping to your specific LLM, plus if you want to apply parameter-efficient fine-tuning (with LoRA), if your GPU has not enough memory for fine-tuning the bigger LLM versions (like 11B+) .

    • @a---------------
      @a--------------- Рік тому

      @@code4AI sweet can’t wait

  • @RonvandeSand-vm5mb
    @RonvandeSand-vm5mb Рік тому

    Thanks, great Video and great explanation! But doesnt finetuning a model (with Data of ChatGPT) for commercial purposes break the Terms&Conditions of OpenAI?

    • @code4AI
      @code4AI  Рік тому

      Therefore when you sign the contract to use the products of OPENAI, like Stanford did and payed for the product sold by OPENAI, there is the fine-print w/ all the license restrictions and for a university I think, you can negotiate favorable terms. But I do not have access to their contract, therefore I can't answer your legal problem. I would ask OPENAI directly if you need further info or special conditions for your corporation.

  • @projectbit2248
    @projectbit2248 Рік тому

    Can such models collaborate with each other and work like a team in on a specific task/ app ?

    • @code4AI
      @code4AI  Рік тому

      In theory, of course. it is just a huge array of tensor multiplication. However, since companies create their model with their own special tokens, their own little secrets, you have to know about their configuration approach ...

    • @thelavalampemporium7967
      @thelavalampemporium7967 Рік тому

      i was thinking the same thing, imagine using a model like gpt for the main model that can interact with 10 alpaca models for its internal processing for different tasks. could be the steps to a primitive agi :P

    • @code4AI
      @code4AI  Рік тому

      An ALPACA model is just a fine-tuned model for one downstream task on a LLama model from Meta. Therefore an average general intelligence (AGI) seems theoretically possible. However, adding the different learned weights from all layers in the LLM together, catastrophic forgetting is happening, like in 2019. The solution was a fusion adapter for all fine-tuned adapters, with frozen main weights.

  • @SikandarKhan-ys1ik
    @SikandarKhan-ys1ik Рік тому

    ISO has to be given access to this technology and open source standards should be established!

  • @eduardmart1237
    @eduardmart1237 Рік тому

    How do I make a custom dataset?

    • @code4AI
      @code4AI  Рік тому

      Here is the file: github.com/tatsu-lab/stanford_alpaca/blob/main/generate_instruction.py

  • @JJ-yw3ug
    @JJ-yw3ug Рік тому

    hi,I am interested in knowing whether this model can be trained to simulate a personalized girlfriend. Is this feasible? 0-0

    • @shlomoi9404
      @shlomoi9404 Рік тому

      While this potentially possible, I wouldn't recommend it.

  • @skylerf1
    @skylerf1 Рік тому

    This is amazing to use. Too bad it is still for research purposes only

    • @code4AI
      @code4AI  Рік тому

      But we are allowed to learn every little bit we can from this system ...

  • @IvarDaigon
    @IvarDaigon Рік тому

    It should be noted that this 52k training data was generate with text-davinci-003 which was the previous best model for this task.. but now OpenAI has released gpt3.5-turbo which is better, faster and most importantly 10x cheaper.. so if you wanted to repeat this exercise it would probably cost a lot less than $500 USD. (I doubt the university discount was 10% of the commercial price).
    The biggest problem with this method is it may violate OpenAIs Terms of Service so use at your own risk.

    • @runitup7029
      @runitup7029 Рік тому

      Correct me if I'm wrong, but if you don't plan to compete with OpenAI then you're not violating terms when you train a model...? Otherwise surely they'd explicitly say you cannot train any non-OpenAI models... what they seem to be saying is don't attempt your own commercial LLM

    • @IvarDaigon
      @IvarDaigon Рік тому

      @@runitup7029 yes so you can only get away with it for educational/research purposes. the moment you try to commercialize any product based on that model you step into a legal minefield because it probably violates both Meta and OpenAIs current TOS. but then again.. OpenAI and Meta have already stepped into a legal minefield by "training" their models on copyrighted materials just like Stability AI and Midjourney have with their image generation models.