SlideShare a Scribd company logo
1 of 12
THE MECHANICS
OF
LARGE LANGUAGE MODELS
Large Language Models (LLMs) vs. AI Chat Bots
What AI Chat Bots can do :
What LLMs can do :
1
Once upon a
time, …..
Write
a story.
Write
a story.
Once upon a
time, …..
 Write Stories
 Write Jokes
 Make conversation
 …
Large Language Models (LLMs)
2
 Large Language Models (LLMs) are machine learning models that can understand and
generate human-like text.
 These models are trained on vast amounts of text data from the internet and other
sources to learn the patterns and rules of human language.
 Some major LLMs are :
 OpenAI's GPT series of models (e.g., GPT-3.5 and GPT-4)
 Google's PaLM and Gemini models
 Meta's LLaMA model
How do LLMs work?
The Idea?
Next Word Prediction
How to implement the Idea?
Word Embedding
Attention Mechanism
Transformer
Architecture
3
NEXT WORD PREDICTION
4
Context
Predicted Once upon a time ,
Next Word
LLM
Input Write a Once Upon a time
Story.
User query : Write a story.
NEXT WORD PREDICTION
Autocomplete Context LLM
How to implement Next Word prediction?
 Word Embedding
 Attention Mechanism
 Transformer Architecture
5
Word Embedding
 Words Numbers
6
Where would you put the word “Apple”?
b
a
c
d
:b
Attention Mechanism
• Sentence 1: The bank of the river.
• Sentence 2: Money in the bank.
8
Question :
• How to Decide Which Words Determine
Context?
How do humans derive the context?
: Neighbouring Words
Attention Mechanism
 How to Decide Which Words Determine Context?
Answer: Similarity
10
Attention Mechanism
 How to Decide Which Words Determine Context?
Answer: Similarity
The bank of the river Money in the bank
The Attention Mechanism allows the model to focus and place more “Attention” on the relevant
words, to derive the context.
11
The bank Of river
bank 0 1 0 0.1
Money in the bank
bank 0.2 0 0 1
Transformer Architecture
 Transformer :
Concatenation of many
transformer blocks.
12
: Maps input (user query) to output(response).
: Keeps track of the context.
Neural Network
Attention
 Transformer Block :
 Neural Network
 Attention Layer
Transformer
Block
Neural Network: Machine Learning model inspired by human brain’s neural network.
Neural Network
Attention
Neural Network
Attention
Neural Network
Attention
Transformer Block Transformer Block Transformer Block
Input :
Write a
story
Output:
Once
Thank You!

More Related Content

Similar to THE MECHANICS AND APPLICATIONS OF LARGE LANGUAGE MODELS.pptx

Using Generative AI in the Classroom .pptx
Using Generative AI in the Classroom .pptxUsing Generative AI in the Classroom .pptx
Using Generative AI in the Classroom .pptxJonathanDietz3
 
Collaborative Ontology Building Project
Collaborative Ontology Building Project  Collaborative Ontology Building Project
Collaborative Ontology Building Project Jie Bao
 
Semantic Web 2.0
Semantic Web 2.0Semantic Web 2.0
Semantic Web 2.0hchen1
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Jordi Cabot
 
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_Students
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_StudentsNLP_A Chat-Bot_answering_queries_of_UT-Dallas_Students
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_StudentsHimanshu kandwal
 
Using construction grammar in conversational systems
Using construction grammar in conversational systemsUsing construction grammar in conversational systems
Using construction grammar in conversational systemsCJ Jenkins
 
Patterns of Semantic Integration
Patterns of Semantic IntegrationPatterns of Semantic Integration
Patterns of Semantic IntegrationOptum
 
Java one2016 con3054-watsonap-is
Java one2016 con3054-watsonap-isJava one2016 con3054-watsonap-is
Java one2016 con3054-watsonap-issandhya kapoor
 
Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs Dev_Events
 
Java one2016 con3054-watsonap-is
Java one2016 con3054-watsonap-isJava one2016 con3054-watsonap-is
Java one2016 con3054-watsonap-issandhya kapoor
 
Large Language Models Bootcamp
Large Language Models BootcampLarge Language Models Bootcamp
Large Language Models BootcampData Science Dojo
 
Designing & Implementing Hypermedia APIs – Mike Amundsen, Principal API Archi...
Designing & Implementing Hypermedia APIs – Mike Amundsen, Principal API Archi...Designing & Implementing Hypermedia APIs – Mike Amundsen, Principal API Archi...
Designing & Implementing Hypermedia APIs – Mike Amundsen, Principal API Archi...CA API Management
 
An Intelligent Chatbot for College Enquiry with Amazon Lex
An Intelligent Chatbot for College Enquiry with Amazon LexAn Intelligent Chatbot for College Enquiry with Amazon Lex
An Intelligent Chatbot for College Enquiry with Amazon LexIRJET Journal
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine LearningSri Ambati
 
Chatbots and Natural Language Generation - A Bird Eyes View
Chatbots and Natural Language Generation - A Bird Eyes ViewChatbots and Natural Language Generation - A Bird Eyes View
Chatbots and Natural Language Generation - A Bird Eyes ViewMark Cieliebak
 
[246]reasoning, attention and memory toward differentiable reasoning machines
[246]reasoning, attention and memory   toward differentiable reasoning machines[246]reasoning, attention and memory   toward differentiable reasoning machines
[246]reasoning, attention and memory toward differentiable reasoning machinesNAVER D2
 
Future platform for internet of things
Future platform for internet of thingsFuture platform for internet of things
Future platform for internet of thingsColdbeans Software
 
Nautral Langauge Processing - Basics / Non Technical
Nautral Langauge Processing - Basics / Non Technical Nautral Langauge Processing - Basics / Non Technical
Nautral Langauge Processing - Basics / Non Technical Dhruv Gohil
 

