Skip to the content.

Computer Science for AI: A Free Self-Taught AI Engineer Curriculum from University Courses

A complete, free path to becoming an AI engineer using only courses from universities and research labs: programming, math, computer science, machine learning, deep learning, large language models (LLMs), AI applications, and ML systems. Every course lists its prerequisites and a realistic time estimate, so you can plan your own self-taught AI degree and track progress like a real program of study. It is for software developers moving into AI, students who want structure, and anyone who wants a university-level AI education without tuition.

Last reviewed: December 2026. Course pages move between semesters; if a link points to an old offering, the newest offering is usually linked from the same page. Time estimates are our own estimates for a self-learner, not official figures.


Table of Contents


Who This Is For

An “AI engineer” here means someone who can train and evaluate models, build reliable applications on top of LLMs, and run them in production. This curriculum gives you the foundations to do all three, plus enough depth to read research papers.


How the Curriculum Works


Curriculum at a Glance

Stage Topic Approx. time (at 15 h/week)
1 Programming foundations 3 to 4 months
2 Math for ML (calculus, linear algebra, probability, statistics) 4 to 5 months
3 Core computer science (algorithms, systems, databases) 3 to 4 months
4 Machine learning 2 to 3 months
5 Deep learning 3 months
6 NLP and large language models 3 months
7 AI applications and agents 1 to 2 months
8 ML systems, MLOps, efficient inference 2 months
9 Electives (two or more) 2 to 3 months
10 Capstone 1 to 2 months

Total: roughly 24 to 30 months part-time for a complete beginner, or about 12 to 15 months for an experienced developer who tests out of Stages 1 and 3. Stages 2 and 3 can run in parallel.


Prerequisite Map

flowchart TD
  P[Stage 1: Programming] --> CS[Stage 3: Core CS]
  P --> ML[Stage 4: Machine Learning]
  M[Stage 2: Math] --> ML
  ML --> DL[Stage 5: Deep Learning]
  DL --> LLM[Stage 6: NLP and LLMs]
  LLM --> APP[Stage 7: AI Apps and Agents]
  CS --> SYS[Stage 8: ML Systems and MLOps]
  DL --> SYS
  APP --> CAP[Stage 10: Capstone]
  SYS --> CAP
  DL --> EL[Stage 9: Electives]
  EL --> CAP

Stage 1: Programming Foundations

Goal: write, test and debug real programs in Python, and use the tools every engineer uses daily.

Course Provider Time Prerequisites
CS50x: Introduction to Computer Science Harvard 11 weeks x 10-15 h None
CS50P: Introduction to Programming with Python Harvard 10 weeks x 6-10 h None (CS50x helpful)
6.100L: Introduction to CS and Programming Using Python MIT OpenCourseWare 12 weeks x 8-10 h None
CS 61A: Structure and Interpretation of Computer Programs with the free textbook Composing Programs UC Berkeley 14 weeks x 12-15 h Basic Python
The Missing Semester of Your CS Education MIT 3 weeks x 5 h None

Required: CS50x or 6.100L, plus CS50P, plus The Missing Semester. Recommended: CS 61A, if you want the deepest understanding of abstraction, recursion and interpreters.

Done when: you can build a 500-line Python program split into modules, with tests, in a Git repository, using a debugger when needed.

Can I skip it? Yes, if you have professionally written Python and used Git and a terminal daily.


Stage 2: Math for Machine Learning

Goal: enough calculus, linear algebra, probability and statistics to read ML textbooks and papers without getting stuck on notation.

Calculus

Course Provider Time Prerequisites
18.01SC: Single Variable Calculus MIT OpenCourseWare 12 weeks x 8 h High school algebra and trigonometry
18.02SC: Multivariable Calculus MIT OpenCourseWare 12 weeks x 8 h 18.01

If you already know single-variable calculus, a review with Khan Academy multivariable calculus (gradients, partial derivatives, the chain rule) can replace 18.02 for ML purposes.

Linear algebra

