Complete MLOPS Platform To Build LLMs Application In PostgresML-Bring ML code to your Database

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello my name is Kish naak and welcome to my you channel so guys today in this particular video we are going to see how we can build AI apps in postgress and this platform is basically called as postgress ml so first of all what exactly is postgress postgress is nothing but it is the world's most advanced open-source relational database that basically means now you can actually create your AI apps within the specific database and just by writing a simple SQL query you will be able to retrieve the results you'll be able to train the model you'll be also able to deploy the models so in this specific video I'm going to cover the entire demo about this by using this amazing platform and we'll be seeing that what all things we can actually do so what exactly is postra ml it is a complete mlops platform in a post gr SQL extension build simpler faster and more scalable models right inside your database now as you know guys whenever we probably write any kind of queries we can actually retrieve the results from the database quickly itself so here are the examples and we'll also be seeing what all things it'll be uh able to do you know so considering the task uh you can see over here text generation translation en to FN uh English to FR French text classification zero sort classification all the different kind of task it is able to do it along with this you can also create a machine learning model deep learning models even uh just by using llm models you can perform a lot of task itself so all those things I will be trying to show you in the demo itself in the postgress ml itself platform and I'll show you step by step what all things you should definitely do now uh some of the important things what all languages it specifically support python is there JavaScript is there SQL is there you know so you can probably do with all the three things but I'm pretty much interested with SQL because most of the people who are SQL Developer can definitely use this uh what you can build so here you have chat Bots you you here you have site search fraud detection forecasting and this is the most important thing in this particular platform right so if you have probably seen some of my end to end llm projects the older way was probably be using uh hugging face or open AI or Lang chain converting the entire data into vectors then quering it saving it in some kind of databases like mongod DB cassendra DB and then probably you know just squaring it doing some kind of similarity search and getting the result so here you could see that in the older way we has to probably implement lot of embedding models uh nearest neighbors prompt creation user data uh rlf data pruning model text generation and many more but now in postgress ml this entirely things all are embedded within them and just you need to probably query it after you save all the entire data in in the database itself and with respect to any query you will be able to get the response Okay so so uh machine learning as easy as 1 to three you will be also able to train deploy and predict it is 40 times faster than Python microservices and here you can see how many supported algorithms are there so you should definitely know all these things because tomorrow if you're specifically going into the industry if there is chances that you can probably make your application much more faster I would suggest always go ahead with project SML toolkits what all it supports it has hugging face light GBM py to tensor flow Sky kit learn XG boost and probably hugging face has almost all the libraries models what all it focuses on or supports llama wizard LM Mistral Falcon Orab the bloke the BT uh platypus and languages already we have spoken about there are lot many languages that has been supported by this is cc++ cop go Julia Lua node Pearl PHP python Ruby Rush Swift so amazing it is and with respect to IDs you can also use with vs code Jupiter powerbi and many more right so let's start this uh and let's see how good it is before I go ahead I really want to show you the GitHub uh again it is completely open source you can definitely go ahead and use it so um what exactly post Grace ml is it is a generative Ai and simple ml with postra SQL uh understand the database is post equal and all the tasks that we specifically do with respect to machine learning deep learning llm can be possible with it all this kind of task of NLP you can actually do Vector databases also it supports you can see some of the examples you know probably converting English into French you'll be able to get the result um sentiment analysis SQL query just by writing a SQL query like this select PG ml. transform pgml is basically the library itself which we may have to install also and here are multiple examples with respect to this right as I said that uh use any of the popular tools to connect postra SQL with SQL queries you can have all these kind of tools uh ID specifically more options you have with respect to different different programming languages they are specific libraries to do that so uh let's go ahead and one important task uh statement regarding the NLP task post ml integrate hugging fish Transformer to to bring stateof art NLP models in the data layer so let me quickly go ahead first of all uh I will go ahead and sign out and initially the step is to go ahead and sign up so I will continue with my Google account so here it is I'm continuing with my Google account itself over here just to try I've already created one uh data itself if you really want to create a database just go ahead and click on new database use any of these three I would suggest uh start with this state serverless it is completely free it supports Vector databases inferences Services document store if you want GPU this is there multiple GPU burst capability and click on get started as soon as you get click on get started you just create the database you have some caches storage GPU worker okay so once you do this uh I will go to my dashboard and this is how a database will probably get created you'll find all this information metrics activity any kind of activity that you are specifically doing so everything is there you can probably see that I have done some kind of query statements and all all the information is there now to start with just to quickly show you the demo over here you have lot of options like manage notebook projects models snapshot upload data you can also create your new database like if I probably go ahead and create a new database or upload data right like creating a table you can upload your CSV file and the table name with be with respect to that same CSV file and just upload it after that go to the notebook and you can probably create a new notebook like how I have actually creating this housing data set and I can start quering it okay but to begin with uh I'm going to show you multiple things one is deep learning with the with Transformers so this is what I'm going to show it and it also has this integrated jupyter notebook uh like how we have a jupyter notebook installed over here right so first task you can see over here uh we will be seeing with respect to translation if you it wants to probably convert any text from one language to the other we can use this technique so by default in this notebook you'll be able to see that we'll be having this pgml uh installed right so if you probably write this query see pgml do transform here you given the model name what it is basically going to translate from English to French the inputs what all inputs you specifically giving it will be in the form of array it's just like a list in Python so welcome to the future we have uh where have you all been where have you been all this time and I'm telling to convert as French so probably if you go ahead and execute it for executing again you can probably just enter shift enter like how we do into jupyter notebook or you can also click on run so as soon as I probably run this you'll be able to see the answer the translation test is this I don't know French so definitely check it out uh let's say if I say thank you and just execute it Mercy okay Mercy is right because that much French I can understand okay so here it is uh the next task is with respect to sentiment analysis now sentiment analysis here uses uh one use of text classification but there are many others the model uh returns both a label classification like positive neutral negative and all so here along with SQL you also have markdown option you can probably selected any kind of text like that and uh here you can see the example demonstrate specifying the model to be used rather than the task you can probably see over here I will just make it up uh rather than the task the robot large mnli model specifies the task of sentiment analysis so here also you can probably see how simple it is just by writing a SQL query you'll be able to do this now here you can see select pgml do transform again the model that I'm specifically using again this model can change again you can probably to refer the hugging face API itself and what models are specifically there for sentiment analysis you can mention that over here and inputs I love how amazingly simple ml has become I hate doing mes and tankist task so if I probably go ahead and execute this here you can probably see label neutral for the first score is 81 label neutral uh 76 okay so as positivity we are just trying to see as positivity if you probably go ahead and see with respect to negativity here also you'll be able to get the answer itself okay so this is another one amazing example um I will also be showing you how you can probably train machine learning and deep learning application and how simple it is basically to just to deploy okay now this is one example another uh test text summarization again uh for the entire documentation you can watch it over here it's more about using the best thing guys okay uh how things really become Easy by by coming up with all this kind of things that are there okay so here you can see again we have used pgml transform here we have used summarization input array is this one and we can probably read down this particular array and nine we will try to convert this over here and let's see what kind of text summarization we have got so here you can see Dominic Cobb is the foremost practitioner of the artist of the insertion of inserting oneself into a subject dreams so and so and so so this big text the text summarization is also ready now the next example is with respect to question answering again we have used open AI llm models you have seen all that in my videos we had to really write a lot of line of code importing installing and many things as such but just with a simple four liner code you can see that select pgml starts transform here you have question answering input array question is am I dreaming context is I got a good night sleep last night and started a simple tutorial over my cup of morning coffee the capabilities seem unreal compared to what I think and here if I probably see the answer answer is good night sleep okay so answer is staring me in the face and I feel the uncal call from Beyond the screen to check the results right I got a good night sleep so so that is what is the answer that is probably over here now similarly you can also do with respect to text generation again some models will be used uh three rings for the 11 Kings under the sky seven from the dwarf Lords in the hell in the halls of stone so again there also pg. transform everywhere pg. transform is there and it's more like a SQL query itself right so here if you probably execute it here you'll be able to see it three rings of logs and it is continued the statement with respect to the text generation again so super amazing super important uh you can probably use this at the end of the day everything this specific library is basically doing okay now the next thing is that uh let me show you one more notebook and let me just show you this handwritten uh image classification this is a uh this is basically a deep learning application now here you can see that within this Vector database they also default data sets so in order to load the data set I'll just go ahead and write select star from pgml dolo data set once I probably go ahead and execute it here you can probably see that this table it is showing it is having 1796 1797 records at the end of the day these are like handwritten digits in the form of arrays so we can view a sample of the data set again to view it select Target array to Json right this entire array is basically converted to Json uh this will be my second field from pgml do digits and we are just saying give the top 10 right so how easy it is basically becoming guys just imagine you're just writing simple SQL queries and from this only you'll able to get everything now the next thing is that how we can train this models okay so images are of eight 8 cross8 gray skilles so if you have probably seen M Mist data set so there you'll be also able to see that it has 0 to 9 characters okay so how to train it again in pgml you have transform one function was transform one function was load data set and then here you can probably see you just need to write select start from pgml do train whatever is the project name the project name you can give it over here task what kind of task you want to give it is a kind of classification specifically multiclass classification here the relation name will be pgml do digits which is basically coming from here pgml do digits and the target column is nothing but the target so here are the two information see Target and this pgml do digits so once you probably give this and execute it it will start doing the classification and here you can see projects handwritten task classification algorithm deployed false still we have not done the deployment I will show you how the deployment also happens with respect to this okay now we can view some on the prediction of the model on the training data so in order to do the training uh prediction I'm doing pgml do predict again same thing the model whatever we created in deep learning also there also we have train there also we have predict so predict handwritten images and this is what is the image that I'm giving as prediction and we can probably check it out so all the predictions you can see over here is correct for the top 10 record CS so it really creates a good model itself now if you really want to go ahead and see what all models it has basically created so you can probably go over here and click on models from this you can see all the models and probably linear uh svm has a very good accuracy so probably it'll be using SDM you can also select different different algorithms now all these algorithms are with different different F1 score okay I probably if you want to go ahead and see and probably create this you can go it over here so if I go down right see so this is my prediction now what we will do I've already executed that previously so that is all the models that you'll be seeing now here what I'm doing select project name from Models algorithm model metric F1 right all these things information from the models itself and then we are joining with respect to the project to make sure that we match with the project ID right so here it is and it has got executed this is what the F1 score that we are getting with respect to different different algorithms and then what you can do you can probably see for different different algorithms rid Taco stochastic passive svm this this is there so you just go and see it it is very simple it is very very simple guys because I'm just seeing select queries over here right support Vector machines this is this is there so I will just go and run it so here you'll be able to see all the task right this is really really good right now perfect uh now if I probably go into the models this will basically be my updated models all the models are there light GBM XG boost random Forest everything as such okay now once this model is basically created you can probably see all these models I will again go to the notebook and there is one notebook which is basically called as managing model deployments so if you probably go and see uh there is deploy the best model for prediction use so I'll say select star from pgml deploy handwritten digits bet score okay so based on the BET scores we are going to do the deployment so so here you can see that it has got successfully executed it hardly took 4.99 81 milliseconds and if I probably go ahead and now see the snapshot right so here you'll be able to see this is my next model that has got deployed so previous also I deployed one model but this is what is the most most recent model that you have you have all recent score you have all all this information right features everything so nicely it is basically done right so all the information you can probably see it over here table size this this this this right and just see the deployment prediction again prediction can basically be done with the notebooks itself so go ahead and now try it out you upload your own new data set as soon as you upload it make sure that you rename that particular data set and because that data set will be created as a form of a table itself and just by using this specific notebooks you can try it out not only this there is machine learning there is also tumor detection different different use cases are there which is quite amazing right automatically the model is basically getting created now what I feel guys as we go ahead right we should definitely move from the normal way of writing code to this kind of platforms because it will be super easy for you whenever you are executing things that you specifically know it is always good now you're going one head one one one one step ahead so you should know all these techniques as you go ahead so I hope you like this particular video so this was about the postgress ML please go ahead and check it out I'll will provide you all the link in the description of this particular video and let me know whether you like this particular video or not so yes this was it for my side I will see you in the next video have a great day thank you and all take care bye-bye
Info
Channel: Krish Naik
Views: 22,859
Rating: undefined out of 5
Keywords: yt::cc=on, postgresml, postgresml tutorials, bring ml code to your dtabase, machine learning tutorials, deep learni
Id: zT-cc1IblsQ
Channel Id: undefined
Length: 17min 37sec (1057 seconds)
Published: Mon Dec 18 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.