Similar to THE MECHANICS AND APPLICATIONS OF LARGE LANGUAGE MODELS.pptx (20)

Using Generative AI in the Classroom .pptx
Using Generative AI in the Classroom .pptxUsing Generative AI in the Classroom .pptx
Using Generative AI in the Classroom .pptx
 
ijeter35852020.pdf
ijeter35852020.pdfijeter35852020.pdf
ijeter35852020.pdf
 
Collaborative Ontology Building Project
Collaborative Ontology Building Project  Collaborative Ontology Building Project
Collaborative Ontology Building Project
 
Semantic Web 2.0
Semantic Web 2.0Semantic Web 2.0
Semantic Web 2.0
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?
 
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_Students
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_StudentsNLP_A Chat-Bot_answering_queries_of_UT-Dallas_Students
NLP_A Chat-Bot_answering_queries_of_UT-Dallas_Students
 
Using construction grammar in conversational systems
Using construction grammar in conversational systemsUsing construction grammar in conversational systems
Using construction grammar in conversational systems
 
Patterns of Semantic Integration
Patterns of Semantic IntegrationPatterns of Semantic Integration
Patterns of Semantic Integration
 
Java one2016 con3054-watsonap-is
Java one2016 con3054-watsonap-isJava one2016 con3054-watsonap-is
Java one2016 con3054-watsonap-is
 
Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs
 
Java one2016 con3054-watsonap-is
Java one2016 con3054-watsonap-isJava one2016 con3054-watsonap-is
Java one2016 con3054-watsonap-is
 
Large Language Models Bootcamp
Large Language Models BootcampLarge Language Models Bootcamp
Large Language Models Bootcamp
 
Designing & Implementing Hypermedia APIs – Mike Amundsen, Principal API Archi...
Designing & Implementing Hypermedia APIs – Mike Amundsen, Principal API Archi...Designing & Implementing Hypermedia APIs – Mike Amundsen, Principal API Archi...
Designing & Implementing Hypermedia APIs – Mike Amundsen, Principal API Archi...
 
An Intelligent Chatbot for College Enquiry with Amazon Lex
An Intelligent Chatbot for College Enquiry with Amazon LexAn Intelligent Chatbot for College Enquiry with Amazon Lex
An Intelligent Chatbot for College Enquiry with Amazon Lex
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
 
Chatbots and Natural Language Generation - A Bird Eyes View
Chatbots and Natural Language Generation - A Bird Eyes ViewChatbots and Natural Language Generation - A Bird Eyes View
Chatbots and Natural Language Generation - A Bird Eyes View
 
[246]reasoning, attention and memory toward differentiable reasoning machines
[246]reasoning, attention and memory   toward differentiable reasoning machines[246]reasoning, attention and memory   toward differentiable reasoning machines
[246]reasoning, attention and memory toward differentiable reasoning machines
 
Future platform for internet of things
Future platform for internet of thingsFuture platform for internet of things
Future platform for internet of things
 
Nautral Langauge Processing - Basics / Non Technical
Nautral Langauge Processing - Basics / Non Technical Nautral Langauge Processing - Basics / Non Technical
Nautral Langauge Processing - Basics / Non Technical
 

Recently uploaded

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 

Recently uploaded (20)

Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 

THE MECHANICS AND APPLICATIONS OF LARGE LANGUAGE MODELS.pptx

  • 2. Large Language Models (LLMs) vs. AI Chat Bots What AI Chat Bots can do : What LLMs can do : 1 Once upon a time, ….. Write a story. Write a story. Once upon a time, …..  Write Stories  Write Jokes  Make conversation  …
  • 3. Large Language Models (LLMs) 2  Large Language Models (LLMs) are machine learning models that can understand and generate human-like text.  These models are trained on vast amounts of text data from the internet and other sources to learn the patterns and rules of human language.  Some major LLMs are :  OpenAI's GPT series of models (e.g., GPT-3.5 and GPT-4)  Google's PaLM and Gemini models  Meta's LLaMA model
  • 4. How do LLMs work? The Idea? Next Word Prediction How to implement the Idea? Word Embedding Attention Mechanism Transformer Architecture 3
  • 5. NEXT WORD PREDICTION 4 Context Predicted Once upon a time , Next Word LLM Input Write a Once Upon a time Story. User query : Write a story.
  • 6. NEXT WORD PREDICTION Autocomplete Context LLM How to implement Next Word prediction?  Word Embedding  Attention Mechanism  Transformer Architecture 5
  • 7. Word Embedding  Words Numbers 6 Where would you put the word “Apple”? b a c d :b
  • 8. Attention Mechanism • Sentence 1: The bank of the river. • Sentence 2: Money in the bank. 8 Question : • How to Decide Which Words Determine Context? How do humans derive the context? : Neighbouring Words
  • 9. Attention Mechanism  How to Decide Which Words Determine Context? Answer: Similarity 10
  • 10. Attention Mechanism  How to Decide Which Words Determine Context? Answer: Similarity The bank of the river Money in the bank The Attention Mechanism allows the model to focus and place more “Attention” on the relevant words, to derive the context. 11 The bank Of river bank 0 1 0 0.1 Money in the bank bank 0.2 0 0 1
  • 11. Transformer Architecture  Transformer : Concatenation of many transformer blocks. 12 : Maps input (user query) to output(response). : Keeps track of the context. Neural Network Attention  Transformer Block :  Neural Network  Attention Layer Transformer Block Neural Network: Machine Learning model inspired by human brain’s neural network. Neural Network Attention Neural Network Attention Neural Network Attention Transformer Block Transformer Block Transformer Block Input : Write a story Output: Once