Course Provider Time Prerequisites
18.06: Linear Algebra (Gilbert Strang) or the self-paced 18.06SC MIT OpenCourseWare 12 weeks x 8-10 h High school algebra
18.065: Matrix Methods in Data Analysis, Signal Processing, and Machine Learning MIT OpenCourseWare 12 weeks x 6-8 h 18.06

Watch 3Blue1Brown’s Essence of Linear Algebra alongside 18.06 for geometric intuition.

Probability and statistics

Course Provider Time Prerequisites
Stat 110: Introduction to Probability (audit) Harvard (edX) 12 weeks x 8-10 h Single variable calculus
18.05: Introduction to Probability and Statistics MIT OpenCourseWare 12 weeks x 8 h Single variable calculus
6.041SC: Probabilistic Systems Analysis and Applied Probability MIT OpenCourseWare 12 weeks x 8-10 h Multivariable calculus

Required: One of Stat 110 or 6.041SC for probability, plus 18.05 for statistics (or 18.05 alone if you are short on time).

All-in-one alternative

Course Provider Time Prerequisites
Mathematics for Machine Learning Specialization (audit) Imperial College London (Coursera) 3 courses, about 4-6 weeks each x 4-6 h High school math

This specialization is faster and more applied. It is a good option for working developers, but it is lighter than the full MIT sequence; pair it with Stat 110 for probability.

Done when: you can compute a gradient of a scalar function of a vector by hand, explain eigenvalues and the SVD, derive the maximum likelihood estimate of a Gaussian mean, and explain Bayes’ rule with an example.

Optional: optimization

Course Provider Time Prerequisites
EE364A: Convex Optimization Stanford 10 weeks x 10 h Linear algebra, multivariable calculus

Recommended if you plan to do research or take Stage 9 theory electives.


Stage 3: Core Computer Science

Goal: algorithms, how computers and operating systems work, and how data is stored, so that you can build efficient, reliable AI systems and pass engineering interviews.

Course Provider Time Prerequisites
6.006: Introduction to Algorithms MIT OpenCourseWare 12 weeks x 10 h Stage 1, discrete math basics
Algorithms, Part I and Part II (alternative to 6.006) Princeton (Coursera, free) 6 weeks each x 6-10 h Java basics
Mathematics for Computer Science (6.042J) MIT OpenCourseWare 12 weeks x 8 h Stage 1
Nand2Tetris: Build a Modern Computer from First Principles Hebrew University (free materials, also on Coursera) 12 weeks x 6-8 h Stage 1
CS 61C: Great Ideas in Computer Architecture UC Berkeley 14 weeks x 10 h CS 61A or equivalent
Operating Systems: Three Easy Pieces (free book used by many OS courses) University of Wisconsin-Madison 8 weeks x 6 h C basics (from CS50x)
15-445/645: Database Systems Carnegie Mellon 14 weeks x 8-12 h C++ basics, Stage 1
CS50 SQL: Introduction to Databases with SQL (lighter alternative to 15-445) Harvard 7 weeks x 5 h None

Required: 6.006 (or Princeton Algorithms), one of Nand2Tetris or CS 61C, OSTEP, and CS50 SQL. Recommended: CMU 15-445 if you want to understand vector databases and storage engines deeply; 6.042J if 6.006 feels too mathematical.

Why this matters for AI: GPU memory, batching and caching, data loading bottlenecks, indexes for retrieval, and concurrency all come up daily when you serve models.

Done when: you can analyze the time and space complexity of your code, explain virtual memory, processes and threads, and design a normalized database schema with indexes.


Stage 4: Machine Learning

Goal: classic supervised and unsupervised learning, how to evaluate models honestly, and the math behind it.

