Hello guys.
So we are going to continue our lecture series.
Uh, already in our previous video we have seen that how with the help of OpenAI API, we can probably
create a generative AI app.
One of the example that I had actually taken, I took this entire website as my data source.
I read all the content and uh, uh, converted this into documents.
Later on, I divided that documents into chunk of documents.
And after that we use some kind of embedding techniques, specifically OpenAI embedding technique,
to convert this text into vectors.
And finally, we also used for this, uh, which was a vector database.
And then with the help of document chain and retrieval, right, we were able to create an amazing LLM
gen AI application where we were also able to use gen, uh, LLM models along with our prompt engineering
that is prompt template.
And we were able to get the response from this particular text.
So all those things we specifically did and now the scenario will be that many people will not be having
open AI API, and obviously they they may not be even having credit card or they may not be uploading
$5 credits.
Right.
So for that, uh, this video will be super important because here I am going to use Olama.
And along with this I will be using your open source LLM models which you can run completely locally.
Right.
So if you don't know about Olama you will be able to run large language models, specifically open source
large language models in your local machine.
And then I will try to probably show you how you can create this generative AI application with the
help of this.
Okay.
So quickly, uh, let's do one thing.
First of all, you need to go ahead and download this Olama.
Right.
So this Olama, uh, it'll it is available for Mac OS, Linux, windows.
Right.
So all uh, operating system, it is obviously available.
Uh, but you need to have Windows 10 or later.
So right now I have Windows 11.
So if I go ahead and download this I will go ahead and click it.
So here you'll be able to see that uh exe file will get downloaded.
So this is the exe file.
You just need to double click it and just keep on pressing next next next.
And then uh the your Allama will start running.
Okay.
So just to give you an idea, once Allama will be running in your background, right in the background
services, you'll be able to see this kind of icon.
Right.
And this icon is nothing.
But, uh, this is the olama, uh, icon which will be running in the background process.
Okay.
So once you probably do the installation, uh, then, uh, I will just go ahead and tell you, like
what all things you can specifically do with Olama now, Olama, if you probably go ahead and visit
this GitHub.
Right.
It is completely open source.
Anybody can use it here.
It supports a lot of open source LM models like llama three B, llama three, 7B53, gamma gamma two,
uh gamma mistral.
Then you also have llama two uncensored lava solar.
So different different open source models like gamma.
Everything is there.
Okay.
Now, uh, once you download this llama, how to probably download this entire model.
So I will just go ahead and open my command prompt.
You can open your terminal if you are in Mac you know or Linux.
Now inside this I will just go ahead and right to run any models that I really want to work with, right?
Let's say that I want to go ahead and work with Lumetri.
So I will just go ahead and say, hey, uh, first of all, we need to download Luma three.
So here I will just go ahead and click this.
I'll remove this over here and paste it over here.
Right.
So as soon as I go ahead and write oh llama run llama three.
So initially let's say if in my machine this llama three is not downloaded.
So it will go ahead and download this entire LM model.
And uh, then uh, you'll be able to even execute it in this command prompt by just giving some input
and getting the response.
So let me just go ahead and press enter.
So here you'll be able to see that llama three is already downloaded in my machine.
So you'll not be able to get any configuration over here because, uh, usually when we are running
llama three, you know, it is going to it is nothing.
But, uh, let's say if I'm going to use this 8 billion parameters, it is nothing.
But it is for 4.7 GB file.
Right.
So here you can see as soon as I write llama run llama three.
Uh, since I have already downloaded it in my local machine for you, if you are doing it for the first
time, you'll be able to see that, uh, your llama three will get downloaded over here.
Okay, so in my case, since I do not want to make this particular video.
So I did this particular download beforehand.
Right now here let me just go ahead and write some message.
Hi.
You can see that how quick we are able to get the response.
This response is specifically coming from llama three.
So let me just go ahead and write what is generated by.
I will also be able to get the response quickly.
And this model is basically there in my local machine.
And it is basically interacting from there and how fast it is.
Right.
And obviously you need to have a good configuration of your system.
If you do not have it, it may take some time to get the response.
Okay, so obviously you can do this.
Uh, then I'll just go ahead and write exit.
Okay.
Uh, so here you'll be able to see that any type of conversation I will be able to use it over here
okay.
Similarly, any model that you really want to work with, right.
Let's say if I go ahead and write Llama Run, there is also one more model which is called as gamma.
Right.
So let's go ahead and download this gamma seven B okay.
So here you can see I'm just writing llama run gamma two B right.
2 billion parameters.
So here you can see.
Uh quickly we will go ahead and see this.
So if I go ahead and write this gamma run.
Uh, so first of all, let me do one thing quickly.
Okay.
So let me just execute it over here or let me just go ahead and open my command prompt again.
Okay.
And you can run it from anywhere.
So I will just go ahead and copy this entire thing.
Okay.
Paste it over here.
Now see I have also downloaded gamma two so directly I'm getting the prompt.
Hi.
Who are you?
Okay.
let me go ahead and write this particular message.
Who are you?
I'm a large language model trained by Google.
I'm a conversational AI that can assist with a wide range of tasks, including language translation,
translation and information retrieval and creative writing.
Right?
How can I help you today?
Please provide me a Python code to play snake game.
Okay, let's just go ahead and write this.
So this is my entire Python code.
You'll be able to see this.
And if you don't know about gamma it is an open source model by Google.
Right.
So we will be using this kind of models.
And along with this there are a lot of open source model like Pi three me mini you have Mistral, you
have neural chat.
You have code llama.
Code llama is specifically for getting response with respect to any kind of codes that you have, right.
So all these specific models, you'll be able to run it okay.
Okay.
So this was about the initial setup of Allama.
Uh and again uh, it is very much simple.
We just go over here, download the exe file or based on your Mac OS or Linux, uh, you get that particular
file extension and just go ahead and install it.
And once you install it it will be running.
And then with the help of command prompt, first of all, to use any model, let's say I want to go
ahead and use llama to or I want to go ahead and use llama three.
I have to first of all download it.
That is compulsory over there.
Let's say that in my next example, I will be showing you how I will be using gamma to be, uh, 2 billion
parameters model specifically to create my generative AI application.
And for that you have to first of all download that in your local machine.
Right.
So in my next video I will be showing you how you can go ahead and create a generative AI application
complete end to end.
Uh, that is what we are going to discuss about.
So I hope you like this particular video.
I will see you all in the next video.
Thank you.