A Small Language Model (SLM) using Python

  Рет қаралды 7,512

Computing For All

Computing For All

7 ай бұрын

Let me guess, you are familiar with Large Language Models or LLMs, or at least you have heard of them. An example is GPT, which is the backbone of ChatGPT. A part of the current AI revolution is coming from large language models. Speaking of LLMs, a critical question is, what is a small language model, or SLM?
A small language model generally refers to a language model with a lot fewer parameters, simpler architecture, or limited training data compared to LLMs. Small language models are faster to train and use less computational resources. SLMs typically have less capability to understand and generate complex language.
Can we create a ChatBot using a small language model? Yes, that is exactly what we are going to do today, we will write a ChatModel using an SLM.
We will be using a very very small language model, a language model so small that it might not even be considered a small language model. We will be using a bigram model to create a ChatBot. The ChatBot we will create will require one word as a prompt, and the bot will generate as many words as you ask for. The quality of the generated text will not be that awesome, but it is fine because today’s entire practice is for clarity of how a basic small language model can be used to build a basic chatbot.
I will use no neural networks, and no complex coding. I will use old-fashioned NLTK for creating the bigrams.
Here is the code for the Chatbot using the SLM: colab.research.google.com/dri...
Here is the code to create the data folder: colab.research.google.com/dri...
Dr. Shahriar Hossain
computing4all.com

Пікірлер: 7
@ashraf_isb
@ashraf_isb Ай бұрын
kudos to you, you did this 5 months back where now people are taking about slms! good job and thanks for this!
@C4A
@C4A Ай бұрын
Thank you for the kind words!
@kunalsoni7681
@kunalsoni7681 6 ай бұрын
Amazing After All :) small pack with a big blast
@C4A
@C4A 6 ай бұрын
Glad to hear that you liked it. Thank you for watching!
@RiteshKumar-zy6zt
@RiteshKumar-zy6zt 2 ай бұрын
sir, can you suggest any small language model that could generate good structured response and text summarization.
@deeplearner-hinglish
@deeplearner-hinglish 5 ай бұрын
No, this is only for 2-3 words answer responses in chatbot, This time is gone. Building a chatbot using Bigram SLM is good. But we cannot frame a whole sentence by this. In my opinion this is a failure.
@C4A
@C4A 5 ай бұрын
Absolutely, this video is for educational purposes, just to demonstrate how the simplest idea works. The code is not intended for any functional chatbot. Thank you for watching.
RNNs to LLMs: Is it the Attention that All You Need?
8:09
Computing For All
Рет қаралды 453
MEGA BOXES ARE BACK!!!
08:53
Brawl Stars
Рет қаралды 33 МЛН
Can teeth really be exchanged for gifts#joker #shorts
00:45
Untitled Joker
Рет қаралды 16 МЛН
FOOLED THE GUARD🤢
00:54
INO
Рет қаралды 62 МЛН
She ruined my dominos! 😭 Cool train tool helps me #gadget
00:40
Go Gizmo!
Рет қаралды 58 МЛН
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 267 М.
I Analyzed My Finance With Local LLMs
17:51
Thu Vu data analytics
Рет қаралды 426 М.
Don’t Build AI Products The Way Everyone Else Is Doing It
12:52
Steve (Builder.io)
Рет қаралды 339 М.
AI Forum 2023 | The Small Models Revolution
20:57
Microsoft Research
Рет қаралды 3,3 М.
Training Your Own AI Model Is Not As Hard As You (Probably) Think
10:24
Steve (Builder.io)
Рет қаралды 448 М.
You need to learn AI in 2024! (And here is your roadmap)
45:21
David Bombal
Рет қаралды 651 М.
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 793 М.
Language Models For Software Developers in 17 Minutes
16:59
Code to the Moon
Рет қаралды 158 М.
Iphone or nokia
0:15
rishton vines😇
Рет қаралды 1,9 МЛН
Samsung S24 Ultra professional shooting kit #shorts
0:12
Photographer Army
Рет қаралды 31 МЛН
cute mini iphone
0:34
승비니 Seungbini
Рет қаралды 4,8 МЛН