Course Provider Time Prerequisites
Machine Learning Specialization (audit) Stanford and DeepLearning.AI (Coursera) 3 courses, about 3-4 weeks each x 5-8 h Stage 1, basic math
CS229: Machine Learning, with the free Autumn 2018 lecture videos Stanford 12 weeks x 10-15 h Stage 2
CS4780: Machine Learning for Intelligent Systems (Kilian Weinberger) Cornell 12 weeks x 8-10 h Stage 2
6.036: Introduction to Machine Learning MIT OpenCourseWare 12 weeks x 8-10 h Stage 2
Learning from Data (Yaser Abu-Mostafa) Caltech 10 weeks x 8 h Stage 2

Required: One applied course (the Machine Learning Specialization or 6.036) and one mathematical course (CS229 or CS4780). Recommended: Learning from Data for the theory of generalization, which explains why overfitting happens.

Textbook companion: An Introduction to Statistical Learning (free at statlearning.com).

Done when: you can implement linear and logistic regression and k-means with NumPy, explain bias and variance, set up train, validation and test splits and cross-validation correctly, and pick a metric that matches a business problem.


Stage 5: Deep Learning

Goal: neural networks from the ground up, modern architectures, and practical training skills in PyTorch.

Course Provider Time Prerequisites
Neural Networks: Zero to Hero Andrej Karpathy (former Stanford instructor and OpenAI researcher) 6 weeks x 8-10 h Stage 1, basic calculus
Practical Deep Learning for Coders fast.ai 8 weeks x 8-10 h Stage 1
CS231n: Deep Learning for Computer Vision Stanford 12 weeks x 10-15 h Stage 2, Stage 4
Deep Learning (Yann LeCun and Alfredo Canziani) NYU 12 weeks x 8-10 h Stage 2, Stage 4
UvA Deep Learning Course University of Amsterdam 8 weeks x 8 h Stage 4
11-785: Introduction to Deep Learning Carnegie Mellon 14 weeks x 12-15 h Stage 2, Stage 4
MIT 6.S191: Introduction to Deep Learning MIT 2 weeks x 8 h Stage 1, basic calculus

Required: Neural Networks: Zero to Hero, plus one full university course (CS231n, NYU Deep Learning or CMU 11-785). Recommended: fast.ai for practical training tricks; MIT 6.S191 as a quick yearly overview of new topics.

Done when: you can implement backpropagation for a small network without a framework, train a CNN and a small transformer in PyTorch, diagnose overfitting and unstable training from loss curves, and use a GPU efficiently.


Stage 6: NLP and Large Language Models

Goal: how language models work, how they are trained, fine-tuned and aligned, and how to evaluate them.

Course Provider Time Prerequisites
CS224N: Natural Language Processing with Deep Learning, with the free Winter 2021 lecture videos Stanford 10 weeks x 12-15 h Stage 5
CS336: Language Modeling from Scratch Stanford 10 weeks x 15-20 h (very demanding) Stage 5, strong Python and PyTorch
11-711: Advanced NLP Carnegie Mellon 14 weeks x 10 h Stage 5
CS25: Transformers United Stanford (seminar) Ongoing talks, 1-2 h each Stage 5
CS329H: Machine Learning from Human Preferences Stanford 10 weeks x 8 h Stage 5
LLM Course Hugging Face (lab course) 6 weeks x 5 h Stage 5

Required: CS224N, plus either CS336 (if you want to train models yourself) or 11-711 (broader NLP). Recommended: the Hugging Face LLM Course for the practical library skills; CS329H for alignment and RLHF; CS25 talks to stay current.

Done when: you can implement and train a small GPT-style model, explain tokenization, attention, KV caching and sampling, fine-tune an open-weight model with a parameter-efficient method, and evaluate it on a benchmark you built.


Stage 7: Building AI Applications and Agents

Goal: build reliable products on top of LLMs: retrieval-augmented generation (RAG), tool use, agents, evaluation and guardrails.

