🧠 Jargons in Generative AI (GenAI): A Beginner-Friendly Breakdown

Vimal NegiVimal Negi
8 min read

1. Introduction

  • What is Generative AI?

📦 2. The Backbone of GenAI: The Transformer

  • Origin of the Transformer Model

  • Key idea from “Attention Is All You Need”


🧩 3. Encoder vs Decoder

  • What is an Encoder?

  • What is a Decoder?

  • Encoder-only, Decoder-only, and Encoder-Decoder models (e.g., BERT vs GPT vs T5)


🧮 4. Vectors & Embeddings

  • What are vectors in GenAI?

  • Word embeddings and their role in understanding meaning


📏 5. Positional Encoding

  • Why Transformers need positions

  • Sinusoidal encoding explained visually


🧠 6. Self-Attention Mechanism

  • How self-attention works

  • Importance of relationships between words


🎯 7. Softmax & Probability Distributions

  • What Softmax does in attention

  • Why it's used in model outputs


🧠💥 8. Multi-Head Attention

  • Why attention is divided into heads

  • How multiple heads help the model learn context better


🗣️ 9. Tokenization

  • What are tokens?

  • Byte Pair Encoding (BPE) and other methods

  • Role of vocab_size in tokenization


📉 10. Knowledge Cutoff

  • What is a model’s knowledge cutoff?

  • Why models like ChatGPT don’t know events beyond a certain date


🧾 11. Vocab Size

  • What does vocab_size mean in GenAI models?

  • How vocabulary influences model capability and size


🧵 12. Semantic Meaning & Context

  • Difference between word-level and context-level understanding

  • How GenAI captures “meaning”


🧠📈 13. Bringing It All Together

  • How all these components work in harmony

  • Real-world examples (ChatGPT, Claude, LLaMA)


🖊️ 14. Conclusion

  • Recap of key terms

  • How to dive deeper (links to resources or your other blogs)

INTRODUCTION-:

🤖 What is Generative AI?

Generative AI (GenAI) refers to a class of artificial intelligence models that can generate new content — such as text, images, music, audio, or even code — that resembles human-created data.

Instead of just analyzing or classifying data, Generative AI learns patterns from large datasets and uses that knowledge to create something new.It just predicts the next token and thats it.

The most easiest example is You learned how to write a hello world program in python now if

someone ask you to write a program to print hello you are able to do that na that’s the most easiest working example of genAI

📦 2. The Backbone of GenAI: The Transformer

  • In 2017, Google researchers published the groundbreaking paper titled "Attention Is All You Need". This paper introduced the Transformer architecture, a new approach to processing sequential data that moved away from traditional RNNs and LSTMs.

    Originally designed to improve machine translation — translating transcripts from one language to another — the Transformer model demonstrated remarkable performance and scalability. Its key innovation was the self-attention mechanism, which allowed the model to weigh the importance of different words in a sequence, regardless of their position.

    This architecture laid the foundation for nearly all modern large language models (LLMs), including BERT, GPT, T5, LLaMA, and others. What started as a solution for language translation soon became the backbone of Generative AI as we know it today.

  • ⚙️ How GPT Works (The Core of Generative AI)

    GPT stands for Generative Pretrained Transformer.
    Let’s break that down:

    • Generative → It can generate new content (text, code, etc.).

    • Pretrained → It has already been trained on a huge dataset before you use it.

    • Transformer → A type of model that transforms input into meaningful output using attention mechanisms.

Let’s understand the major phases involved in how GPT (and Transformers in general) work:


🧾 1. Encoding (Tokenization)

When you input a query (like “Tell me a joke”), the model doesn’t understand natural language — it understands numbers.
So the first step is tokenization, where your input is converted into numeric pieces called tokens.

For example:
"The cat sat"[133, 45, 78] (These numbers are token IDs.)


🧠 2. Vector Embeddings

These token numbers don’t mean anything by themselves.
So the model maps them into dense vectors — points in a multi-dimensional space — where semantic meaning can be learned.

Think of it as arranging words in 3D space such that similar meanings stay closer (e.g., “king” is close to “queen”).


📍 3. Positional Encoding

Now, what if you input:

Cat sat on the mat
vs
Mat sat on the cat

Both have the same tokens, but their word order changes the meaning.

