A Small Language Model (SLM) using Python

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

Computing For All

Computing For All

6 ай бұрын

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 5 ай бұрын
Amazing After All :) small pack with a big blast
@C4A
@C4A 5 ай бұрын
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
Рет қаралды 445
1 класс vs 11 класс  (игрушка)
00:30
БЕРТ
Рет қаралды 3,9 МЛН
ТАМАЕВ vs ВЕНГАЛБИ. ФИНАЛЬНАЯ ГОНКА! BMW M5 против CLS
47:36
I Analyzed My Finance With Local LLMs
17:51
Thu Vu data analytics
Рет қаралды 420 М.
Should You Use Open Source Large Language Models?
6:40
IBM Technology
Рет қаралды 339 М.
Don’t Build AI Products The Way Everyone Else Is Doing It
12:52
Steve (Builder.io)
Рет қаралды 339 М.
Build your first machine learning model in Python
30:57
Data Professor
Рет қаралды 273 М.
Language Models For Software Developers in 17 Minutes
16:59
Code to the Moon
Рет қаралды 158 М.
После ввода кода - протирайте панель
0:18
AI от Apple - ОБЪЯСНЯЕМ
24:19
Droider
Рет қаралды 127 М.
Дени против умной колонки😁
0:40
Deni & Mani
Рет қаралды 12 МЛН