Build and Run a Medical Chatbot using Llama 2 on CPU Machine: All Open Source

Поділитися
Вставка

КОМЕНТАРІ • 571

  • @paullopez_ai
    @paullopez_ai 11 місяців тому +20

    Hey Sonu - this is one of first YT tutorials with a thorough explanation I've seen in a while. I got this running the first time 'out of the box' ; it did ask me to pip install ctransformers, but after that it came up just fine. I am going to experiment with other documents. Some people don't like to sit through writing code, but it's good for us! Especially when you mention other tools we could try and why you picked what you use. Excellent!

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

    Thanks for the great tutorial. It is really helpful.
    A hint for anyone stuck with some errors in model.py, here are some fixes (original -> fix):
    chain = cl.user_session.set("chain")-> chain = cl.user_session.get("chain")
    res = await chain.acall(message, callables=[cb]) -> res = await chain.acall(message.content, callbacks=[cb])

    • @ch-qk8dk
      @ch-qk8dk 5 місяців тому

      thanks man

    • @santhoshreddy-dn9tw
      @santhoshreddy-dn9tw 5 місяців тому

      thank you,

    • @santhoshreddy-dn9tw
      @santhoshreddy-dn9tw 5 місяців тому +3

      another addition - under #QA model function, change -> db = FAISS.load_local(DB_FAISS_PATH, embeddings) ------> db = FAISS.load_local(DB_FAISS_PATH, embeddings,allow_dangerous_deserialization=True)

  • @sunderchakra
    @sunderchakra Рік тому +15

    Wow. You packed a lot here - very helpful, thanks.

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

      Glad it was helpful! Thank you 🙏

  • @anas._.rehman
    @anas._.rehman Рік тому +9

    Hey, somehow ended up on this extremely underrated channel and I gotta say I love it!, I loved each and every part of this tutorial, something I was looking for quite some days now. Thank you so much, deffo subscribing and looking forward for such content.
    Regards,
    Anas from Pakistan

  • @Christopher_Tron
    @Christopher_Tron Рік тому +7

    Thank you man so much! I am very grateful for your content. I appreciate your passion for open source ai and your teachings are helping bring this technology into my reach. I was so happy when this ran! :) Excited to see your future videos.

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

      Glad you like them! I have many videos already. More coming soon. Pls stay tuned 🙏

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

      you did semantic search and no finetuning involved . is this accurate ?

  • @rafaelperez1981
    @rafaelperez1981 Рік тому +10

    Just wanted to drop in and say congrats on your UA-cam tutorial! 🎉🎥
    Seriously, I'm so impressed with your content! Keep up the fantastic work!
    Best wishes,
    Rafael from Belgium

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

      Hi Rafael, thanks for your lovely comment. Let's connect if you feel like..... Best, Sonu!!

  • @AbhishekShivkumar-ti6ru
    @AbhishekShivkumar-ti6ru Рік тому +2

    What a fantastic video! Probably the only one that goes into complete details!

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

      Glad you liked it!

    • @RajGupta-z9d
      @RajGupta-z9d 2 місяці тому

      Hey can you help me i am getting an error "ERROR: [Errno 10048] error while attempting to bind on address ('0.0.0.0', 8000): only one usage of each socket address (protocol/network address/port) is normally permitted"
      how can i fix that

  • @pedroavex
    @pedroavex Рік тому +6

    Hello from Portugal! Thanks for your video, Sir. Could you make a follow up video on how to run it on GPU? As you see there are many viewers interested on it. Being a non-programmer, it would be nice to see a video showing what and where to change on the code. I was able to follow this video and make it work eventhough i don't know coding at all, so i believe you would generate a great video for GPU usage too. Maybe something like a follow up video. Thanks, Sir!

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

      Hi Pedro, thanks for your lovely comment! I will create a video soon for the GPU as well. Stay tuned....

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

      @@AIAnytime thanks. Looking forward to it

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

    Simply amazing ! this video can help a lot to,who wants to start working with LlaMa 2. thanks for sharing this.

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

      Glad it was helpful! Please consider subscribing if you like other videos as well.

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

    Amazing video, you have saved the time of a lot of people. Keep up the excellent work.

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

      Glad it helped... plz look at the LLM playlist.

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

    Thanks!!! Great presentation, super useful, amazing that you had the energy to do this while sick : )

  • @ГлебФедорченко-х4ш
    @ГлебФедорченко-х4ш 9 місяців тому

    Thank you for a smart and precise explanation of such a difficult topic

  • @be_present_now
    @be_present_now 9 місяців тому

    Fantastic video! A 1080p quality video would make the watching/learning experience much better. Just a candid suggestion.

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

      Thanks for the tip! My recent videos have improved. Share your feedback on those if you have any.

  • @bardaiart
    @bardaiart Рік тому +6

    Appreciate the great work!
    Most of the tutorials out there are just trying these LLMs on Colab notebooks, makes you eager for more.
    Would appreciate if you can also cover the deployment part, thank you :)

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

      Glad you like them! There are a few deployment videos on my channel. Please check out.

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

    You are incredible professor!!! Thank you so much for your tutorial, i got very good insights. Best regards for you

  • @MartinRoberts-z6u
    @MartinRoberts-z6u Рік тому +6

    This was a really well put together Tutorial thank you so much. Just one question what all needs to change to run this on GPU instead of CPU. Thank you so much for your time. Keep up the awesome work!!!!

    • @GPalem
      @GPalem Рік тому +2

      Pick a GPU LLM model from the bloke instead of CPU model. Usually GPU models have GPTQ in their name

  • @anandmandilwar8707
    @anandmandilwar8707 Рік тому +2

    Nice video and great learning. Liked your confidence and knowledge. Going to build this bot on over the weekend and hopefully should be a breeze by looking into your code base and video.

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

      Glad it was helpful! Thanks.

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

      bro what is your pc specs? and plz tell minimum system requirements for deplying llama on a computer
      @@AIAnytime

    • @862_shekharmanhas3
      @862_shekharmanhas3 10 місяців тому

      @@AIAnytime how to make it run on gpu too ??

  • @micbab-vg2mu
    @micbab-vg2mu Рік тому +1

    Amazing video thank you - I wanted to build similar chatbot based on open source model - now it will be easer to do it.

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

      Thank you for your comment! As I am new on YT, your support can help me grow and creat more such videos.

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

      May be you are new but not for long time. Sooner your such videos are going to Rock@@AIAnytime

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

    Thank you very much for this great tutorial.
    I have an error and I am struggling to solve, maybe could you help me?
    The error is:
    ModuleNotFoundError("No module named 'faiss.swigfaiss_avx2'")
    and I have already tried to uninstall, downgrade, and upgrade versions of faiss-cpu but it does not solve this issue.

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

    It would be nice to see how we could actually stream the responses. Also, that quantized version you are using is old, the new quantized versions that have a "K" are better.

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

      how do you know did you use it?

  • @techmontc8360
    @techmontc8360 Рік тому +5

    Hi Sir, thank you so much for the tutorial. Do you know how to enable GPU support for this model ?

  • @Akashgupta-em6zo
    @Akashgupta-em6zo Рік тому

    The best channel for LLMs.. thanks

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

    In the video at 4:39 you have run a command in the terminal. Where should we run it in the windows Operating system. How to do that please give an explanation.

  • @skyy4548
    @skyy4548 9 місяців тому

    Great video! thank you for sharing your expertise. Keep up the good work!

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

    Thanks, It's very useful. Upload more videos like that

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

      Thanks for your comment! Please check my LLM playlist.

  • @SravanKumar-cj4uu
    @SravanKumar-cj4uu 4 місяці тому

    Thank you for your detailed explanation. Your classes are quite interesting and are building confidence to move further forward. I need some suggestions: I saw a medical chatbot using Llama 2 on a CPU machine, which was all open source. Similarly, I need to build an image-to-text multimodal model on a CPU using all open-source tools. Please provide your suggestions.

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

    Have you made a follow-on video showing how to incorporate GPU acceleration (CUDA for Nvdia) into your codebase?

  • @saviosunnyrajagiri1347
    @saviosunnyrajagiri1347 6 місяців тому +2

    can i do this in colab and how can i do it in colab

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

    Good work, How to get a stream response like chatGpt and output the stream word by word as soon as we get. If possible reply with a code example of current video.

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

    Hii , I tried this project but when running the same code in chainlit getting tuple out of index and UserSession.set() missing 1 required positional argument: 'value', issue , can anyone help plzzz

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

    Well done and appreciate the efforts. You have made my weekend interesting !

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

      Glad to hear that! Please subscribe and check out the other videos too.

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

      @@AIAnytime Sure, Thanks. Got struck at "could not reach server". 😞

  • @abdulwasay393
    @abdulwasay393 5 місяців тому +1

    i need help to run this in my system ... can anybody help ??? URGENTT!

  • @niloufarabaei2722
    @niloufarabaei2722 Рік тому +4

    Amazing! This pipeline doesn't work well with CSV files though. Could you make a video explaining how to use csvs with these open-source models?

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

      Great suggestion! Will come up with something...

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

      @@AIAnytimeCould you please suggest videos or websites I could use to create a csv chatbot using llama?

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

      Hi nysa, find this: ua-cam.com/video/MUADZ97GgZA/v-deo.html

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

    Hello, setting the chunk size to 500 may exceed the token limit of sentence transformers, which is by default 128 tokens.

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

      Hi Cheng, that's a good point. Sentence Transformers do have a truncation strategy in place after 128 tokens. But yes i agree with you.

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

    Amazing video thank you,
    I had a question.
    1. Unable to retrieve the answers for the question for the content out of the pdf, if we want to get a ans from pdf if not found then from pretrained model. how to configure it.

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

    Can you tell me sir , what should I learn become like you means , tell me all thing you learn in python and ml , so I also started learning deeply about that. I can able to create ml app but not like you ,so please tell me all things you learned

  • @Aakash_savant
    @Aakash_savant 9 місяців тому +1

    Can you tell where can we get llama2demo code file

  • @Vijay-Khanna
    @Vijay-Khanna Рік тому +1

    Thank you for the efforts to explain this in very simple way.
    Am new to LLM's. Tried your GitHub code, When am asking the question it gives the error "Async generation not implemented for this LLM." Could you please help with a workaround.

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

    Loved the content, it was beautifully explained. Thank you :)

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

    Awesome, job. Could you please provide instructions or make a video to run Llama 2 for custom data via GPU? Thanks.

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

      Thank you! If you have a good enough VRAM (GPU)... You can use original Llama2 weights and load it using Transformers to run the model. Look at the text generation interface on Huggingface.

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

      @@AIAnytime Thanks. Could you please provide steps to get the GPU working with the code you showed in your video. Thank you.

  • @gauravgarg-wc4zl
    @gauravgarg-wc4zl 11 місяців тому

    Works ! asked how to solve pollen allergy ? bot was able to point source and page and information , Great !

  • @vishnureddy7729
    @vishnureddy7729 29 днів тому +1

    f I ask questions that are not related to the data I provided, it still answers my questions (for example, I asked the chatbot about Virat Kohli, and it gave me a correct response). It should not give answers that are not present in the data

  • @prudhvirajdevireddy1023
    @prudhvirajdevireddy1023 Рік тому +2

    Amazing! Can you explain the problems with Langchain in production and provide alternatives for Langchain?

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

      Fantastic questions. Let me answer it..... Harrison chase and team has done a great job with Langchain but atm they aren't enterprise ready:
      1. It's an arbitrary code execution. Prone to prompt injections.
      2. Edge cases issues are identified with integrations.
      3. High compute costs due to CPU and memory spikes.
      4. Many other vulnerabilities
      Let's give Harrison some time on it.
      Many other developments are happening. Stay tuned.

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

    Great tutorial am looking to learning this skills as soon to take new role

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

      You can do it! Best of luck.....

  • @SnehaRoy-pf9cw
    @SnehaRoy-pf9cw Рік тому +1

    Wow... This is what I was looking for 😇

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

    If I upload multiple PDF and run the chatbot, will it answer my query from searching all over the PDF's?

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

      Absolutely yes. That's how it works.

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

    Thank You For create this video .This video was relly help full 😃

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

    Why is everyone using AI for chatbots when its capable of so much more. I would love to see a LLM operating system. Lets think big

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

      Interesting! I think Google is on it to build it first.... 2024 release! Heard it from a few community friends. Let me know if you are thinking around these lines. It's an ambitious task at the moment. Alone we can't do, we need a team to work on it.

  • @akki_the_tecki
    @akki_the_tecki 10 місяців тому

    Awesome asusual, But the thing is Users who is gonna use such type of chatbots, Dont wanna see that all Info. I think you got me, It should be Simple and looks beautiful then ppl try to use that. So, Unnecessary Information is not useful for the ppl who dont know how this works, They only want to Type the query and get the response, Thats it. I hope you do keep in your mind for the next tutorials. Yohr doing GREAT BUDDY 🔥🔥🔥🙌🏻🙌🏻🙌🏻🙌🏻✨

  • @SnehaRoy-xf3zv
    @SnehaRoy-xf3zv Рік тому +1

    Wow thanks for this video... Really helpful

  • @maksoodalam5448
    @maksoodalam5448 Рік тому +2

    awesome work. When i run , i am getting below error.
    NotImplementedError: Async generation not implemented for this LLM. Please advise on this

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

      hey, I got the same problem and I didnt find a solution, did you solve it?

  • @MdAsrafulIslam-m4n
    @MdAsrafulIslam-m4n 7 місяців тому

    Thanks, Open source AI Advocate

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

    Thanx for the work, But that code need correction. Most probably you ran the original reference code during output and not the one you coded in video .
    1. 44:11 That need to be *chain = cl.user_session.get("chain")* in *async def main(message):* and no *set* .
    2. 40:20 How is *final_result(query)* called in your code? Is it just for example? 🤔 💭

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

      Looks like a great catch, Abhishek. Can you please open a PR on the GitHub repo on this one? I have to check the code base again. Will make the necessary changes. Thanks for your comment 🙂

  • @amaluddin11
    @amaluddin11 10 місяців тому

    Many thanks for a great video. Fantastic tutorial!

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

      Glad it was helpful!

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

    @AIAnytime perfect one! As we saw responses took upto 2 mins. LLMChain primarily consumed all the time. How we can further tune it to speed up while staying on cpu (with respect to both hardware specs or some parameter config/code tuning that can speed up the replies). And what's a good hardware config to run this solution to get chatgpt like responses.

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

    Thank you very much sir amazing video, very knowledgeable amazing teaching ❤

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

    Thank you for the very instructive video. I should bring to your attention (for the benefit of your subscribers, future and present) that there is an important note regarding ggml files and I quote from HuggingFace:
    "Important note regarding GGML files.
    The GGML format has now been superseded by GGUF. As of August 21st 2023, llama.cpp no longer supports GGML models. Third party clients and libraries are expected to still support it for a time, but many may also drop support.
    Please use the GGUF models instead."
    My question is: How does this note affect your instructions in this video? Any code changes? Thank you.

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

    Great video, I have a question for you, what model can I use to do it in Spanish, or does it work with the same one?

  • @pooja7294
    @pooja7294 9 місяців тому +1

    hii. so while i am on venv and trying to install the requirements.txt, facing issues for installing torch in mac m2 air. Is there any solution for the same?

  • @robinmountford5322
    @robinmountford5322 10 місяців тому

    Fantastic information and super useful and a big time saver. Thank You.
    For anyone who may have had with an error relating to string replacement, change the chain async call like so:
    res = await chain.acall(message.content, callbacks=[cb])
    I am curious how to prevent context length for the transformer going beyond 512 tokens.

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

      You can use the n_context. Use llama32k model by together computer on Huggingface.

    • @robinmountford5322
      @robinmountford5322 10 місяців тому

      @@AIAnytimeAwesome thank you.

  • @yongxing1848
    @yongxing1848 10 місяців тому

    Thank you for the video and I learn a lot from you.

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

      Glad to hear that!

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

    Hi sir, thank you so much for the video we are looking for the same type of video. ( I have one request- can you please make a video for data extraction from different types of invoice data with the help of open source model or libraries.)

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

    Can you please share the version of each package in the description?

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

    I’ve seen every video about embeddings, but no one talks about how do you update the embeddings?
    For example, you created an embedding of a document which had a text ‘our stores open at 11am’
    now the document is updated to reflect ‘our stores open at 10am’
    How do you update the embeddings?
    Do you delete the old document store and re-generate everything? (too much just to reflect 1 line change)
    Or what is the solution to update this specific embedding?
    Because if we just add this line, it’ll conflict with the previous existing embedding. (it can pick old line from top k). This is bad for production.
    What’s the solution?
    +You earned a sub :)

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

    Great job dude non technical person can also understand your explaination. Thanks n respect for sharing the open source Ai. I have one question how i can restrict this chatbot not to answer any question outside of the document/PDF. For example if i ask chatbot what is python then it is giving the answer but this information is not present in PDF. How i can restrict it and make it only PDF specific bot?

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

    this is amazing tutotial thank you sir .But unfortunately I have got error "Session disconnected" Plese sir how and why it happened explain it you fan form Pakistan❤❤❤

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

    Beautifully explained each step, Would you like to confirm, what GPU is best for llama-2 (7B and 13B) model on PC/Laptop.

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

      Get anything which has 24GB VRAM if that's in your budget.

  • @MushyRoo
    @MushyRoo 10 місяців тому +1

    Hello this is a very helpful video to me since i was working on something similar
    i have a small query
    does it only answer questions like "what" and " how " questions ? Like for it to be a chatbot it needs to have a conversation with the user right , for example if i say " I have certain symptoms" , what does it generate?
    A reply would be helpful for me

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

    Thank you for this, but can u make a similar bot which not only gives response with text but rich media(like images,gif,links) etc. Just like how u create embeddings on the text can u do embedding on images in pdf.Would love to see ur video on this

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

    Nice video! As an LLM newbie I might be being too optimistic trying to run this with the Llama 2 quantized model llama-2-7b-chat.Q4_K_M.gguf on a cpu with only 8GB RAM nominal. The Chainlit page loads and after entering a question after a while it appears to timeout with the message "Could not reach the server".

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

      hi , for me also facing same issue, have u got any solution?

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

    Great work, this video was really informative.

  • @MameMedouneDiopXpert
    @MameMedouneDiopXpert 11 місяців тому +1

    Excellent tutorial! Btw is there a way to extract images in the pdf and embed them in the response

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

      Yeah you need to use a multimodal embedding model. If it's images, sentence Transformers still works but how do you return it in the response is something, you might need to look.

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

    Can we say that we finetune this Llama 2 model on our own data like in this example you used a medical book? Am I right?

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

    Awsome content! When is it adecuate to fine tune an llm instead of working or as a complement for the botpress knowledge base?

  • @buharxan6506
    @buharxan6506 9 місяців тому

    great tutorial. could you please tell, how to fine tune the model? is it possible?

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

    Amazing video.
    Is it possible to add the translation feature to the response using llm model?.if it is possible, can you tell me how to do it.

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

    Really, it was a wonderful video!! Can I train this model in Google Colab or any other cloud GPU's??

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

    I install ctransformer but give error ,try to resolve lot of thing using bard but unable to solve this issue please give me some suggestions.Thank u so much for this amazing content

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

      What error are you getting? Can you post it here?

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

    Hi great video! Can you recommend some conversational open source LLM? I want to do a IT help desk bot with custom data.

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

      Hi, you can use Llama2, MPT, or Falcon. They are Commercially available from the licensing standpoint.

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

    I wonder how you could get it so that you type in a bunch of symptoms and it asks follow up and then gives you possible diagnosis.

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

    Hi sir, can you please tell me when it available for production and for deployment in different cloud provider, can you please make a video for deployment.

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

    Coding isn't really my forte, but I gave this project a shot. Unfortunately, I encountered numerous errors towards the end because I'm unfamiliar with setting things up from scratch. The tutorial seems tailored for professionals; what about beginners who want to embark on such projects?

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

      Sad to hear that you got error. Meanwhile you can check a similar video here that i created ua-cam.com/video/rIV1EseKwU4/v-deo.html .. create an issue on GitHub projects for any bugs. I will help debug that ...

  • @pradeepvanapalli5377
    @pradeepvanapalli5377 Рік тому +2

    Thanks for the explanation. How can we make this work for text to SQL conversion?

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

      Text to SQL would be pretty easy. You can just inference the model with Langchain Chains. It should work.....

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

      @@AIAnytime Can you please elaborate, so that I can understand...Thanks for giving the prompt reply.

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

    Amazing Video SIr . Just had a question , i want to make it fast like chatgpt , so i changed the model_kwargs={'device': 'cpu'} to model_kwargs={'device': 'cuda'} , but it is taking the same exact time any idea how i can do changes in code to make it fast responsive

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

      Do you cuda installed? And also you have to use cuda to run the LLM not while creating the embeddings?

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

      @@AIAnytime yes sir , i did install cuda and installed the torch cuda version for it , changed all the values of cpu to cuda in the code ,model_kwargs={'device': 'cuda'} but after running the code still only the cpu is getting utilized when saw in the task manager

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

      You have to pass cuda in CTransformers not in model kwargs for sentence Transformers. In CTransformers, you have to pass GPU layers. Look at CTransformers GitHub for more info.

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

      @@AIAnytime yup did add gpu_layer=8, in the ctransformers but did not help in reducing the latency , still only cpu and ram tends to be working

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

    Hi plese can you share the implementation of integrating memory in this so as to remember context chat history on follow up questions. Thanks in advance.

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

      You can use the Conversational Retrieval chain. With a memorization that comes with it. Plz look at Langchain documentation.

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

      @AIAnytime Hi ,I have used it, but I wanted to use RetrievalQAWithSourcesChain in place of that, I am facing error with same.Also when I am using Conversational Retrieval Chain with gpt 3.5 turbo llm and openai embedding, though it is able to preserve memory and answer follow up question(but not that good as sometime current prompt get drastically rephrased into entirely different prompt) , but also it is giving me answers from its own knowledge base, for e.g. say I have uploaded a document related to Medical, and then I ask Who is Sachin Tendulkar, it still answers. I want model to say "Question out of Context in those cases". See if you can help it and make a tutorial on that. A chainlit interface where we upload pdf, ask related questions and follow up questions, while discarding question out of document scope.

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

    Thanks

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

    I have a question ? Why it's impossible to load llama 2 based models with llamaCpp from langchain ? Thanks for your video. It helped me.

  • @THOSHI-cn6hg
    @THOSHI-cn6hg 6 місяців тому

    why is it slow in generating response , how can we improve it

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

    The best developers have purple themes.

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

    Is there any way of using embedding model from sentence_transformer/ all-minilm-l6-v2 by downloading it into our local system rather than directly using from huggingface?

  • @SnehaRoy-xf3zv
    @SnehaRoy-xf3zv Рік тому

    What an amazing video... Thank you.

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

    Very good content, it is very helpful
    on a Mac these developments cannot be run due to the GPUs. However, I understand that in Google Colab it could be carried out, right?

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

    Can u share the documentation of this project

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

    @AI Anytime How do I remove the source information? I just want to keep the output

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

      You just have to make return source documents = False.

  • @rd2615
    @rd2615 10 місяців тому

    Hey! Thanks for the video. I am running it on a Macbook Pro with M2 chip but it is taking ages for even a single response to come in. Any suggestions?

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

    What are the specs of the hardware you are using in the video for reference so we know if our machine is going to do better or worse? .. 16gb Ram, ??? CPU

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

      I5 Intel, 16 GB RAM, 512 GB SSD.

  • @Fonsecaj89
    @Fonsecaj89 11 місяців тому

    I got Number of tokens (1659) exceeded maximum context length (512) and it gets frozen...

  • @jituyadav-h6o
    @jituyadav-h6o 11 місяців тому

    I suggest You Sir If Your code is not working properly and you have missing user_session.set () and aother information time there also you have used user_session.set("chain) there need user_session.get("chain") as well you have empty context there also have issue becouse there you did't mention the context in curly brackets as well i am getting issue in Message
    'Message' object has no attribute 'replace' bot response i am geeting this suggest me where i mistake

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

    hi sir, i have tried this program but when i am running the chainlit application, 30 seconds after a query the server is getting disconnected. i have also searched but couldn't figure out what might be the reason?

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

    Thank you so much for the video genuinely I learned something from this 1 hour , Just one question for GPU we have to change just cpu to gpu or any other package to be updated. Once again great video

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

      Not much of change, use the CUDA kernels instead CPU. Couple of changes ofcourse. You can also use the original model for better performance.