๐Ÿ‘‘ Unleash the Power of FALCON-40B LLM with LangChain. The ULTIMATE AI Model For CODING & TRANSLATION

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone so today we'll be looking at some powerful open source model such as Falcon the Falcon is more compared to open AI charge gbt 3.5 as we can see in the last language model leaderboard after the GPT 3.5 the Falcon 4tb instruct is there which is an open source model there are three variant of the Falcon which is instruct ODB parameter and of 7B parameter which is in small size in this video we will see how we can use this model to inference and also will integrate it with langen so as of now one limitation this model holes is is only trained on English and phrase data as you can see in open API chat GPT it is written on multiple or multilingual data so that's the problem if you use it for the non-englies the result might not be accurate and there might be a bias in the data set or model might I'll use in it I might also make a video for fine tuning source llms for costume data set so stay tuned now let's start with inference any model you see in hugging face can be infringed and if you are not sure about the tokenizer and a model Imports you can just use Auto tokenizers and auto model for casual mm this simply users have to pass the model name to Auto tokenizer Dot from pretend so how you can get model name if you want to use 7B parameter model then just go in the models and copy the tag similarly if you want to create use Falcon 40b parameter models then you can just go in its models and copies tag right here the things after that remain Sims this process can be used for any models in agiface the only thing you want to remember is if it is take simulation models summarizing models or any others model so let's get back to the code so in this video we'll be using Falcon 7B instruct now simply we pass the model two other tokenizers also we can use automodol for casual LMS to load the models but pipeline provided by organiface does all the hard work for us you can simply pass the model name and tokenizer to the pipeline and it will do rest of the work since in the early stage we have seen as Falcon 7B as text generation model we will give a name such as text Generations in the pipeline to say this work now after you run the sale the model just downloaded along with his tokenizers you can see the model size is around 4GB and along with these other models variant such as 9.95 GB now this is quite big also if you select other model for summarizons you simply have to change the text animations to summarization and the remaining things remain the same now comes the independence part the pipeline we set above can be triggered by using and prompt or question you want to ask so simply pass the prompt or your question to end Pipeline and it will return an result from there the main thing to understand here is the variable setup the max length 50 means the total length of the result generated is of 50 characters long and top k equals to 1 means it will generate only one probabilistic from all the result it compared in the model also remember that cater the length higher the inference time so for now we'll just keep it for 50. now if you ask your model within prompt of write a poem about Ronaldo in the nursery rhyme it will generate something like there's a boy named Ronaldo whose challenge for this score was CO2 be shown he kicked the ball with his fitted score many goals the length of the sequences generated can be increased if you just increase the max length to more so let's use it with lengthen if you have seen my previous video of line chain for the PDF and website there we have done information retrieval tax but here I want to show you something such as from base in the earlier Lang flow video we have seen how to create a prototype for an llms so let's borrow the concept from there either Lang flow there we use llm Gene which required prompt and the model so in the Lang chain in the chain section we can see parallel chain in the Langton also in the prompt we can see prompt template so the problem is solved let's import prompt template and llm chain from the luncheon since we have the pipeline set up already in above the llm becomes our pipeline in this case now we simply pass our template to The Prompt template here template means prompt itself and in the llm chain we pass prompt with llm the llm here is pipeline that we set up earlier if you want your model to be a little different and have diversity in the result you can just play around with the temperature yeah as of now I have set it to 0.01 so foreign along with the question we provide so if you choose a template such as URI intelligent chat board here the question with a brilliant answer we can get results such as IM Advanced chat language model I improvising several languages and converges screen size and many more this is what I want to show you today so to play around just change the temperature and you can get the result in case you want to use other open source model just copy the tag from the organ face as I have shown above and now you can experience with any llm models of your choice there is a new model of red pajamas and other models you can try on also remember not every tags you want to solve niche llm Israel models can also do your work if fine tune on specif talks so that's all for this video hope you learned something new if yes hit the like button and subscribe and if you have any question drop a comment would love to help thank you
Info
Channel: Whispering AI
Views: 146
Rating: undefined out of 5
Keywords: GPT-4, chatgpt for pdf files, ChatGPT for PDF, langchain openai, langchain in python, langchain demo, train gpt on documents, train openai, falcon llm, falcon-40B model, falcon-40B LLM, FALCON LLM Github, LLAMA, how to use falcon with langchain, langchain falcon, falcon, falcon 40b, falcon 7b llm, falcon 40b ai, falcon 40b ai llm, openai, chatgpt, artificial intelligence, ai, falcon ai model, falcon model, llama, open source model, red pajama, alpaca model, falcons, nlp
Id: gLfPzCYo-VQ
Channel Id: undefined
Length: 6min 53sec (413 seconds)
Published: Thu Jun 08 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.