Get the full source code of application here:
Show More Show Less View Video Transcript
0:00
Uh hello guys, welcome to this video. So
0:02
in this video, I'll show you a platform
0:06
where you can execute LLM AI models
0:10
directly in the browser itself. So I
0:12
found out this GitHub repo and this
0:15
actual website LLM is it is called. If
0:19
you go to this website, you will land on
0:22
this interface weblm.lc.ai.
0:27
This is the AI platform where you can
0:29
actually execute all the famous mod AI
0:33
models directly in the locally inside
0:35
browser. So you click the chat with LLM
0:40
button. It's completely free. It's open
0:42
source. So it has this GitHub repo. You
0:45
can even check out their source code as
0:46
well. So here this is a chat little kind
0:49
of an interface right here. And here you
0:52
will actually use all the models right
0:55
here. If you can see all the AI models,
0:59
Deep Seek, Gemini, Llama
1:02
or you can see all inside the drop-down
1:05
you can select whichever model that you
1:06
want to use
1:08
and after that here you basically ask a
1:11
question. So I will say build a ReactJS
1:15
app image to PDF.
1:22
So here you basically ask any sort of
1:24
question and depending upon that it will
1:28
try to actually answer you. So you can
1:32
say it's a chatbot
1:34
and uh
1:39
so here you can simply select whichever
1:42
model that you want to from this
1:44
dropdown. So all the popular models are
1:46
present right here and after that you
1:48
can chat with you can ask any sort of
1:51
question related. So this is actually a
1:54
chat bot
1:59
not necessarily to actually code but you
2:02
can if you want to stop it basically
2:05
right here you can even do that as well.
2:08
So,
2:16
so basically it will load all the models
2:20
right here and first of all it will show
2:22
you this percentage. So when it becomes
2:25
100%.
2:27
So it will load all the models right
2:29
inside the browser itself.
2:33
So it is fetching all the models LLM
2:36
models directly inside the browser.
2:40
So this will happen only once you
2:42
execute for the very first time in
2:45
concurrent request. This will not
2:47
happen. So
2:55
so it is explicitly mentioned right
2:57
here. It can take a while when we first
3:00
visit this page to populate the catch
3:03
later refreshes will will become faster.
3:06
So when you actually select any sort of
3:08
model right here, it will try to load
3:10
that model directly inside your browser.
3:13
So as you can see all these models AI
3:16
models are directly available.
3:21
So once the models load successfully
3:24
right in the browser itself, it will try
3:26
to answer questions
3:30
uh faster.
3:33
So you also have the button right here
3:34
new chat. You can actually click new
3:38
chat button to actually start a new
3:40
conversation. So we can simply say
3:46
you can ask any sort of question right
3:48
here. Who owns Google? again the it will
3:52
try to load that.
4:00
So So you can see it is loading that
4:02
model right here. So
4:16
if you you you will get this error that
4:19
is model not loaded error. So just wait
4:22
for the model to load properly. So once
4:26
it reaches 100%
4:28
you will able to
4:30
receive answers.
4:36
So you can see it's round about uh 4GB.
4:41
So it is actually loading that llm all
4:44
these popular models.
4:46
So the size of this model depends upon
4:48
which model you are using. So,
4:52
so the nice thing is that it's
4:53
completely free and you can do this
4:55
unlimited number of times as opposed to
4:58
many AI platforms where you need to pay
5:01
a subscription fee. This website allows
5:04
you to chat unlimited number of time and
5:07
definitely visit this website and uh all
5:10
the AI models popular AI models at the
5:13
right side in the select box. So once
5:16
you select any AI model, it will try to
5:19
load that model entirely in the browser
5:21
itself. And once the model is loaded,
5:25
you can actually ask any sort of
5:27
question. It can be a image generation
5:30
request as well or it can be any sort of
5:33
general questions. So just wait.
5:43
So I'm just not pausing anything. I'm
5:45
just showing you the entire process how
5:48
how much time it takes to load the
5:50
entire model.
6:00
So once it reaches 100% you will be able
6:03
to
6:06
so it is basically you can see AI models
6:09
directly running in the browser. So web
6:11
lm chart. So
6:14
you can just write web llm directly web
6:17
llm github. If you just write this on
6:21
google the very first result which comes
6:23
this is their github repo and you can
6:25
check out their source code as well how
6:27
they built this entirely it is available
6:29
as opensource.
6:31
So
6:35
you can even install this locally as
6:37
well by using npm command. npm install.
6:40
This is a command to install this
6:42
locally.
6:48
So you can see it has
6:53
it round about takes 3 minutes to
6:56
actually load this. So now it is loading
6:59
that model from cache.
7:21
So it will also load this GPU shader
7:24
modules as well. finishing loading on
7:28
web GPU Nvidia. So if you have a uh
7:32
custom
7:34
GPU inside your system then it will use
7:37
that GPU to actually load the models. So
7:40
now you can see it is actually thinking
7:42
I actually asked a question that who
7:44
owns Google. So now it is replying
8:06
So if I just ask a question.
8:19
You can even delete this.
8:21
I'll start this from.
8:37
So just select any sort of model.
8:47
So you can try this on your own system
8:49
as well directly in the browser itself.
8:51
Just load this and
8:56
it will be slow sometimes because it is
8:58
entirely running in the browser itself.
9:02
So you can basically execute it inside
9:04
your own browser as well if it is
9:06
working properly or not. So
9:10
this is the module web llm
9:15
and also check out my website
9:16
freemediattools.com
9:18
uh which contains thousands of tools.
#Programming
#Internet & Telecom
#Open Source
