Gradium × TensorTonic Voice Challenge is open for registration.Register now
TensorTonic guides

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.

By TensorTonic's founderLast updated 14 min read

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.

Python and NumPy with a guide, a study plan and a starter problem
TopicGuideStudy plan or projectStarter problem
Python and NumPyHow much Python you need for MLNumPy study planNumerically Stable Softmax
Pandas for tables of dataPandas 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.

The maths for machine learning with a guide, a study plan and a starter problem
TopicGuideStudy plan or projectStarter problem
The maths in learning orderWhat maths you need for MLProbability and Statistics study planImplement Gradient Descent for a 1D Quadratic
Linear algebra through codeHow to learn linear algebra for MLLinear Algebra study planImplement Dot Product
Derivatives and gradientsML Math lessonsCalculus 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.

Classic machine learning with a guide, a study plan and a starter problem
TopicGuideStudy plan or projectStarter problem
Classic models in NumPyWhy learn ML from scratchCracking ML study planLinear Regression from Scratch
Choosing a loss and a metricWhich loss function to use, ML evaluation metricsLogistic 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.

Deep learning with PyTorch with a guide, a study plan and a starter problem
TopicGuideStudy plan or projectStarter problem
PyTorch from tensors to trainingHow to learn PyTorchPyTorch study planMini Training Loop
Backpropagation by handBuild Micrograd from Scratch study planBasic Autograd
Architectures and training techniquesWhich optimizer to useCracking 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.

The three branches with a guide, a study plan and a starter problem for each
BranchGuideStudy planStarter problem
Computer visionHow to learn computer visionCracking CV study planMultichannel 2D Convolution
Natural language processingHow to learn NLPCracking NLP study planTF-IDF
Reinforcement learningHow to learn reinforcement learningCracking Reinforcement Learning study plan, AlphaGo from Scratch study planQ-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.

Transformers and LLMs with a guide, a study plan or project and a starter problem
TopicGuideStudy plan or projectStarter problem
The original TransformerHow to implement a Transformer from scratchScaled Dot-Product Attention
A GPT-style language modelHow to build an LLM from scratchBuild LLM from Scratch study plan, Build a Tiny GPT from Scratch projectCausal 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.

Fine-tuning with a guide, a project and a starter problem
TopicGuideStudy plan or projectStarter problem
Supervised fine-tuning, LoRA and QLoRAHow to fine-tune an LLMFine-tune an LLM projectBuild an Assistant-Only SFT Loss Mask
Preference tuningDPODPO 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.

RAG and agents with a guide, a project and a starter problem
TopicGuideStudy plan or projectStarter problem
Retrieval-augmented generationHow to build a RAG system from scratchRAG from Scratch projectText Chunking for RAG
Agents and tool callingHow to build an AI agent from scratchBuild 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.

Generative models with a guide, a study plan and a starter problem
TopicGuideStudy plan or projectStarter problem
Diffusion and flow matchingHow to learn diffusion modelsBuild Diffusion Model from Scratch study plan, Generate Images with Diffusion and Rectified Flow projectForward 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.

GPU programming with a guide, a study plan and a starter problem for each tool
TopicGuideStudy plan or projectStarter problem
CUDA kernelsHow to learn CUDACUDA Kernels study planImplement Leaky ReLU as a CUDA Kernel
Triton kernelsHow to learn TritonTriton Kernels study planVector Addition in Triton
JAXHow to learn JAXJAX for ML Systems study planValue 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.

Inference and ML systems with a guide, a study plan or project and a starter problem
TopicGuideStudy plan or projectStarter problem
Serving LLMs quickly and cheaplyInference engineeringInference Engineering study plan, LLM inference server projectDecode Attention with a KV Cache
System design for ML productsML system design practiceML 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.

Reading and implementing papers with a guide, the paper tracks and a starter problem
TopicGuideStudy plan or projectStarter problem
Reading a paper and turning it into codeHow to read an ML paper and implement itResearch paper tracksAdam Optimizer Step
Which papers to implement first15 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.

All twelve stages of the machine learning roadmap with what each covers and when to move on
StageWhat you learnReady to move on when
1. Python and NumPyFunctions, classes, array shapes, broadcasting and vectorized codeYou can write a loss function on arrays without a loop
2. The mathsLinear algebra, calculus, probability and optimization at the level ML uses themYou can explain a gradient step and a matrix product in your own words
3. Classic MLRegression, classification, trees, clustering, evaluation and feature engineeringYou can train and evaluate a model you wrote in NumPy
4. Deep learning with PyTorchTensors, autograd, layers, training loops and data loadingA small network you wrote trains and its loss falls
5. A branchComputer vision, NLP or reinforcement learningYou can implement the core model of your branch from scratch
6. Transformers and LLMsAttention, the transformer block, tokenization and next-token trainingA tiny GPT you built generates text
7. Fine-tuningSupervised fine-tuning, LoRA, QLoRA and preference tuningYou can adapt a pretrained model to a task and measure the change
8. RAG and agentsChunking, retrieval, reranking, tool calling and evaluationA system answers questions from your documents with citations
9. Generative modelsForward noising, the denoising loss, samplers and guidanceYou can sample from a small diffusion model you trained
10. GPU programmingCUDA, Triton and JAXA kernel you wrote is correct and you can measure its speed
11. Inference and systemsKV caching, batching, quantization and ML system designYou can explain where the time and memory go when a model serves requests
12. Reading papersTurning a method section into tested codeYou 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.

Which stages to prioritise for each career goal and the matching interview guides
GoalStages to prioritiseInterview guide
ML engineerStages 1 to 4 in depth, one branch, then stages 6 and 11ML engineer interview preparation, ML coding interview questions
Data scientistStages 1 to 3 in depth with SQL, pandas and statistics, then stage 4Data scientist interview preparation, SQL interview questions, Statistics interview questions
Research engineerStages 1 to 6 in depth, then stages 10 and 12Research engineer interview preparation, LLM interview questions
AI engineerStages 1, 4 and 6, then stages 7, 8 and 11AI 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

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

Keep reading