A Machine Learning Roadmap for 2026, from Python to Papers
Learn machine learning in twelve stages, from Python and the maths to deep learning, LLMs, GPU programming and research papers, with a guide, a study plan and a starter problem for each stage.
What is the best way to learn machine learning?
The best way to learn machine learning is to follow the topics in the order they depend on each other and to implement each idea in code before you move on. That order starts with Python and NumPy, then the maths, classic ML and deep learning with PyTorch, and only then moves to a specialist branch, LLMs, GPU programming and research papers. TensorTonic has a guide, a study plan or project, and tested coding problems for every stage, and this roadmap puts them in one sequence with a link to each.
Each stage below has a short explanation and a table with the guide to read, the study plan or project to work through, and a starter problem to solve first. If you would rather see the core topics as a connected map, the interactive TensorTonic roadmap shows how they lead into each other and tracks the problems you have solved.
Who is this machine learning roadmap for?
This roadmap is for people who want to build and understand ML models in code, whether they are starting from scratch, moving across from software engineering or data analysis, or filling gaps before an interview. It assumes you can already program a little, since the first stage checks your Python rather than teaching it from zero. It suits a self-taught learner as well as a student, and our guide to the self-taught ML engineer path covers the parts of that route that usually break.
You do not have to finish every stage. The first four stages are shared by almost every ML role, and the later stages are branches you choose according to the job you want, which a section further down maps out.
What are the stages of a machine learning roadmap?
The stages of a machine learning roadmap are the foundations, the core models and then the specialist areas built on them. Stages 1 to 4 are the foundations and should be done in order, stage 5 is a choice of branch, and stages 6 to 12 build on deep learning and can be taken in the order your goal needs.
Stage 1: How much Python and NumPy do you need?
You need enough Python to write functions, loops and classes without looking them up, and enough NumPy to work with array shapes, broadcasting and indexing. Almost every ML problem is an operation on arrays, so replacing a slow Python loop with whole-array code is the first real ML skill. The NumPy study plan has 25 problems in five sections, and the Pandas study plan has 25 more for working with tables of data.
| Topic | Guide | Study plan or project | Starter problem |
|---|---|---|---|
| Python and NumPy | How much Python you need for ML | NumPy study plan | Numerically Stable Softmax |
| Pandas for tables of data | Pandas study plan |
Stage 2: Which maths do you need for machine learning?
You need linear algebra, calculus, probability and statistics, and optimization, learned in roughly that order and at the depth ML uses them. Linear algebra describes the data and the weights, calculus describes how a model learns from its gradients, and probability describes uncertainty and how to test a result. The Linear Algebra, Calculus and Probability and Statistics study plans each have 30 problems, and the Optimization study plan has 25.
| Topic | Guide | Study plan or project | Starter problem |
|---|---|---|---|
| The maths in learning order | What maths you need for ML | Probability and Statistics study plan | Implement Gradient Descent for a 1D Quadratic |
| Linear algebra through code | How to learn linear algebra for ML | Linear Algebra study plan | Implement Dot Product |
| Derivatives and gradients | ML Math lessons | Calculus study plan |
Stage 3: How do you learn classic machine learning?
You learn classic machine learning by implementing the standard models yourself in NumPy and evaluating them on held-out data. Linear and logistic regression, decision trees, ensembles, clustering and PCA introduce the losses, gradients, regularization and metrics that deep learning reuses. The Cracking ML study plan has 35 problems in six sections, from linear models to evaluation and feature engineering, written without scikit-learn or PyTorch.
| Topic | Guide | Study plan or project | Starter problem |
|---|---|---|---|
| Classic models in NumPy | Why learn ML from scratch | Cracking ML study plan | Linear Regression from Scratch |
| Choosing a loss and a metric | Which loss function to use, ML evaluation metrics | Logistic Regression from Scratch |
Stage 4: How do you learn deep learning with PyTorch?
You learn deep learning with PyTorch by starting with tensors and autograd, then writing layers and a training loop yourself before you rely on the built-in versions. Building a small autograd engine once makes backpropagation concrete, and the Build Micrograd from Scratch study plan does this in 25 problems. After the PyTorch study plan and its 30 problems, the Cracking Deep Learning study plan takes you from the perceptron to the Transformer in 35 problems.
| Topic | Guide | Study plan or project | Starter problem |
|---|---|---|---|
| PyTorch from tensors to training | How to learn PyTorch | PyTorch study plan | Mini Training Loop |
| Backpropagation by hand | Build Micrograd from Scratch study plan | Basic Autograd | |
| Architectures and training techniques | Which optimizer to use | Cracking Deep Learning study plan |
Stage 5: Should you learn computer vision, NLP or reinforcement learning?
You should pick the branch that matches the work you want to do, and go deep in one before sampling the others. Computer vision covers images, from convolutions to detection and Vision Transformers, NLP covers text, from tokenization and TF-IDF to BERT, and reinforcement learning covers agents that learn from reward, from the Bellman equations to PPO. The Cracking CV and Cracking NLP study plans have 35 problems each, and the Cracking Reinforcement Learning study plan has 30.
| Branch | Guide | Study plan | Starter problem |
|---|---|---|---|
| Computer vision | How to learn computer vision | Cracking CV study plan | Multichannel 2D Convolution |
| Natural language processing | How to learn NLP | Cracking NLP study plan | TF-IDF |
| Reinforcement learning | How to learn reinforcement learning | Cracking Reinforcement Learning study plan, AlphaGo from Scratch study plan | Q-Learning Update |
NLP leads most directly into the LLM stage, since tokenization, embeddings and attention appear in both. Reinforcement learning returns later as well, because preference tuning methods such as PPO and DPO are part of how language models are aligned, and the AlphaGo from Scratch study plan builds a full self-play system in 18 problems.
Stage 6: How do you learn transformers and LLMs?
You learn transformers and LLMs by implementing attention, the transformer block and a next-token training loop, then training a small GPT on a text file. The original encoder-decoder Transformer is a good first build because the paper describes every part, and a decoder-only GPT is the architecture behind modern language models. The Build LLM from Scratch study plan has 62 PyTorch, NumPy, CUDA and Triton problems across 17 sections, from training a tokenizer to post-training.
| Topic | Guide | Study plan or project | Starter problem |
|---|---|---|---|
| The original Transformer | How to implement a Transformer from scratch | Scaled Dot-Product Attention | |
| A GPT-style language model | How to build an LLM from scratch | Build LLM from Scratch study plan, Build a Tiny GPT from Scratch project | Causal Masking for Attention |
Stage 7: How do you learn to fine-tune an LLM?
You learn to fine-tune an LLM by adapting a pretrained model to a task with supervised fine-tuning, usually through small adapter weights trained with LoRA or QLoRA. The parts worth implementing yourself are the loss mask that trains only on the assistant reply, the low-rank update and the quantization that QLoRA relies on. Preference tuning with DPO is the natural next step, and the DPO from scratch project builds it.
| Topic | Guide | Study plan or project | Starter problem |
|---|---|---|---|
| Supervised fine-tuning, LoRA and QLoRA | How to fine-tune an LLM | Fine-tune an LLM project | Build an Assistant-Only SFT Loss Mask |
| Preference tuning | DPO | DPO from scratch project |
Stage 8: How do you learn RAG and AI agents?
You learn RAG and AI agents by building a retrieval pipeline over your own documents and then a loop in which a model calls tools and reads the results. A RAG system chunks documents, retrieves the relevant chunks with embeddings or keyword search, and passes them to the model to answer with citations. An agent adds a reasoning and acting loop around the model, and the RAG from Scratch and Build a ReAct Agent projects cover the two in turn.
| Topic | Guide | Study plan or project | Starter problem |
|---|---|---|---|
| Retrieval-augmented generation | How to build a RAG system from scratch | RAG from Scratch project | Text Chunking for RAG |
| Agents and tool calling | How to build an AI agent from scratch | Build a ReAct Agent project, Build an MCP Server project |
Stage 9: How do you learn generative models such as diffusion?
You learn diffusion models by implementing the forward noising process, the noise prediction loss and a sampler, then running a full sampling loop on a small trained network. Diffusion is the main method behind image generation, and flow matching and classifier-free guidance build directly on it. The Build Diffusion Model from Scratch study plan has 26 problems across seven sections, from the Gaussian maths to a complete sampler.
| Topic | Guide | Study plan or project | Starter problem |
|---|---|---|---|
| Diffusion and flow matching | How to learn diffusion models | Build Diffusion Model from Scratch study plan, Generate Images with Diffusion and Rectified Flow project | Forward Diffusion Sample |
Stage 10: How do you learn GPU programming with CUDA, Triton and JAX?
You learn GPU programming by writing simple element-wise kernels first, then reductions, tiled matrix multiplication and finally fused attention kernels. CUDA teaches how threads, blocks and memory work on the GPU, Triton lets you write kernels in Python one block of data at a time, and JAX compiles and shards ordinary array code across devices. The CUDA Kernels and JAX for ML Systems study plans have 35 problems each, and the Triton Kernels study plan has 30.
| Topic | Guide | Study plan or project | Starter problem |
|---|---|---|---|
| CUDA kernels | How to learn CUDA | CUDA Kernels study plan | Implement Leaky ReLU as a CUDA Kernel |
| Triton kernels | How to learn Triton | Triton Kernels study plan | Vector Addition in Triton |
| JAX | How to learn JAX | JAX for ML Systems study plan | Value and Grad of a Loss |
Stage 11: How do you learn inference and ML systems?
You learn inference and ML systems by implementing the techniques that make a trained model fast and cheap to serve, and by practising how to design a full ML product. Serving an LLM depends on the KV cache, batching, quantization and attention variants that use less memory. The Inference Engineering study plan has 30 problems in six sections, and the ML system design lessons cover the decisions from requirements to monitoring.
| Topic | Guide | Study plan or project | Starter problem |
|---|---|---|---|
| Serving LLMs quickly and cheaply | Inference engineering | Inference Engineering study plan, LLM inference server project | Decode Attention with a KV Cache |
| System design for ML products | ML system design practice | ML system design lessons |
Stage 12: How do you learn to read and implement ML papers?
You learn to read ML papers by going through a paper in several passes and turning its method section into code that you test against the reported behaviour. Start with papers whose ideas you already use, such as Adam or the Transformer, because you can check your implementation against a library version. The research paper tracks break well-known papers into problems, and the list of ML papers to implement from scratch puts fifteen of them in order.
| Topic | Guide | Study plan or project | Starter problem |
|---|---|---|---|
| Reading a paper and turning it into code | How to read an ML paper and implement it | Research paper tracks | Adam Optimizer Step |
| Which papers to implement first | 15 ML papers to implement from scratch |
What does the whole roadmap look like in one table?
The whole roadmap fits in twelve stages, each with a topic list and a check that tells you when you are ready to move on. Use the last column as the test for each stage, because finishing a set of lessons is a weaker signal than producing the result yourself.
| Stage | What you learn | Ready to move on when |
|---|---|---|
| 1. Python and NumPy | Functions, classes, array shapes, broadcasting and vectorized code | You can write a loss function on arrays without a loop |
| 2. The maths | Linear algebra, calculus, probability and optimization at the level ML uses them | You can explain a gradient step and a matrix product in your own words |
| 3. Classic ML | Regression, classification, trees, clustering, evaluation and feature engineering | You can train and evaluate a model you wrote in NumPy |
| 4. Deep learning with PyTorch | Tensors, autograd, layers, training loops and data loading | A small network you wrote trains and its loss falls |
| 5. A branch | Computer vision, NLP or reinforcement learning | You can implement the core model of your branch from scratch |
| 6. Transformers and LLMs | Attention, the transformer block, tokenization and next-token training | A tiny GPT you built generates text |
| 7. Fine-tuning | Supervised fine-tuning, LoRA, QLoRA and preference tuning | You can adapt a pretrained model to a task and measure the change |
| 8. RAG and agents | Chunking, retrieval, reranking, tool calling and evaluation | A system answers questions from your documents with citations |
| 9. Generative models | Forward noising, the denoising loss, samplers and guidance | You can sample from a small diffusion model you trained |
| 10. GPU programming | CUDA, Triton and JAX | A kernel you wrote is correct and you can measure its speed |
| 11. Inference and systems | KV caching, batching, quantization and ML system design | You can explain where the time and memory go when a model serves requests |
| 12. Reading papers | Turning a method section into tested code | You have reimplemented one paper and written down what matched |
How long does each stage of the roadmap take?
Each stage takes a different amount of time depending on your background and the hours you can give it, so treat any estimate as a rough guide. Someone who already writes Python every day may finish stage 1 quickly, while someone returning to maths after years away may spend longer on stage 2 than on anything else.
A few of the guides give their own estimates. The maths guide lays out a 12-week roadmap that assumes 6 to 8 hours a week to reach a working level, and the linear algebra guide takes seven weeks at about five hours a week. The foundations as a whole usually take months of part-time study, and the later stages take longer, since topics such as LLMs or GPU kernels keep growing as you work with them.
Measure progress by what you can build rather than by time spent. A stage is done when you can pass its check in the summary table without notes, and moving on earlier usually means coming back to it later.
How do you choose a branch for your career goal?
You choose a branch by starting from the job you want and working back to the stages that job is interviewed on. The four common goals share the foundations and differ in the later stages, and each has an interview guide that shows what the rounds test.
| Goal | Stages to prioritise | Interview guide |
|---|---|---|
| ML engineer | Stages 1 to 4 in depth, one branch, then stages 6 and 11 | ML engineer interview preparation, ML coding interview questions |
| Data scientist | Stages 1 to 3 in depth with SQL, pandas and statistics, then stage 4 | Data scientist interview preparation, SQL interview questions, Statistics interview questions |
| Research engineer | Stages 1 to 6 in depth, then stages 10 and 12 | Research engineer interview preparation, LLM interview questions |
| AI engineer | Stages 1, 4 and 6, then stages 7, 8 and 11 | AI engineer interview questions, LLM interview questions |
A data scientist spends more time on SQL, pandas and statistics than on deep learning, and the SQL study plan has 25 problems for the query side. If you are unsure which of the first two roles fits you, the comparison of ML engineer and data scientist roles sets out how the daily work differs.
How should you practise machine learning each week?
You should practise machine learning each week by mixing reading, implementing and building, with implementation taking the largest share. Reading an explanation can feel the same as understanding it, and the gap only shows when you write the code and run the tests.
- Read the lesson or guide section for one topic before you try its problem, and stop reading once you know what the problem is asking.
- Solve a few problems on that topic without looking at a solution, and return the next week to any you could not finish.
- Revisit a topic from an earlier stage every week, because spaced review is what keeps the foundations from fading.
- Once a week, join the pieces you have practised into something small that trains, such as a model on a toy dataset.
- Keep a short log of what broke and why, since the same mistakes tend to return in later stages.
None of this needs expensive hardware. Most of the roadmap runs on a laptop or in the browser, and our guide on practising ML without a GPU covers what to do when you want to train something larger.
How do you build a portfolio and prepare for interviews?
You build a portfolio by turning the work from this roadmap into a few public projects that show different skills, and you prepare for interviews by practising the rounds under a timer. A strong portfolio usually has a model implemented from scratch and tested against a library, a paper reimplementation with notes on what matched, and an end-to-end project that someone else can run.
The guide on how to build an ML portfolio covers what reviewers look for and how to turn projects into resume bullets, and the guide on explaining an ML project in an interview covers presenting it. For the interview itself, timed mock assessments let you rehearse each round against a clock. Four mock assessments are free, including the full ML Engineer and Data Science mock interviews, and the ML mock interview guide explains how to use the results.
What mistakes do people make when learning machine learning?
- Jumping straight to LLMs without the foundations leaves gaps that show up as soon as a model trains badly, since debugging needs gradients, shapes and probability.
- Watching course after course without building anything gives a feeling of progress, so test yourself by rebuilding each idea with the tutorial closed.
- Skipping the maths works until the loss goes to NaN or stops falling, and at that point you need it to find the cause.
- Learning every branch at once spreads the time too thin, and going deep in one branch first makes the others easier later.
- Only calling library functions hides the decisions inside them, so implement each core model once before you rely on the library version.
- Judging a model only by its training score hides overfitting and leakage, so always evaluate on data the model has not seen.
- Leaving interview practice until the end means discovering weak areas late, and an early timed mock shows where to focus.
The guide on ML interview mistakes covers the errors that cost people interviews once they reach that stage.
Practice this
- Numerically Stable Softmax checks the NumPy skills of stage 1 and appears again inside attention, losses and sampling later on.
- Linear Regression from Scratch joins a loss, its gradient and an update rule into the training loop that every later model repeats.
- Scaled Dot-Product Attention is the core operation of every transformer and the point where the LLM stages begin.
Then pick the study plan for your current stage from the tables above, or browse all study plans and projects.
How long does it take to learn machine learning?
The time it takes to learn machine learning depends on your starting point and your weekly hours, so treat any single number with caution. The foundations of Python, NumPy, maths and classic ML usually take months of steady part-time study rather than weeks. The later stages, such as LLMs or GPU programming, take longer again, and most people keep learning them while they work.
Can you learn machine learning without a degree?
Yes, you can learn machine learning without a degree, as long as you learn the maths that a degree would have taught you. The topics that matter most are linear algebra, calculus, probability and optimization at the level ML uses them. Without a degree you also need public proof of your skills, such as from-scratch implementations, a paper reimplementation and an end-to-end project.
Do you need a GPU to learn machine learning?
No, you do not need a GPU for most of a machine learning roadmap. Python, NumPy, the maths, classic ML and small neural networks all run on a laptop, and many practice problems run in the browser. A GPU becomes useful when you train larger models, and it is required for the CUDA and Triton stage, where the kernels have to run on real GPU hardware.
Should you learn PyTorch, TensorFlow or JAX first?
Learn PyTorch first unless your target team already uses something else. PyTorch is the framework used in most research code and most open-source model implementations, so it gives you the most to read and practise on. JAX is worth learning later if you work on large-scale training or with a team that uses it, and the ideas carry over because both frameworks are built on the same array operations.
Should you learn classic machine learning before deep learning?
Yes, learn classic machine learning before deep learning. Linear and logistic regression introduce the loss functions, gradients, regularization and evaluation methods that every neural network also uses. Classic models are also the first thing interviewers ask about and the right baseline for most tabular problems, so the time is not wasted even if you plan to work on LLMs.
Related guides
- The self-taught ML engineer path, and where it breaks
- What maths do you need for machine learning?
- How to build an LLM from scratch, one component at a time
- How to build a machine learning portfolio that gets interviews
- How to prepare for an ML engineer interview
- Why bother learning machine learning from scratch?