Hello guys.
So we are going to continue the discussion with respect to Lang Chain.
And now we are going to get started to work with hugging Face.
Already in our previous videos we have seen how we can use hugging face embeddings.
But uh, in this module itself I will be talking more about hugging face.
And uh, you can see over here.
On May 14th, 2024, there was a article that was published by Hugging Face Itself.
Hugging Face and Lang chain are new partner package in Lang chain okay.
And previously like before May 14th.
Right.
Uh, everybody who really wanted to use LM models from Huggingface, uh, they had different set of
libraries that they usually used from Huggingface itself to call it, and it was really a daunting task.
But by this specific integration of Huggingface and Lang Chain, now it has become really, really easy.
And since our course in our course, we are completely focusing on the Lang chain ecosystem.
So Lang Chain has this hugging face integration also.
So we'll be talking about this as we go ahead.
So first of all, what I really want to do is that I want to go to Hugging face.co.
So please make sure that if you do not have an account go ahead and create an account in hugging face.co.
Now what exactly is hugging face for?
It's an amazing company.
It has.
If you just go ahead and click on the models over here, you'll be able to see it has tons and tons
of models.
It's just not like 1 or 2 model.
It has a huge repository of every kind of models that are probably available.
So here you can see Google Gamma two 9 billion parameter model is also available right.
Let it be open source.
Let it be paid.
Everything is there.
Uh, some of the models like OpenAI models will not be available over here.
But other than that I feel every model is available uh, paid models.
Uh uh, and over here you'll also be able to find both open source and paid models, also paid paid
models itself.
And to access paid models you have to probably use hugging face API endpoints.
You can create your endpoint with respect to any models itself, but there you will definitely require
a credit card and all.
Other than that, uh, hugging face still provides you so many different open source models which you
can completely, easily, uh, use it at any point of time.
So, uh, just to give you an example, let's say I want to probably perform something like image text
to text.
So see over here there are three categories of model that you will be able to see.
One is multi model.
Multi model basically means all those models which will be able to uh work both with text and images.
So here they will be able to understand both text and images.
So some of the model is over here.
Visual question answering document question answering.
Let's consider this particular model like image text to text.
Now we will go ahead and see one example over here Florence two large right.
And here you can actually see this is the model.
All the requirements is basically given.
Code is given how to call this particular model right.
And you can also use this particular model with the help of transformer library which is available in
hugging face.
Okay.
But again as our main aim is that our main aim is to simplify this calls to the LM models that is available
in the hugging face.
And for that we will be using a Lang chain package which is integrated with hugging face.
Okay, other than this, if I go back, you will be also able to see other multiple models like, uh,
computer vision.
In NLP, you have uh, text classification.
You have question answering.
Let's say if I go ahead and click on question answering, we'll be seeing so many different models.
Like like there's tons and tons of model.
Right.
So Hugging Face is one of the most popular company who is specifically working in this field of generative
AI with respect to any open source model.
Also, that comes, first of all, it will be available in Hugging Face and Kaggle.
And there are also other companies like whichever company is basically launching it.
They will also put there in their own website, but at the end of the day, they are going to do the
integration in Huggingface.
They're going to do the integration in long chain.
And all right.
So all this particular models is also available.
You can go ahead and check it out.
Text summarization is there let's say text summarization I want to go ahead and see gamma 29B I'll be
able to see over here.
I'll also able to see or check the inference API.
I'll say, hey, um, my name is Chris and I like something like this.
And if I go ahead and compute it, you will be able to see gamma two model is too large to be loaded.
Uh, please use spaces.
Okay.
Now it is telling you to use spaces because 9 billion parameter is there, right?
But you can go ahead and check out with any other models that you like.
Let's say I want to go ahead and try meta llama 8 billion parameters.
I don't know whether I'll be able to check or not.
So let's see over here.
Also the same issue right.
But smaller model.
You can actually go ahead and check the inferencing.
Okay.
Uh, so uh, what we are basically going to do is that now, I hope you have got an idea with respect
to what hugging face exactly is, you can go ahead and see more about it, the kind of documentation,
amazing posts are there, you know, and uh, slowly we'll be discussing about many things as we go
ahead and how we can actually create an end to end generative AI application with the help of both,
uh, long chain and hugging face.
That is what I'm actually going to discuss in the next video.
Okay.
Uh, if I go ahead and see the documentation page.
So here is what hugging face is basically there in the long chain documentation.
You can see how the installation is basically done.
And then we'll be talking about chat hugging face.
We'll be talking about this.
We'll be talking about hugging face embeddings.
Right.
Hugging face embeddings I think I have already spoken about and uh, some of the examples after doing
this will create an end to end project with the help of hugging face itself.
So, uh, yeah, this was it.
Uh, and you can probably read more about it, you know, so there is a new Python package that is designed
to bring the power of the latest development of hugging face into long chain.
Right.
So yeah, in the next video we will be discussing more about hugging Face and we will be seeing some
practical implementation.
And after that, finally we will implement an end to end project.
So yes, this was it from my side.
I will see you all in the next video.
Thank you.