To fix this, positional encoding is added to let the model know where each word appears in the sequence.


🧠 4. Self-Attention

Context matters. For example:

  • “The river bank

  • “The ICICI bank

The word “bank” means different things depending on the surrounding words.

In self-attention, every word (token) can attend to other tokens and adjust its understanding accordingly — allowing the model to capture the full meaning of each word in context.


🧠💥 5. Multi-Head Attention

Different "heads" in the attention mechanism focus on different aspects — like who, what, where, or when.

For example:
“The cat is in the train.”
Multi-head attention might consider:

  • Where is the cat?

  • Who is the cat?

  • When is this happening?

This helps the model understand complex relationships in parallel.


💬🔄 Feed Forward Layer, Linear Layer & Softmax — How GPT Makes Decisions

After the input has gone through embedding, self-attention, and multi-head attention, it passes through the final layers that help the model decide the next token to generate. Let’s break these layers down:


🧠 Feed Forward Layer

The Feed Forward Neural Network (FFN) is a key component in the Transformer block.

  • It's a simple neural network that processes each token independently after attention.

  • It learns complex transformations by applying non-linear functions and helps the model become more expressive.

🧪 During training:

  • A loss function is calculated, which measures how far the model's predicted output is from the actual output.

  • Then, the model adjusts its internal weights to reduce this loss.

Think of the loss function as the "error detector" and the feed-forward network as the "brain that learns from mistakes."


📊 Linear Layer

Once the model has processed the input, the next step is to predict the next token.

  • The Linear Layer takes the processed vector and maps it to the full vocabulary size.

  • This gives a score (logit) for every possible token in the vocabulary.

For example, if you input “My name”, the linear layer might assign the highest score to the token “is” — because that’s the most likely continuation.


🔢 Softmax Layer

The Softmax function turns those raw scores from the Linear layer into probabilities.

  • It shows how likely each token is to be the next one.

  • All probabilities sum to 1.

🎲 What Softmax controls:

  • A "peaky" softmax (with sharp differences) means one token is clearly the best next token.

  • A "flat" softmax (more random) allows for more diversity — which is useful for creative or varied responses.

So, if Softmax assigns 90% to “is” and 2% to “was,” GPT is very confident the next word is “is”.


🧠 That’s How GPT Generates Output

  1. Encodes your input (as numbers → vectors),

  2. Passes through attention and transformer layers,

  3. Uses a Feed Forward network to learn patterns,

  4. Uses a Linear + Softmax layer to guess the next token,

  5. Repeats this process to generate full sentences — one token at a time.

🧠 Knowledge Cutoff

The Knowledge Cutoff refers to the latest point in time up to which an AI model has been trained on data.
Once the model is trained, it does not learn continuously — it doesn’t browse the internet or update itself in real-time.

For example, if a model has a knowledge cutoff in April 2023, it will not know anything that happened after that date — like recent events, news, or updates.

This is why responses related to current affairs, product launches, or evolving technologies might be outdated or missing altogether unless the model has access to real-time tools.


📚 Vocabulary Size (Vocab Size)

Vocab Size refers to the total number of unique tokens (words, subwords, or characters) that a model recognizes and uses internally.

For example:

  • GPT-3 has a vocab size of ~50,000 tokens.

  • GPT-4 and GPT-4o use vocab sizes close to 100K or 200K+ tokens, depending on tokenizer.

Larger vocabularies:

  • Allow finer representation of rare words.

  • Help with multilingual capabilities.

  • Improve compression and efficiency of input and output.

The vocab size directly impacts the model’s ability to understand and generate diverse and high-quality language.


🏁 Conclusion

Generative AI is powered by a combination of deep learning, massive datasets, and the revolutionary Transformer architecture. From tokenization and embeddings to attention mechanisms and decoding — every component plays a key role in how models like GPT understand and generate human-like responses.

By understanding these core jargons — like self-attention, positional encoding, vector embeddings, and more — you not only gain technical insight but also unlock the ability to build smarter, AI-driven solutions.

Whether you're a beginner or an AI enthusiast, grasping these fundamentals is the first step to mastering the world of GenAI.

0
Subscribe to my newsletter

Read articles from Vimal Negi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Vimal Negi
Vimal Negi