Course Provider Time Prerequisites
Large Language Model Agents (Fall 2024 MOOC) UC Berkeley 12 weeks x 3-5 h Stage 6
Advanced Large Language Model Agents (Spring 2025 MOOC) UC Berkeley 12 weeks x 3-5 h The Fall 2024 MOOC
Agentic AI (Fall 2025 MOOC) UC Berkeley 12 weeks x 3-5 h Stage 6
11-766: Large Language Model Applications Carnegie Mellon 14 weeks x 8 h Stage 6
LLM Zoomcamp DataTalks.Club (community course) 8 weeks x 6-8 h Stage 1

Required: One Berkeley agents MOOC (the most recent one) and one hands-on course (CMU LLM Applications or LLM Zoomcamp). The lecture series give you the research view; the hands-on course makes you build.

Project for this stage: a RAG or agent application over a real document collection, with an evaluation set of at least 50 questions, automatic scoring, a regression test you run before every change, and a short write-up of failure cases.

Done when: you can explain chunking, embeddings, hybrid search and reranking; build a tool-using agent with clear stopping conditions; measure quality with an eval set; and reason about cost, latency and prompt-injection risks.


Stage 8: ML Systems, MLOps and Efficient Inference

Goal: put models in production and run them fast and cheaply.

Course Provider Time Prerequisites
CS 329S: Machine Learning Systems Design Stanford 10 weeks x 6-8 h Stage 4
Full Stack Deep Learning (2022) Full Stack Deep Learning (independent course) 8 weeks x 6 h Stage 5
10-414/714: Deep Learning Systems Carnegie Mellon 12 weeks x 10-15 h Stage 3, Stage 5
6.5940: TinyML and Efficient Deep Learning Computing MIT 12 weeks x 8-10 h Stage 5
11-868: Large Language Model Systems Carnegie Mellon 14 weeks x 8-10 h Stage 5, Stage 6
MLOps Zoomcamp DataTalks.Club (community course) 9 weeks x 6 h Stage 4
Machine Learning Systems (open textbook) Harvard (Vijay Janapa Reddi) Reference Stage 4

Required: CS 329S or Full Stack Deep Learning, plus one of Deep Learning Systems, 6.5940 or 11-868. Recommended: MLOps Zoomcamp if you want guided hands-on practice with experiment tracking, orchestration and monitoring.

Done when: you can deploy a model behind an API with monitoring, explain quantization, batching and KV-cache memory, estimate GPU memory for training and inference, and set up a data and model versioning workflow.


Stage 9: Electives

Pick at least two, based on the kind of AI engineer you want to be.

Reinforcement learning

Course Provider Time Prerequisites
Reinforcement Learning lectures (David Silver) UCL / DeepMind 6 weeks x 6 h Stage 4
CS285: Deep Reinforcement Learning UC Berkeley 14 weeks x 10-15 h Stage 5
CS234: Reinforcement Learning Stanford 10 weeks x 10 h Stage 4
Deep RL Course Hugging Face (lab course) 8 weeks x 4-6 h Stage 5

Generative models

Course Provider Time Prerequisites
CS236: Deep Generative Models Stanford 10 weeks x 10 h Stage 5
CS294-158: Deep Unsupervised Learning UC Berkeley 14 weeks x 8-10 h Stage 5

Graph machine learning

Course Provider Time Prerequisites
CS224W: Machine Learning with Graphs Stanford 10 weeks x 8-10 h Stage 5

Classic AI (search, planning, reasoning)

Course Provider Time Prerequisites
CS50’s Introduction to AI with Python Harvard 7 weeks x 8 h Stage 1
CS188: Introduction to Artificial Intelligence UC Berkeley 14 weeks x 10 h Stage 3
6.034: Artificial Intelligence MIT OpenCourseWare 12 weeks x 8 h Stage 1

Probabilistic graphical models and theory

Course Provider Time Prerequisites
10-708: Probabilistic Graphical Models (2020) Carnegie Mellon 14 weeks x 10 h Stage 2, Stage 4
CSC2541: Neural Net Training Dynamics (2022) University of Toronto 12 weeks x 8 h Stage 5, EE364A helpful
Statistics for Applications (18.650) MIT OpenCourseWare 12 weeks x 8 h Stage 2

AI safety and alignment

