Machine Learning & AI Engineering: Build Your Own AI Models
From how machines learn to building neural networks from scratch, deep learning, transformers and your own GPT, RAG and fine-tuning, and deploying models people can use — the path to ML and AI engineer.

What you'll learn
- Explain how models learn: loss, gradient descent, bias and variance, validation
- Train and evaluate classical models with scikit-learn
- Build a neural network and backpropagation from scratch
- Train deep networks, including CNNs for images
- Explain transformers and attention, and build a small GPT
- Build AI apps with Hugging Face, RAG and fine-tuned language models
- Deploy models with Gradio or FastAPI and understand MLOps
- Build AI responsibly: bias, fairness, privacy and African languages
Course content
Part 1. Start here: the map of AI3 lessons
Part 2. Machine learning foundations18 lessons
- ML for everybody: Data/Colab Introby freeCodeCamp.org9 min
- ML for everybody: Intro to Machine Learningby freeCodeCamp.org4 min
- ML for everybody: Featuresby freeCodeCamp.org5 min
- ML for everybody: Training Modelby freeCodeCamp.org14 min
- ML for everybody: Preparing Databy freeCodeCamp.org14 min
- ML for everybody: K-Nearest Neighborsby freeCodeCamp.org8 min
- ML for everybody: KNN Implementationby freeCodeCamp.org16 min
- ML for everybody: Naive Bayesby freeCodeCamp.org9 min
- ML for everybody: Logistic Regressionby freeCodeCamp.org10 min
- ML for everybody: Support Vector Machineby freeCodeCamp.org10 min
- ML for everybody: Neural Networksby freeCodeCamp.org10 min
- ML for everybody: Classification NN using Tensorflowby freeCodeCamp.org22 min
- ML for everybody: Linear Regressionby freeCodeCamp.org25 min
- ML for everybody: Lin Regression Implementationby freeCodeCamp.org23 min
- ML for everybody: Regression NN using Tensorflowby freeCodeCamp.org15 min
- ML for everybody: K-Means Clusteringby freeCodeCamp.org11 min
- ML for everybody: Principal Component Analysisby freeCodeCamp.org10 min
- ML for everybody: K-Means and PCA Implementationsby freeCodeCamp.org20 min
Part 3. How models learn6 lessons
- Gradient descent, step by step (StatQuest)by StatQuest with Josh Starmer24 min
- Bias and variance (StatQuest)by StatQuest with Josh Starmer7 min
- Cross-validation (StatQuest)by StatQuest with Josh Starmer6 min
- Decision trees (StatQuest)by StatQuest with Josh Starmer18 min
- Random forests (StatQuest)by StatQuest with Josh Starmer10 min
- Quiz: learning
Part 4. scikit-learn in practice8 lessons
- scikit-learn: introductionby freeCodeCamp.org3 min
- scikit-learn: introducing scikit-learnby freeCodeCamp.org31 min
- scikit-learn: preprocessingby freeCodeCamp.org19 min
- scikit-learn: metricsby freeCodeCamp.org31 min
- scikit-learn: meta-estimatorsby freeCodeCamp.org21 min
- scikit-learn: human-learnby freeCodeCamp.org21 min
- scikit-learn: wrap-upby freeCodeCamp.org3 min
- Practice: a full scikit-learn pipeline
Part 5. Neural networks from scratch21 lessons
- But what is a neural network? (3Blue1Brown)by 3Blue1Brown19 min
- Gradient descent: how neural networks learn (3Blue1Brown)by 3Blue1Brown21 min
- Building micrograd (Karpathy): micrograd overviewby Andrej Karpathy8 min
- Building micrograd (Karpathy): derivative of a simple function with one inputby Andrej Karpathy6 min
- Building micrograd (Karpathy): derivative of a function with multiple inputsby Andrej Karpathy5 min
- Building micrograd (Karpathy): starting the core Value object of micrograd and its visualizationby Andrej Karpathy13 min
- Building micrograd (Karpathy): manual backpropagation example #1: simple expressionby Andrej Karpathy19 min
- Building micrograd (Karpathy): manual backpropagation example #2: a neuronby Andrej Karpathy18 min
- Building micrograd (Karpathy): implementing the backward function for each operationby Andrej Karpathy9 min
- Building micrograd (Karpathy): implementing the backward function for a whole expression graphby Andrej Karpathy5 min
- Building micrograd (Karpathy): fixing a backprop bug when one node is used multiple timesby Andrej Karpathy5 min
- Building micrograd (Karpathy): breaking up a tanh, exercising with more operationsby Andrej Karpathy12 min
- Building micrograd (Karpathy): doing the same thing but in PyTorch: comparisonby Andrej Karpathy4 min
- Building micrograd (Karpathy): building out a neural net library (multi-layer perceptron) in microgradby Andrej Karpathy7 min
- Building micrograd (Karpathy): creating a tiny dataset, writing the loss functionby Andrej Karpathy7 min
- Building micrograd (Karpathy): collecting all of the parameters of the neural netby Andrej Karpathy3 min
- Building micrograd (Karpathy): doing gradient descent optimization manually, training the networkby Andrej Karpathy13 min
- Building micrograd (Karpathy): walkthrough of the full code of micrograd on githubby Andrej Karpathy7 min
- Building micrograd (Karpathy): real stuff: diving into PyTorch, finding their backward pass for tanhby Andrej Karpathy3 min
- Building micrograd (Karpathy): conclusionby Andrej Karpathy1 min
- Quiz: neural networks
Part 6. Deep learning and computer vision18 lessons
- Deep learning crash course: What is Deep Learningby freeCodeCamp.org5 min
- Deep learning crash course: How do Neural Networks LEARN?by freeCodeCamp.org7 min
- Deep learning crash course: Activation Functionsby freeCodeCamp.org11 min
- Deep learning crash course: Optimizersby freeCodeCamp.org8 min
- Deep learning crash course: Epochs, Batches & Iterationsby freeCodeCamp.org4 min
- Deep learning crash course: Supervised Learningby freeCodeCamp.org6 min
- Deep learning crash course: Unsupervised Learningby freeCodeCamp.org3 min
- Deep learning crash course: Regularizationby freeCodeCamp.org8 min
- Deep learning crash course: Recurrent Neural Netsby freeCodeCamp.org13 min
- Deep learning crash course: Convolutional Neural Netsby freeCodeCamp.org3 min
- Deep learning crash course: 1. Gathering Databy freeCodeCamp.org3 min
- Deep learning crash course: 2. Preprocessing the Databy freeCodeCamp.org8 min
- Deep learning crash course: 5. Optimizing your Model's Accuracyby freeCodeCamp.org6 min
- Deep learning crash course: Conclusion to the Courseby freeCodeCamp.org1 min
- But what is a convolution? (3Blue1Brown)by 3Blue1Brown23 min
- Convolutional neural networks explained (deeplizard)by deeplizard9 min
- Learn PyTorch in 5 projects (freeCodeCamp)by freeCodeCamp.org5h 49m
- Practice: train an image classifier
Part 7. Transformers, language models and your own GPT25 lessons
- Large language models explained briefly (3Blue1Brown)by 3Blue1Brown8 min
- Transformers explained simply (codebasics)by codebasics58 min
- Let's build GPT (Karpathy): intro: ChatGPT, Transformers, nanoGPT, Shakespeareby Andrej Karpathy8 min
- Let's build GPT (Karpathy): tokenization, train/val splitby Andrej Karpathy7 min
- Let's build GPT (Karpathy): data loader: batches of chunks of databy Andrej Karpathy8 min
- Let's build GPT (Karpathy): simplest baseline: bigram language model, loss, generationby Andrej Karpathy13 min
- Let's build GPT (Karpathy): training the bigram modelby Andrej Karpathy3 min
- Let's build GPT (Karpathy): port our code to a scriptby Andrej Karpathy4 min
- Let's build GPT (Karpathy): version 1: averaging past context with for loops, the weakest form of aggregationby Andrej Karpathy5 min
- Let's build GPT (Karpathy): the trick in self-attention: matrix multiply as weighted aggregationby Andrej Karpathy5 min
- Let's build GPT (Karpathy): version 2: using matrix multiplyby Andrej Karpathy5 min
- Let's build GPT (Karpathy): minor code cleanupby Andrej Karpathy3 min
- Let's build GPT (Karpathy): THE CRUX OF THE VIDEO: version 4: self-attentionby Andrej Karpathy11 min
- Let's build GPT (Karpathy): note 4: encoder blocks vs. decoder blocksby Andrej Karpathy4 min
- Let's build GPT (Karpathy): note 6: "scaled" self-attention. why divide by sqrt(head_size)by Andrej Karpathy4 min
- Let's build GPT (Karpathy): multi-headed self-attentionby Andrej Karpathy5 min
- Let's build GPT (Karpathy): residual connectionsby Andrej Karpathy8 min
- Let's build GPT (Karpathy): layernorm (and its relationship to our previous batchnorm)by Andrej Karpathy5 min
- Let's build GPT (Karpathy): scaling up the model! creating a few variables. adding dropoutby Andrej Karpathy5 min
- Let's build GPT (Karpathy): encoder vs. decoder vs. both (?) Transformersby Andrej Karpathy4 min
- Let's build GPT (Karpathy): back to ChatGPT, GPT-3, pretraining vs. finetuning, RLHFby Andrej Karpathy8 min
- Let's build GPT (Karpathy): conclusionsby Andrej Karpathy2 min
- What Hugging Face is and how to use itby Angel Poon8 min
- MasakhaNER: language AI for African languages (Masakhane)by David Adelani22 min
- Quiz: transformers
Part 8. Building with LLMs: RAG and fine-tuning21 lessons
- What is retrieval-augmented generation (RAG)? (IBM)by IBM Technology7 min
- RAG vs fine-tuning (IBM)by IBM Technology9 min
- RAG from scratch: Overviewby freeCodeCamp.org6 min
- RAG from scratch: Indexingby freeCodeCamp.org5 min
- RAG from scratch: Retrievalby freeCodeCamp.org5 min
- RAG from scratch: Generationby freeCodeCamp.org6 min
- RAG from scratch (advanced): Query Translation (Multi-Query)by freeCodeCamp.org6 min
- RAG from scratch (advanced): Query Translation (RAG Fusion)by freeCodeCamp.org6 min
- RAG from scratch (advanced): Query Translation (Decomposition)by freeCodeCamp.org7 min
- RAG from scratch (advanced): Query Translation (Step Back)by freeCodeCamp.org7 min
- RAG from scratch (advanced): Query Translation (HyDE)by freeCodeCamp.org5 min
- RAG from scratch (advanced): Routingby freeCodeCamp.org7 min
- RAG from scratch (advanced): Query Constructionby freeCodeCamp.org6 min
- RAG from scratch (advanced): Indexing (Multi Representation)by freeCodeCamp.org7 min
- RAG from scratch (advanced): Indexing (RAPTOR)by freeCodeCamp.org8 min
- RAG from scratch (advanced): Indexing (ColBERT)by freeCodeCamp.org7 min
- RAG from scratch (advanced): CRAGby freeCodeCamp.org18 min
- RAG from scratch (advanced): Adaptive RAGby freeCodeCamp.org28 min
- RAG from scratch (advanced): The future of RAGby freeCodeCamp.org21 min
- Fine-tune an LLM and run it with Ollama (Tech With Tim)by Tech With Tim22 min
- Practice: a RAG assistant for real documents
Part 9. Deploying models and MLOps16 lessons
- Gradio crash course: share ML apps fast (AssemblyAI)by AssemblyAI14 min
- Deploy ML models with FastAPI and Docker (AssemblyAI)by AssemblyAI19 min
- MLOps explained (TechWorld with Nana)by TechWorld with Nana26 min
- MLOps course: MLOps Fundamentals (introduction to mlops)by freeCodeCamp.org33 min
- MLOps course: Fundamentals of Zenmlby freeCodeCamp.org13 min
- MLOps course: Dataset of Olist customer datasetby freeCodeCamp.org4 min
- MLOps course: Installing necessary librariesby freeCodeCamp.org6 min
- MLOps course: Creating blueprint of stepsby freeCodeCamp.org13 min
- MLOps course: Zenml Dashboardby freeCodeCamp.org6 min
- MLOps course: Working on data cleaningby freeCodeCamp.org20 min
- MLOps course: Working on model developmentby freeCodeCamp.org7 min
- MLOps course: Working on evaluation modelby freeCodeCamp.org7 min
- MLOps course: Run pipelineby freeCodeCamp.org6 min
- MLOps course: Implementing experiment trackerby freeCodeCamp.org17 min
- MLOps course: Deployment pipelineby freeCodeCamp.org47 min
- MLOps course: Streamlit appby freeCodeCamp.org3 min
Part 10. Responsible AI and Africa's AI future4 lessons
Part 11. Careers2 lessons
Part 12. Final project1 lesson
Capstone project: Capstone: build, evaluate and deploy your own AI model. You finish by building something real; a mentor reviews it before your certificate is issued.
About this course
Artificial intelligence is built by people who understand how models learn — and Africa needs thousands more of them, building AI for our languages, farms, hospitals and businesses. This course takes you from machine-learning fundamentals to building and deploying your own AI models. You'll learn with freeCodeCamp's Machine Learning for Everybody (Kylie Ying), StatQuest, 3Blue1Brown's beautiful neural-network series, and Andrej Karpathy — a founding member of OpenAI and former head of AI at Tesla — who shows you how to build a neural network and a small GPT from scratch, line by line. Then you'll learn scikit-learn, deep learning and CNNs, transformers and Hugging Face, retrieval-augmented generation (RAG) and fine-tuning of large language models, deployment with Gradio and FastAPI, MLOps, and responsible AI — including Africa's own AI community: Masakhane, the Deep Learning Indaba and Zindi. You'll finish by building and deploying an AI model that solves a real problem. About 30 hours of video plus projects.
Learners also took
Free courses that go well with this one.

AI for Everyone: Understand & Use AI Wisely
What AI really is, how ChatGPT-style tools work, and how to use them to learn and work smarter — responsibly.

Excel & Google Sheets Essentials
The spreadsheet skills every student, worker and business owner needs.

AI for Young Explorers
Discover how computers can learn — and teach your own AI to recognise pictures and sounds!

Python Programming for Beginners
Learn to code with Python — the friendly language used for apps, data, AI and automation.