Introduction
Before you start writing code or fine-tuning the model, you need to have a big picture of the field. The first lesson will help you understand what AI is, how the related concepts differ, and why 2022–2025 is an unprecedented boom for LLM.
1. What is AI? Brief history (1950 → present)
Artificial Intelligence (AI) is the branch of computer science that studies how to create systems capable of performing tasks that typically require human intelligence: recognizing images, understanding language, playing chess, driving, etc.
Main timeline
| Year | Events |
|---|---|
| 1950 | Alan Turing proposed the "Turing Test" — a test to see if a machine can simulate a human |
| 1956 | Dartmouth Conference — the term "Artificial Intelligence" was officially born |
| 1960s–70s | The first "AI Winter": expectations far exceed reality, funding dries up |
| 1980s | Expert Systems boomed and then declined; "AI Winter" Monday |
| 1997 | Deep Blue (IBM) defeated Garry Kasparov — a milestone in AI history |
| 2006 | Geoffrey Hinton Revives Deep Learning with "Deep Belief Networks" |
| 2012 | AlexNet wins over ImageNet by a large margin — Deep Learning becomes mainstream |
| 2017 | Google Brain publishes the article "Attention Is All You Need" → Transformer architecture |
| 2018 | Google BERT; OpenAI GPT-1 |
| 2020 | GPT-3 (175 billion parameters) shocks the community |
| 2022 | ChatGPT launched — AI reaches 100 million users in 2 months |
| 2023–2025 | LLM race: GPT-4, Claude 3, Gemini, LLaMA 3, Mistral... |
2. Distinguish between AI / Machine Learning / Deep Learning / LLM
Many people use these terms interchangeably, but they are nested, not synonymous.

┌─────────────────────────────────────────────────────┐
│ Trí tuệ nhân tạo (AI) │
│ │
│ ┌─────────────────────────────────────────────┐ │
│ │ Machine Learning (ML) │ │
│ │ │ │
│ │ ┌─────────────────────────────────────┐ │ │
│ │ │ Deep Learning (DL) │ │ │
│ │ │ │ │ │
│ │ │ ┌─────────────────────────────┐ │ │ │
│ │ │ │ Large Language Models │ │ │ │
│ │ │ │ (LLM) │ │ │ │
│ │ │ └─────────────────────────────┘ │ │ │
│ │ └─────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────┘
Detailed comparison
| Concept | Definition | Example | Need data |
|---|---|---|---|
| AI | Human intelligence simulation system | Chess engine, chatbot, self-driving car | Depending on type |
| ML | AI learns from data instead of hard programming | Spam filter, Netflix suggestions | Thousands - millions of samples |
| DL | ML uses multi-layer neural networks | Face recognition, translation | Millions - billions of samples |
| LLM | Extremely large-scale DL, text-based training | ChatGPT, Claude, Gemini | Trillions of tokens |
Bottom line: Not all AI is ML, not all ML is DL, and LLM is a special form of DL.
3. Why is LLM booming in 2022–2025?
3.1 The ChatGPT Moment
On November 30, 2022, OpenAI launched ChatGPT. In just the first 5 days, it reached 1 million users — faster than any technology product in history. By January 2023 there were 100 million users. This is the first time AI has become a popular tool for the general public, not just for researchers.
3.2 Scaling Laws — Scaling Laws
In 2020, OpenAI published an important paper on Scaling Laws: if you simultaneously increase the number of model parameters, the amount of data, and the computational power by a certain ratio, performance will improve in a predictable way.
Hiệu năng ∝ (Tham số)^α × (Dữ liệu)^β × (Compute)^γ
This means: no need for algorithmic breakthroughs — just money and GPU, you can build better models. This is why big companies are pouring billions of dollars into the AI race.
3.3 Three factors converge
- Data: The Internet generates trillions of words of text (Common Crawl, Wikipedia, GitHub, books...)
- Calculation: GPUs/TPUs are getting more powerful (NVIDIA A100, H100); Cloud computing is popular
- Architecture: Transformer (2017) replaces RNN — better parallelization, better scaling
3.4 RLHF — Secret of ChatGPT
ChatGPT is not just a bigger GPT-3. The secret is RLHF (Reinforcement Learning from Human Feedback): train the model to respond in accordance with human expectations and values, rather than just optimizing for "guessing the next word". This is the leap from "language model" to "AI assistant".
4. Featured LLMs: Comparison Table
| Model | Organization | Params (estimate) | Open Source | Strengths |
|---|---|---|---|---|
| GPT-4o | OpenAI | ~200B (hidden) | No | Versatile, multimodal, tool use |
| Claude 3.5 Sonnets | Anthropic | ~100B (hidden) | No | Long arguments, safety, coding |
| Gemini 1.5 Pro | ~500B (hidden) | No | Context window 1M tokens | |
| LLaMA 3.1 405B | Meta | 405B | Yes | Most powerful open-source, self-hostable |
| Mistral Large | Mistral AI | ~100B (hidden) | Part | Efficient, multilingual |
| Qwen2.5 72B | Alibaba | 72B | Yes | Code, math, good Chinese/Vietnamese |
| Phi-3.5 | Microsoft | 3.8B | Yes | Compact, can run on laptop |
Note to learners: In 2024–2025, the line between open and closed-source becomes increasingly blurred. "Open weights" is different from "open source" (open training code). LLaMA is open weights, not open source in the traditional sense.
5. Roadmap of this series

