My learning roadmap
Goal: Expand from building GenAI applications with LLM APIs, RAG, agents, LangGraph, and MCP into a strong understanding of machine learning, deep learning, modern model architectures, LLM internals, fine-tuning, inference, and AI infrastructure — while staying aligned with a Software Architect career path.
1. Why This Roadmap Exists
I currently work primarily at the GenAI application layer.
My existing knowledge includes:
- LLM APIs
- Prompt engineering
- Structured outputs
- Embeddings
- RAG
- Vector databases
- LangChain
- LangGraph
- AI agents
- Tool calling
- MCP
- AI application architecture
- Evaluation concepts
- Cloud deployment
- AWS
- Docker
- Terraform
- Distributed systems
The next step is to move downward through the AI stack and understand what happens inside the models.
The objective is not to become a theoretical ML researcher.
The objective is to become an engineer/architect who can confidently answer questions such as:
- How does a model learn?
- What is actually happening during training?
- How does a neural network represent information?
- Why do transformers work so well for language?
- What happens inside an LLM during inference?
- When should I use RAG versus fine-tuning?
- What are LoRA and QLoRA?
- How much GPU/VRAM does a model need?
- What affects inference latency and cost?
- When should I use a hosted model versus a self-hosted model?
- How are open-source models deployed and scaled?
- How should an AI system be evaluated?
- How should model serving fit into a production architecture?
The ultimate destination is:
AI Software Architect with strong understanding of both AI applications and the underlying model/inference layer.
2. The AI Stack
A useful mental model is to view AI as several layers.
┌──────────────────────────────────────────────────────────────┐
│ AI APPLICATIONS │
│ │
│ Agents · RAG · MCP · Tools · Workflows · AI Products │
└──────────────────────────────┬───────────────────────────────┘
│
┌──────────────────────────────▼───────────────────────────────┐
│ MODEL ENGINEERING │
│ │
│ Prompting · Evaluation · Fine-tuning · LoRA · Quantization │
│ Model selection · Inference · Model serving │
└──────────────────────────────┬───────────────────────────────┘
│
┌──────────────────────────────▼───────────────────────────────┐
│ DEEP LEARNING │
│ │
│ Neural Networks · CNN · RNN · Attention · Transformers │
└──────────────────────────────┬───────────────────────────────┘
│
┌──────────────────────────────▼───────────────────────────────┐
│ MACHINE LEARNING │
│ │
│ Training · Loss · Optimization · Generalization │
│ Classification · Regression · Clustering │
└──────────────────────────────┬───────────────────────────────┘
│
┌──────────────────────────────▼───────────────────────────────┐
│ MATHEMATICS & COMPUTATION │
│ │
│ Linear Algebra · Probability · Statistics · Calculus │
└──────────────────────────────────────────────────────────────┘
My current position is primarily in the top two layers.
The roadmap is about progressively understanding the layers underneath them.
3. Target Profile
The target is not:
Machine Learning Research Scientist
The target is:
Software Architect / AI Engineer who understands models deeply enough to design production AI systems.
The desired skill combination is:
Software Engineering
+
Cloud Architecture
+
Distributed Systems
+
AI Application Engineering
+
Model Engineering
+
Inference Infrastructure
This combination should allow me to operate across the AI stack rather than only consume model APIs.
4. Roadmap Overview
Current
│
├── LLM Applications
│ ├── RAG
│ ├── Agents
│ ├── LangGraph
│ └── MCP
│
▼
Phase 1 — Machine Learning Fundamentals
│
▼
Phase 2 — Mathematics for ML
│
▼
Phase 3 — Neural Networks
│
▼
Phase 4 — PyTorch
│
▼
Phase 5 — Deep Learning Architectures
│
▼
Phase 6 — Transformers
│
▼
Phase 7 — LLM Internals
│
▼
Phase 8 — Hugging Face & Open Models
│
▼
Phase 9 — Fine-tuning
│
▼
Phase 10 — Evaluation
│
▼
Phase 11 — Model Inference & Serving
│
▼
Phase 12 — AI Infrastructure
│
▼
Final
│
▼
AI Software Architect
5. Phase 1 — Machine Learning Fundamentals
Objective
Understand the fundamental idea behind machine learning:
A model learns patterns from data instead of being explicitly programmed with every rule.
Topics
Core concepts
- What is machine learning?
- Training
- Validation
- Testing
- Inference
- Dataset
- Features
- Labels
- Parameters
- Hyperparameters
- Model
- Prediction
- Generalization
- Overfitting
- Underfitting
Types of machine learning
- Supervised learning
- Unsupervised learning
- Reinforcement learning
Classical algorithms
Understand the concepts and basic implementations of:
- Linear Regression
- Logistic Regression
- Decision Trees
- Random Forest
- Gradient Boosting
- K-Means
- PCA
The purpose is not to become an expert in classical ML.
The purpose is to understand:
Data
↓
Model
↓
Prediction
↓
Loss / Error
↓
Learning
↓
Improved Model
Practical exercises
Build small projects:
- House-price regression
- Binary classification
- Customer segmentation with K-Means
- Compare several classical models
Exit criteria
I should be able to explain:
- What training means
- Why train/validation/test datasets exist
- What overfitting means
- What a parameter is
- What a hyperparameter is
- What inference means
- Why a model can perform well on training data but poorly on unseen data
6. Phase 2 — Mathematics for Machine Learning
Objective
Learn enough mathematics to understand how models actually learn.
Do not attempt to master mathematics academically.
Focus on practical intuition.
6.1 Linear Algebra
Learn:
- Scalars
- Vectors
- Matrices
- Tensors
- Dimensions
- Dot product
- Matrix multiplication
- Transpose
- Vector spaces
- Norms
- Cosine similarity
Important mental model:
Input vector
↓
Matrix multiplication
↓
Transformation
↓
New representation
This becomes fundamental when understanding neural networks, embeddings, and transformers.
6.2 Probability and Statistics
Learn:
- Probability
- Conditional probability
- Random variables
- Probability distributions
- Mean
- Variance
- Standard deviation
- Expected value
- Likelihood
- Sampling
- Bayes’ theorem
6.3 Calculus
Focus on:
- Functions
- Derivatives
- Partial derivatives
- Gradients
- Chain rule
Most important concept:
The gradient tells us how changing model parameters affects the loss.
This leads directly to gradient descent.
Exit criteria
I should be comfortable reading equations involving:
vectors
matrices
dot products
probabilities
loss functions
gradients
I should understand the intuition behind gradient descent.
7. Phase 3 — Neural Networks
Objective
Understand the basic building blocks of modern deep learning.
Topics
Neuron
Understand:
Inputs
↓
Weighted Sum
↓
Bias
↓
Activation Function
↓
Output
Learn
- Weights
- Biases
- Activation functions
- ReLU
- Sigmoid
- Tanh
- Softmax
- Layers
- Forward propagation
- Loss functions
- Backpropagation
- Gradient descent
- Optimizers
- Learning rate
- Batch size
- Epochs
Loss functions
Understand:
- Mean Squared Error
- Cross Entropy
Optimization
Learn:
- Gradient Descent
- SGD
- Momentum
- Adam
- Learning-rate scheduling
Regularization
Understand:
- Dropout
- Weight decay
- Early stopping
Practical project
Build a simple neural network from scratch using NumPy.
Do not use PyTorch initially.
The purpose is to understand what the framework is eventually going to automate.
Exit criteria
I should be able to explain:
What happens inside a neural network during one forward pass and one backward pass?
8. Phase 4 — PyTorch
Objective
Move from understanding neural networks theoretically to building and training them.
Why PyTorch?
For my direction, PyTorch should be the primary deep-learning framework.
TensorFlow is worth understanding conceptually, but I do not need to master both frameworks.
Priority:
PyTorch → Deep knowledge
TensorFlow → Ecosystem awareness
Keras → Basic awareness
PyTorch concepts
Learn:
- Tensors
- Tensor operations
- CPU vs GPU
- Dataset
- DataLoader
- Modules
- Layers
- Parameters
- Forward pass
- Loss functions
- Optimizers
- Autograd
- Backpropagation
- Training loops
- Evaluation loops
- Model saving/loading
Build
Project 1
Image classifier.
Project 2
Text classifier.
Project 3
Small neural network trained end-to-end with PyTorch.
Important understanding
Be able to map:
Mathematics
↓
Neural Network Concepts
↓
PyTorch API
For example:
Gradient
↓
Autograd
Weights
↓
nn.Parameter
Layer
↓
nn.Module
Optimization
↓
Optimizer
Exit criteria
I should be able to write a complete PyTorch training loop without blindly copying one.
9. Phase 5 — Deep Learning
Objective
Understand the major neural-network architectures that led to modern transformers.
Topics
CNN
Understand:
- Convolution
- Filters
- Feature maps
- Pooling
- Image representation
RNN
Understand:
- Sequential processing
- Hidden state
- Vanishing gradients
LSTM / GRU
Understand why they were introduced and what problems they solved.
The objective is not to specialize in CNNs or RNNs.
They are part of the historical and conceptual path toward transformers.
10. Phase 6 — Attention and Transformers
This is a critical phase.
Objective
Understand the architecture behind modern LLMs.
Attention
Learn:
- Attention mechanism
- Query
- Key
- Value
- Attention scores
- Scaled dot-product attention
- Self-attention
- Cross-attention
The basic idea:
Query
+
Keys
↓
Attention Scores
↓
Weighted Values
↓
Contextual Representation
Multi-head attention
Understand why multiple attention heads are useful.
Transformer components
Learn:
- Token embeddings
- Positional encoding / positional representations
- Self-attention
- Multi-head attention
- Feed-forward network
- Residual connections
- Layer normalization
- Encoder
- Decoder
Understand the transformer block:
Input
↓
Self Attention
↓
Residual + Normalization
↓
Feed Forward Network
↓
Residual + Normalization
↓
Output
Practical project
Implement a small self-attention mechanism manually.
Then build a tiny transformer using PyTorch.
Exit criteria
I should be able to explain transformer architecture without relying on an abstraction such as LangChain.
11. Phase 7 — LLM Internals
Now connect transformer knowledge with the LLMs I already use.
11.1 Tokenization
Understand:
Text
↓
Tokenizer
↓
Tokens
↓
Token IDs
↓
Embeddings
Learn:
- Tokens
- Token IDs
- Vocabulary
- BPE
- SentencePiece
- Context window
- Special tokens
11.2 Embeddings
Understand:
- Token embeddings
- Semantic representations
- Vector spaces
- Similarity
- Why embeddings work for retrieval
11.3 Autoregressive language modeling
Understand:
Previous tokens
↓
Transformer
↓
Probability distribution
↓
Next token
↓
Repeat
The central training objective:
Predict the next token.
11.4 Logits and probabilities
Understand:
- Logits
- Softmax
- Temperature
- Top-k
- Top-p
- Sampling
- Greedy decoding
11.5 Context
Understand:
- Context window
- Attention over context
- Long-context challenges
- KV cache
12. Phase 8 — LLM Pretraining
Objective
Understand how a large language model is created.
Conceptual pipeline:
Large Dataset
↓
Data Cleaning
↓
Tokenization
↓
Training Batches
↓
Transformer
↓
Next-token Prediction
↓
Loss
↓
Backpropagation
↓
Parameter Updates
↓
Repeat at Huge Scale
Study:
- Pretraining datasets
- Data filtering
- Tokenization
- Batch construction
- Distributed training
- Optimizers
- Learning-rate schedules
- Checkpoints
- Scaling
- Compute requirements
Important concepts
Understand the difference between:
Training
Inference
and:
Pretraining
Fine-tuning
Instruction tuning
Alignment
13. Phase 9 — Hugging Face and Open Models
Objective
Learn to work directly with modern open-source/open-weight models.
Ecosystem
Learn:
- Hugging Face Hub
- Transformers
- Tokenizers
- Datasets
- Accelerate
- PEFT
Models
Experiment with several model families, for example:
- Llama-family models
- Qwen-family models
- Mistral-family models
- Gemma-family models
The exact models will change over time.
The important thing is understanding the ecosystem rather than memorizing model names.
Practical workflow
Model Hub
↓
Download model
↓
Load tokenizer
↓
Load model
↓
Run inference
↓
Evaluate
↓
Fine-tune
↓
Deploy
Exit criteria
I should be comfortable downloading an open model, running it locally or on a GPU environment, inspecting its configuration, and generating text with it.
14. Phase 10 — Fine-tuning
Objective
Understand when and how to modify a pretrained model.
First understand the decision:
Prompting
vs
RAG
vs
Fine-tuning
vs
Training from scratch
Learn
- Pretrained models
- Fine-tuning
- Supervised fine-tuning
- Instruction tuning
- Parameter-efficient fine-tuning
- LoRA
- QLoRA
- Adapters
LoRA
Understand the basic idea:
Large pretrained model
│
├── Frozen weights
│
└── Small trainable adapter
This reduces the amount of trainable parameters.
Alignment
Understand conceptually:
- Human feedback
- RLHF
- Reward models
- Preference optimization
- DPO
No need to immediately implement every technique.
Practical project
Fine-tune a small open model using LoRA for a specific domain or behavior.
15. Phase 11 — Model Evaluation
This phase should connect strongly with my existing AI engineering work.
Objective
Understand that:
A model that “looks good” is not necessarily a model that performs well.
Learn:
- Offline evaluation
- Online evaluation
- Benchmarking
- Test datasets
- Golden datasets
- Human evaluation
- LLM-as-a-judge
- Task-specific metrics
- Regression testing
- Hallucination evaluation
- Safety evaluation
- Bias considerations
For generative systems, study:
- Exact-match limitations
- Semantic evaluation
- Pairwise evaluation
- Preference evaluation
Important principle
Evaluation should happen at multiple layers:
Model
↓
Prompt
↓
RAG
↓
Tool usage
↓
Agent workflow
↓
Complete application
16. Phase 12 — Model Inference
This is particularly important for an architect.
Objective
Understand what happens when a model generates a response in production.
Study:
- CPU inference
- GPU inference
- GPU memory / VRAM
- Model size
- Parameters
- Precision
- FP32
- FP16
- BF16
- INT8
- INT4
- Quantization
- Batching
- Continuous batching
- Throughput
- Latency
- Tokens per second
- Time to first token
- KV cache
- Context length
Critical relationship
Understand:
Model Size
↓
Memory Requirement
↓
GPU Requirement
↓
Inference Cost
↓
Latency / Throughput
17. Phase 13 — Model Serving
Objective
Learn how an open model becomes a production service.
Architecture:
Client
↓
API
↓
Model Gateway
↓
Inference Server
↓
GPU
↓
Model
Study:
- Model loading
- Model workers
- Request queues
- Batching
- Streaming
- Concurrency
- Autoscaling
- Health checks
- Observability
Tools to investigate
vLLM
Learn it as a production-oriented LLM inference engine.
Hugging Face TGI
Understand its role in model serving.
Ollama
Useful for local experimentation.
llama.cpp
Understand its importance for efficient local/CPU-oriented inference and quantized models.
The objective is not to master every serving tool.
18. Phase 14 — AI Infrastructure
This is where existing cloud architecture knowledge becomes highly valuable.
Learn
GPU infrastructure
Understand:
- GPU architecture at a practical level
- VRAM
- GPU memory bandwidth
- CUDA
- GPU utilization
Containers
Understand:
Docker
↓
CUDA environment
↓
Inference server
↓
Model
Kubernetes
Connect previous Kubernetes learning with AI workloads:
- GPU nodes
- GPU scheduling
- Model pods
- Autoscaling
- Persistent model storage
- Networking
- Observability
AWS
Investigate:
- GPU EC2 instances
- SageMaker
- Bedrock
- EKS GPU workloads
- S3 model storage
- CloudWatch observability
The goal is to compare:
Managed model APIs
vs
Managed model platforms
vs
Self-hosted models
19. Phase 15 — AI System Architecture
This is the final integration layer.
I should be able to design systems such as:
User
│
▼
API Gateway
│
▼
AI Application
│
┌───────────┼───────────┐
│ │ │
▼ ▼ ▼
RAG Tools Memory
│ │
└──────┬────┘
▼
Model Gateway
│
┌────────┴────────┐
│ │
▼ ▼
Hosted LLM Self-hosted LLM
│
vLLM
│
GPU
│
Model
Then reason about:
- Cost
- Latency
- Availability
- Scalability
- Security
- Privacy
- Model quality
- Vendor lock-in
- Observability
- Evaluation
- Data governance
20. Important Architectural Decisions
I should eventually be able to reason about questions like:
API model vs open model
Hosted API
├── Easy
├── Fast to deploy
├── No GPU management
└── Potentially higher variable cost
Self-hosted
├── More control
├── Data/privacy benefits
├── Infrastructure complexity
└── GPU cost
RAG vs fine-tuning
Need new knowledge?
↓
RAG
Need different behavior/style?
↓
Fine-tuning may help
Small vs large model
Simple task
↓
Small model
Complex reasoning
↓
Larger model
High volume
↓
Optimize cost/performance
21. Project-Based Learning Strategy
The roadmap should not be purely theoretical.
Use projects to force understanding.
Project 1 — Classical ML
Build:
Prediction/classification service
Learn:
- Dataset
- Training
- Validation
- Metrics
- Inference
Project 2 — Neural Network from Scratch
Build a small neural network using NumPy.
Learn:
- Forward propagation
- Loss
- Backpropagation
- Gradient descent
Project 3 — PyTorch Image Classifier
Build:
Image classification API
Learn:
- PyTorch
- Dataset
- DataLoader
- GPU
- Training loop
- Model persistence
Project 4 — Tiny Transformer
Build a small transformer from scratch using PyTorch.
Learn:
- Tokenization
- Embeddings
- Attention
- Transformer blocks
- Next-token prediction
Project 5 — Open LLM Application
Run an open model locally or on a GPU.
Learn:
- Hugging Face
- Model loading
- Tokenization
- Inference
- Generation parameters
Project 6 — Fine-tuned LLM
Fine-tune a small model with LoRA.
Learn:
- Dataset preparation
- SFT
- LoRA
- Evaluation
Project 7 — Production Model Server
Deploy an open model using an inference engine.
Learn:
- Docker
- GPU
- vLLM
- Streaming
- Concurrency
- Monitoring
Project 8 — Full AI Platform
Combine the previous knowledge:
Frontend
↓
AI API
↓
Agent / Workflow
↓
RAG
↓
Model Gateway
↓
┌──────────────────────┐
│ Hosted Model │
│ OR │
│ Self-hosted Model │
└──────────────────────┘
↓
Evaluation
↓
Observability
This should become a strong portfolio/architecture project.
22. What NOT to Learn Deeply Initially
Avoid spreading attention across too many technologies.
I do not need to master all of these immediately:
- TensorFlow
- Keras
- JAX
- Every ML algorithm
- Every neural network architecture
- Every Hugging Face library
- Every open-source LLM
- Every inference engine
- CUDA programming
- Advanced distributed training
- Advanced reinforcement learning
Instead:
Deep
├── ML fundamentals
├── PyTorch
├── Transformers
├── LLM internals
├── Fine-tuning
├── Evaluation
└── Inference
Broad awareness
├── TensorFlow
├── JAX
├── Keras
├── RL
└── Distributed training
23. Recommended Technology Priority
Tier 1 — Must Learn
Python
NumPy
Machine Learning fundamentals
Linear Algebra
Probability
Neural Networks
PyTorch
Transformers
Hugging Face
LLM internals
Fine-tuning
LoRA
Evaluation
Inference
Tier 2 — Important
CUDA fundamentals
Quantization
vLLM
Docker GPU workloads
Kubernetes GPU workloads
Model serving
AI observability
Tier 3 — Awareness
TensorFlow
Keras
JAX
RLHF
DPO
Distributed training
Advanced CUDA
Specialized accelerators
24. Suggested Learning Order
A practical sequence is:
1. Python for ML
↓
2. NumPy
↓
3. ML fundamentals
↓
4. Linear algebra
↓
5. Probability/statistics
↓
6. Neural networks
↓
7. PyTorch
↓
8. Deep learning
↓
9. Attention
↓
10. Transformers
↓
11. Tokenization + embeddings
↓
12. LLM internals
↓
13. Hugging Face
↓
14. Fine-tuning
↓
15. LoRA / QLoRA
↓
16. Evaluation
↓
17. Quantization
↓
18. Inference
↓
19. vLLM / model serving
↓
20. GPU infrastructure
↓
21. Production AI architecture
25. Learning Depth Model
For each topic, use three levels.
Level 1 — Conceptual
Be able to explain:
What is it?
Level 2 — Practical
Be able to implement:
How does it work?
Level 3 — Architectural
Be able to decide:
When should I use it, and what are its trade-offs?
For example:
RAG
I already have Level 2/3 experience.
Transformer
Initially:
Level 1 → Understand architecture
Level 2 → Implement attention
Level 3 → Reason about model architecture
PyTorch
Level 1 → Understand ecosystem
Level 2 → Train models
Level 3 → Understand production implications
GPU inference
Level 1 → Understand GPU/VRAM
Level 2 → Deploy inference server
Level 3 → Design scalable inference architecture
26. How This Connects to My Existing Skills
My existing skills should not be discarded.
They become the upper layers of the new knowledge.
AI ARCHITECT
│
┌────────────────┼────────────────┐
│ │ │
AI Apps Models Infrastructure
│ │ │
Agents LLMs AWS
RAG Transformers Docker
MCP Fine-tuning Kubernetes
LangGraph PyTorch GPU
│ │ │
└────────────────┼────────────────┘
│
Software Engineering
│
Node.js · TypeScript · APIs
│
Distributed Systems
This is a much stronger direction than abandoning software engineering to pursue pure ML.
27. Final Capability Target
At the end of this roadmap, I want to be able to take an AI requirement and reason across the entire stack.
For example:
“We need an AI assistant for 100,000 users.”
I should be able to reason about:
Requirement
│
▼
Model Selection
│
┌──────────┴──────────┐
│ │
Hosted LLM Open Model
│ │
│ Fine-tuning?
│ │
│ Quantization?
│ │
│ GPU sizing
│ │
└──────────┬──────────┘
│
RAG
│
Agents
│
Model Gateway
│
Inference
│
Scaling / Caching
│
Observability
│
Cost Optimization
I should be able to explain why each decision was made, not simply name the technology.
28. Definition of Done
The roadmap is successful when I can comfortably do the following:
- Explain how machine learning works.
- Explain how neural networks learn.
- Explain backpropagation and gradient descent.
- Build and train a neural network with PyTorch.
- Explain attention and transformers.
- Explain how an LLM is trained.
- Explain tokenization and embeddings.
- Run an open-source/open-weight LLM.
- Fine-tune a model with LoRA.
- Evaluate a model systematically.
- Explain quantization.
- Understand GPU/VRAM requirements.
- Deploy an inference server.
- Understand vLLM and similar serving technologies.
- Design a production model-serving architecture.
- Decide between hosted and self-hosted models.
- Decide between prompting, RAG, and fine-tuning.
- Reason about model latency, throughput, cost, and scalability.
- Integrate model infrastructure with cloud architecture.
- Design AI systems from the application layer down to the model/inference layer.
29. Final Mental Model
The most important thing to remember is:
I don't need to become a researcher.
I need to understand the stack deeply enough
to become a better AI engineer and architect.
My progression should therefore be:
LLM Consumer
↓
LLM Application Engineer
↓
AI Engineer
↓
Model-Aware AI Engineer
↓
AI Systems Architect
The ultimate goal is to bridge:
Software Engineering
+
Cloud Architecture
+
AI Applications
+
Machine Learning
+
Deep Learning
+
LLM Internals
+
Model Inference
That combination is the foundation for becoming a modern AI Software Architect.