Different Terminologies: LLMs, Gen AI, Deep Learning, Machine Learning
Artificial Intelligence is the broadest domain — the biggest umbrella. Inside it sits a smaller umbrella called Machine Learning. Inside that is an even smaller one called Deep Learning. And inside Deep Learning sits LLMs.
LLMs represent a specific application of deep learning techniques, using their ability to process and generate human-like text.
Nesting order (outer to inner): Artificial Intelligence → Machine Learning → Deep Learning → LLM
LLMs (Large Language Models)
Deep neural networks trained on massive amounts of data, designed to understand, generate, and respond to human-like text — and sometimes respond like a human.
Why “Large” Language Models?
These models have billions of parameters and can perform a wide range of NLP (Natural Language Processing) tasks — answering questions, translation, sentiment analysis, and much more.
Traditional NLP models were built for one specific task, like translation. LLMs, by contrast, can handle many different tasks at once. Older models couldn’t write an email from custom instructions — a task that’s now trivial for modern LLMs.
What Makes LLMs So Good? The Secret Ingredient
Most modern LLMs rely on the Transformer architecture — a deep neural network architecture introduced in the 2017 paper “Attention Is All You Need.” The original Transformer was built for machine translation.
Simplified Transformer Architecture (Step by Step)
- Input text to be translated.
- Preprocessing (Tokenization): the input sentence is split into small units called tokens. Example: “I LOVE AI” → [“I”, “LOVE”, “AI”]
- Embedding: each token is converted into a numerical vector called an embedding, which helps the model understand meaning and relationships between words.
- The encoder passes this embedded vector to the decoder.
- A partial output is generated.
- The decoder completes the output one word at a time, predicting the next most likely word until the sentence is finished.
- The complete output translation is returned.
Transformers vs. LLMs
- Not all transformers are LLMs — transformers are also used in computer vision.
- Not all LLMs are transformers — some LLMs are based on recurrent or convolutional architectures instead.
The Attention Mechanism
Attention is the key part of transformers that lets the model weigh the importance of different words relative to each other. It enables the model to capture long-range dependencies — meaning it can remember and use information from words that appeared much earlier in a sentence or paragraph.
BERT vs. GPT
BERT (Bidirectional Encoder Representations from Transformers)
- Predicts hidden/masked words within a given sentence.
GPT (Generative Pretrained Transformer)
- Uses a decoder-only architecture.
- Generates new text, one word at a time.
Applications of LLMs
- Creative content & marketing
- Chatbots / virtual assistants
- Machine translation
- New text generation
- Sentiment analysis