This series is divided into 5 main parts:
Phần 1: Nền tảng AI & Deep Learning (Bài 1–5)
├── Bài 1: Tổng quan (bài này)
├── Bài 2: Toán học cho AI
├── Bài 3: Neural Networks cơ bản
├── Bài 4: Deep Learning Overview (CNN, RNN, LSTM)
└── Bài 5: Attention Mechanism
Phần 2: Kiến trúc Transformer (Bài 6–9)
├── Bài 6: The Transformer Architecture
├── Bài 7: BERT & Encoder Models
├── Bài 8: GPT & Decoder Models
└── Bài 9: Modern LLM Architectures
Phần 3: Làm việc với LLM (Bài 10–14)
├── Bài 10: Prompting & Prompt Engineering
├── Bài 11: OpenAI / Anthropic API
├── Bài 12: LangChain & LlamaIndex
├── Bài 13: RAG — Retrieval Augmented Generation
└── Bài 14: Vector Databases
Phần 4: Fine-tuning & Deployment (Bài 15–19)
├── Bài 15: Fine-tuning cơ bản
├── Bài 16: LoRA & QLoRA
├── Bài 17: Quantization & Optimization
├── Bài 18: Deployment với vLLM & Ollama
└── Bài 19: Production MLOps cho LLM
Phần 5: Ứng dụng thực tế (Bài 20–24)
├── Bài 20: AI Agents & Tool Use
├── Bài 21: Multimodal AI
├── Bài 22: Code Generation & AI-assisted Dev
├── Bài 23: AI trong doanh nghiệp Việt Nam
└── Bài 24: Xu hướng & Tương lai
Prerequisite: Basic Python (know how to write functions, loops, classes). Mathematical and theoretical problems will be explained from the beginning.
6. Installation environment
6.1 Install Python
Recommended Python 3.11 (stable, best support for most AI libraries as of 2025).
# Kiểm tra Python đã có chưa
python --version
# hoặc
python3 --version
6.2 Conda — Virtual environment management
Conda is the best environment management tool for AI/ML because it handles both Python and C/CUDA libraries.
# Tải Miniconda (nhỏ gọn hơn Anaconda)
# Truy cập: https://docs.conda.io/en/latest/miniconda.html
# Tạo môi trường cho series này
conda create -n ai-llm python=3.11 -y
conda activate ai-llm
# Cài các thư viện cơ bản
conda install numpy pandas matplotlib jupyter -y
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
pip install transformers datasets accelerate
pip install openai anthropic langchain
6.3 Recommended directory structure
ai-llm-series/
├── notebooks/ # Jupyter notebooks cho từng bài
│ ├── 01_overview/
│ ├── 02_math/
│ └── ...
├── src/ # Code Python tái sử dụng
│ ├── models/
│ └── utils/
├── data/ # Dataset nhỏ để thực hành
└── requirements.txt
6.4 Jupyter Lab
pip install jupyterlab
jupyter lab # Mở trình duyệt tại http://localhost:8888
6.5 Environmental testing
# Chạy cell này trong Jupyter để kiểm tra
import sys
import numpy as np
import torch
print(f"Python: {sys.version}")
print(f"NumPy: {np.__version__}")
print(f"PyTorch: {torch.__version__}")
print(f"CUDA available: {torch.cuda.is_available()}")
if torch.cuda.is_available():
print(f"GPU: {torch.cuda.get_device_name(0)}")
print(f"VRAM: {torch.cuda.get_device_properties(0).total_memory / 1e9:.1f} GB")
else:
print("Đang chạy trên CPU — vẫn ổn cho các bài đầu!")
6.6 Without GPU
No need to worry! The first lessons (Lessons 1–7) run well on CPU. Start needing GPU from Lesson 8 onwards. You can use:
- Google Colab (free, T4 GPU):
colab.research.google.com - Kaggle Notebooks (free, 30h/week GPU):
kaggle.com/code - Vast.ai / RunPod: cheap GPU rental (~$0.3–0.5/hour for RTX 3090)
Lesson summary
- AI is a broad field; ML is AI that learns from data; DL is ML using deep neural network; LLM is large-scale DL on text
- LLM explodes thanks to three converging factors: huge data + powerful GPU + Transformer architecture
- ChatGPT (November 2022) is AI's "iPhone moment" — bringing technology to the masses
- This series will go from mathematical foundations to building practical LLM applications
- Install Python 3.11 + Conda + PyTorch now to be ready for the next lesson
Exercises
- Install the Conda environment and successfully run the test code in section 6.5
- Create an account on Google Colab and test run a notebook
- Read the abstract of the original article "Attention Is All You Need" (2017) at
arxiv.org/abs/1706.03762 - List 3 AI applications you use every day and determine which type of AI they are (ML, DL, LLM, or rule-based AI)