Run Llama 3.1 locally using LangChain

Поділитися
Вставка
  • Опубліковано 17 жов 2024
  • Meta's latest open-source AI model, Llama 3.1, is here with 405B, 70B, and 8B versions.
    GitHub: github.com/Aar...
    Key highlights:
    405B model rivals the best closed models.
    Free weights and code, with a license for fine-tuning, distillation, and deployment anywhere.
    128k context, multi-lingual, great code generation, and complex reasoning.
    Llama Stack API.
    Partners include AWS, NVIDIA, Databricks, Dell, Azure, and Google Cloud.
    A huge leap for open-source AI!
    llama.meta.com/
    huggingface.co...
    #meta #metaai #ollama #llms #llama #llama3 #llama3.1 #langchain #generativeai

КОМЕНТАРІ • 55

  • @shekharkumar1902
    @shekharkumar1902 2 місяці тому +1

    As usual Nice Video, Congratulations for your bounce back Aarohi! You had been always a great teacher with working practical demonstration. Much appreciated. keep it up Gen-AI.

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

    sister you are amazing. I have been looking to use llama3.1 with langchain and there were so many complex solutuion to get it done but none of them worked. But this simple solution will work. A lot of respect from Pakistan

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

    Wow. Ma'am, Your content is always best & the way you explain it is excellent

  • @Kishi1969
    @Kishi1969 2 місяці тому +1

    Dear Madam, I'm always happy for your lectures , May God Almighty continue to be with you ma, but I'm having a bit problem, this is the error I'm having 'ConnectError: [WinError 10061] No connection could be made because the target machine actively refused it'

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

    what is minium config required for laptop or server to run LLM model locally ?

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

      To run pretrained LLMs locally, You should have at least 8 GB of RAM available to run the 7B models. The more VRAM, the larger the model you can run. For storage - 512GB SSD

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

    I have done same code, but my system takes too much time as compared to your response time, my system is Mac Pro, 512gb,32gb RAM

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

    Good job Aarohi! Just I want to know from where I get the folder containing the script and requirement.txt. Thanks a lot

    • @CodeWithAarohi
      @CodeWithAarohi  2 місяці тому +1

      @@aminelongo242 Github link is mentioned in description section.

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

      @@CodeWithAarohi Thanks Aarohi

  • @shinwarikhan4677
    @shinwarikhan4677 2 місяці тому +1

    Thank you mam for such amazing contents,,, Mam please also make video on zero shot learning, one shot learning that how we do prediction using pretrained model and how we do for custom,,, we will be very thankful ❤

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

      Yes, I will cover these topics in this playlist

  • @monkey.d.gojira
    @monkey.d.gojira 2 місяці тому

    Thank you for tutorial, which size model are you running locally?

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

    I get following error:
    (env_langchain1) C:\Requirements_LLM\Generative_AI-main\Generative_AI-main\L-6>ollama run llama3.1:405b
    'ollama' is not recognized as an internal or external command,
    operable program or batch file.

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

      You need to install Ollama first.

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

      @@CodeWithAarohi Works now. Great video!! Can you also make a video on how to add features to the streamlit app, such that a excel file or file can be given as input and Llama3.1 can be used to analyse the data?

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

      @@Alex2Hsrw Sure

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

      Haha, Dude you will need a lot of compute and memory to run Llama 405 B model, the memory requirements for a stock model is 229 GB , the context length of the model is 128K which is same as ChatGPT 4 turbo and significantly higher than Claude 3.5 which only has 100K context length. You cant run it locally, you must go for a api service.

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

    what is the hardware you were using during this demo session?

  • @MohamedElhassnaoui-kp4xe
    @MohamedElhassnaoui-kp4xe 2 місяці тому

    ​ @CodeWithAarohi can you tell resources(gpu , ram , stockage) need to install this last version of llama3.1 8B /70B/405B , and what about 1000user using this instances ?

    • @CodeWithAarohi
      @CodeWithAarohi  2 місяці тому +2

      16GB RAM to run 8B models, 70B model need 40GB RAM .
      Llama 3.1 405B roughly require 800 GB memory to be served in its original BF16 precision. But for lower precision (e.g., INT4) - 203 GB is sufficient. But lower precision (INT4) may result in some loss of accuracy but can reduce memory requirements and increase inference speed.

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

      @@CodeWithAarohi 230gb ...😮

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

    Great, what the RAM capacity that needed for 405B parameters

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

      Llama 3.1 405B roughly require 800 GB memory to be served in its original BF16 precision. But for lower precision (e.g., INT4) - 203 GB is sufficient. But lower precision (INT4) may result in some loss of accuracy but can reduce memory requirements and increase inference speed.

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

    It's a very well done video. Thanks a lot! I don't understand how the response of the llm can be that fast, if you're running the 405b version locally.

    • @CodeWithAarohi
      @CodeWithAarohi  2 місяці тому +1

      @@christianauswien It’s not the 405b model. I am using 8b model.

    • @MohamedElhassnaoui-kp4xe
      @MohamedElhassnaoui-kp4xe 2 місяці тому

      ​@@CodeWithAarohi can you tell resources(gpu , ram , stockage) need to install this last version of llama3.1 8B /70B/405B , and what about 1000user using this instances ?

    • @aryan.2763
      @aryan.2763 2 місяці тому

      @@MohamedElhassnaoui-kp4xe yes you need a space nearly 750gb , at minimum it will need 8 gpu's to serve the 2 nodes.

  • @soravsingla8782
    @soravsingla8782 17 днів тому

    Keep up your good work

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

    can you help: ollama pull llama3.1
    zsh: command not found: ollama

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

      Install ollama first. Check this video: ua-cam.com/video/5CCy6H6Jizw/v-deo.html

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

    Can you cover how to use llama3, ollama, and langchain

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

    Video excellent, Advise on dockerized version of the same application

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

    that is llama 3.1 8b model right not 405b

  • @NO_NAME-fe6dj
    @NO_NAME-fe6dj 2 місяці тому

    Thank you aarohi

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

    Mam, can u pls make a video on tools and agents using open source models.

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

    great video, thanks for sharing

  • @07Sushant.
    @07Sushant. 2 місяці тому +1

    Practical Teaching 🥳
    if you teach advance python or Data Science ML related subjects, please tell me

    • @CodeWithAarohi
      @CodeWithAarohi  2 місяці тому +1

      Yes, I teach Data Science and ML related topics. There are various playlists on my channel you can check those.

    • @07Sushant.
      @07Sushant. 2 місяці тому

      ​@@CodeWithAarohi Problem toh yahi hai "Various" Ma'am Can you please help. I want to know the actual tool that is used in the companies right now at Data Science post and then I want to know the hierarchy in which I should master these skill ☺it will be great if you could help me with this thing. If you are comfortable ma'am, we can connect on LinkedIn or Discord (as a request 😅). The problem with me right now is that i know these things c,cpp,py,R
      Networking , OS Studied everything sincerely but then haven't not mastered any one particular out of these because every semester thing changes completely this is the reason i failed to master any one skill as i focused on everything.
      Today I am about to finish this journey and i help in two things from you ma'am
      1)Which tech stack is actually used in the companies?
      2) In what order should I learn these technologies?
      I would be grateful for your consideration and support Ma'am ☺

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

    Amazing video