Course Provider Time Prerequisites
CS329H: Machine Learning from Human Preferences (if not taken in Stage 6) Stanford 10 weeks x 8 h Stage 5
BlueDot Impact courses BlueDot Impact (nonprofit, cohort-based) 5-12 weeks x 3-5 h None

Stage 10: Capstone Project

Your capstone is your diploma. Choose something that:

  1. Solves a real problem for real users (a team at work, a community, a research group, an open-source project).
  2. Uses at least three stages of this curriculum, for example a fine-tuned model (Stage 6) inside an agent application (Stage 7) deployed with monitoring (Stage 8).
  3. Has an evaluation section with numbers: a baseline, your system, and an honest error analysis.
  4. Is public: code on GitHub, a write-up or short paper, and a demo video.

Capstone ideas:


Sample Schedules

Beginner, 15 hours per week (about 27 months)

Months What
1-4 Stage 1
5-9 Stage 2, with Stage 3 algorithms in parallel from month 7
10-12 Rest of Stage 3
13-15 Stage 4
16-18 Stage 5
19-21 Stage 6
22-23 Stage 7
24-25 Stage 8
26-27 Electives and capstone (electives can overlap Stage 8)

Experienced developer, 15 hours per week (about 13 months)

Months What
1-3 Stage 2 (Mathematics for ML Specialization plus Stat 110)
4-5 Stage 4
6-7 Stage 5
8-9 Stage 6
10 Stage 7
11 Stage 8
12-13 One elective and the capstone

How to Study a University Course on Your Own

  1. Find the full materials first. Check that the course has lecture videos or detailed notes, plus assignments. If assignments are restricted to enrolled students, look for an older offering that published them.
  2. Use a fixed weekly rhythm: lectures early in the week, assignments in the middle, review at the end. Treat deadlines as real.
  3. Do every assignment, starting from the provided starter code. If there are autograders, run the provided tests locally.
  4. Take notes in your own words, ideally as short “explain it to a friend” paragraphs.
  5. Find a study partner or group. Many courses have community Discord servers or forums; explaining to others is the fastest way to find your own gaps.
  6. Respect academic integrity. Do not post solutions to current assignments publicly; courses reuse them for enrolled students. Publish your own projects and write-ups instead.
  7. Use AI assistants as a tutor, not as a solution generator. Ask for hints and explanations after you have tried for a while.

Tracking Your Progress

Fork this repository and keep a PROGRESS.md file, for example:

| Stage | Course | Started | Finished | Proof (repo, notes, certificate) |
| --- | --- | --- | --- | --- |
| 1 | CS50x | 2027-01-04 | 2027-03-20 | github.com/you/cs50x-projects |
| 2 | 18.06 Linear Algebra | 2027-03-22 | | |

Good proof of completion: a repository of your assignment work (private if the course asks), a blog post summarizing what you learned, or a project that uses the course’s ideas.


FAQ

Is this equivalent to a degree? The content is comparable to many university courses because it is university courses, but employers treat self-study differently. Your projects, write-ups and open-source contributions are how you prove the knowledge.

Do I need to do all the math? For building LLM applications, you can get far with less math. For training models, debugging training, reading papers and passing ML interviews, Stage 2 pays off every week. Do at least the “Done when” level.

Python or something else? Python for almost everything here. Some systems courses use C, C++ or Java; that is good for you.

What about a GPU? Most assignments run on a laptop CPU or on free notebook environments with limited GPU time. For CS336 and larger projects, expect to rent GPU time or use smaller model sizes.

How do I stay current when the field changes every month? Stages 1 to 5 change slowly. Stages 6 to 8 change fast; take the newest offering of each course and follow seminar series such as CS25.


Contributing

Pull requests are welcome. Please keep entries accurate:

License

This curriculum is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). Courses belong to their institutions and instructors and keep their own terms.

If this helped you, a star helps others find it.

More free resources

Part of the Ralpberry Labs open-source collection. See also Top 100 Open Source.