Free, hands-on AI courses that run anywhere, from the team building Synapsa, an AI-native learning platform.
Start here · Choose your path · The map · What's coming · How a lesson works · Quality
Looking for the 2017-2025 tutorials? They are retired; what changed, and why.
The 8 GB track · ~40 minutes · a laptop CPU, 8 GiB RAM, no GPU, no download · Python · no lesson to do first
Build a profiler that measures what any piece of Python really costs in time and memory, rank four implementations of one task on the numbers, and reproduce the compute-tier check every lesson here has to pass.
- Pick a service. Binder needs no account; Colab, Kaggle and Codespaces ask you to sign in, and in Codespaces you open the lesson's
lesson.ipynbyourself. - Press Run all. Every cell runs, each unfinished exercise says so, and a progress board ends the notebook.
- Fill in the first exercise and re-run its cell. Its check tells you whether you are right and, if not, what the likely mistake is.
What this lesson assumes you can already do
- write a Python function with a loop and a try/finally block, define a NamedTuple, and read a traceback to find the failing line
- create and slice a numpy array, and call methods such as .sum() on it
- say what RAM is, as opposed to disk, and what happens to a program that asks for more of it than the machine has
New to some of that? Free places to learn it:
- The Python Tutorial, section 8: Errors and Exceptions · Python Software Foundation
- NumPy user guide: Data types · NumPy project
- tracemalloc: Trace memory allocations · Python Software Foundation
- Operating Systems: Three Easy Pieces · Arpaci-Dusseau and Arpaci-Dusseau
- New to AI. Begin with some Python and take these in order, each needing only the lessons before it: The 8 GB track → Byte-level BPE from scratch → The CPU slice of nanolm → Retrieval from scratch → The agent loop from scratch. The same path with launch links is in the track lessons.
- ML engineer. Agents and protocols · Retrieval and RAG · Inference systems · Post-training · Evaluation and governance · AI engineering · Language models
- Domain specialist. EU AI Act conformity · Model risk · Predictive maintenance · Document intelligence · Credit underwriting · Proteomics and multiomics · AI for science · Humanoid Lab
The courses aim at the work people are paid for: evidence an inspector can re-run, a model a risk committee can sign off, an alarm a plant manager will trust. Every number a lesson prints is computed by code you run, and every claim it makes about the world cites a primary source.
77 lessons, every one passing all 14 gates in QUALITY.md and independently reviewed. 7 are compiled C or C++ exercises. Every notebook opens in Colab, Kaggle, Binder, Codespaces or local Jupyter. Every MODULES.md marks a module built only when its lesson exists and has passed; everything else says specified, and means it.
- EU AI Act conformity · 9 of 9 modules built. Show that an AI system meets the EU AI Act, with evidence an inspector can re-run. Start with The conformity evidence pack.
- Document intelligence · 11 of 11 modules built. Pull fields out of invoices and contracts, and prove how often you are wrong. Start with Field extraction you can measure.
- Predictive maintenance · 9 of 9 modules built. Take predictive maintenance from sensor physics to an alarm threshold priced in money. Start with Alarm economics.
- Model risk · 10 of 10 modules built. Validate a model well enough to sign it off: calibration, challengers, explainability, the committee pack. Start with A validation suite that would survive an audit.
- Credit underwriting · 2 of 8 modules built, 6 specified and not built yet. Build credit models that survive an audit: vintage curves, a hazard model, macro scenarios and an out-of-time back-test. Start with PD modelling with vintages and macro overlays.
- Proteomics and multiomics · 3 of 7 modules built, 4 specified and not built yet. Get from mass spectra to proteins you can defend: a search engine, target-decoy FDR, protein inference, missing values and batch effects. Start with DIA and DDA fundamentals with open search engines.
- Humanoid Lab · 8 lessons + capstone. Make a simulated humanoid stand and walk, then measure how far that is from a robot. Start with First contact with a humanoid.
- Orientation · 3 lessons. Start from nothing, on a laptop. Measure what code costs on an 8 GB machine, keep a model registry honest through a model swap, and write one client for three backends. Start with The 8 GB track.
- Data and statistics · 1 lesson. Statistics by simulation: sampling distributions, bootstrap intervals, permutation tests and power, the habits every later lesson leans on. Start with Statistics by simulation.
- Language models · 3 lessons. Tokenisers from scratch, the BPE merge loop in C++, and a language model trained on a CPU with numpy alone. Start with Byte-level BPE from scratch.
- Post-training · 1 lesson. Post-training from scratch: GRPO in numpy on a tiny model, and the traps that make a reward mislead you, measured. Start with GRPO from scratch on a tiny model.
- Inference systems · 2 lessons. Serve a language model on modest hardware: a KV cache, paging and continuous batching on a CPU, and what each one buys. Start with Serving a small model on a CPU.
- Retrieval and RAG · 4 lessons. Build search and RAG you can measure: retrieval, chunking, the context budget, reranking and agent memory. Start with Retrieval from scratch.
- Agents and protocols · 5 lessons. Build AI agents that hold up: the agent loop from scratch, MCP and A2A from the wire up, evaluation with intervals, and constrained decoding. Start with The agent loop from scratch.
- AI engineering · 1 lesson. Run agents like production software, with OpenTelemetry traces and a cost-per-task report rebuilt from the traces alone. Start with Observability for agents.
- Evaluation and governance · 3 lessons. Measure models honestly: an EU AI Act evidence pack, evaluation across languages, and a mini arena whose ratings carry intervals. Start with The conformity evidence pack.
- AI for science · 2 lessons. Do AI for science on real data: find the first gravitational wave in the raw LIGO data, and model rainfall to runoff honestly. Start with Find GW150914 in the raw LIGO data.
New lessons three times a week, every Monday, Wednesday and Friday. Watch or star this repository to hear about each one as it lands.
- September 2026. Document intelligence for regulated operations, retrieval and RAG, and the agents track begins.
- October 2026. AI agents and the protocols they speak, two new industry programmes on proteomics and multiomics and on evidence-based credit decisions, AI for science, serving models on modest hardware, post-training from scratch, and evaluating across languages.
- November 2026. The credit decisions and the proteomics and multiomics programmes continue, module by module.
- December 2026. Deeper courses in the industries we already cover.
Every lesson here is a notebook you do, not one you read. You fill in the exercises, and each one checks itself the moment you run it.
- Open it in Colab, Kaggle, Binder, Codespaces or your own Jupyter. The first cell installs what the lesson needs at the versions it was measured with, and does nothing where it is already there.
- Run all before you write a line. Every cell runs: each unfinished exercise says it is not implemented yet, and a progress board ends the notebook, one line per exercise, marked ✅ passed, ❌ failed or ⏳ not started.
- Fill in an exercise and re-run its cell. Its check says whether you are right and, if not, what the likely mistake is. Each exercise has two hints, the first on what to think about and the second on the approach; neither gives you the answer.
- Read the board. Your score against the full rubric, and the worked solution, come with enrolment on Synapsa.
Anything a lesson measures on your machine, like a time or a memory peak, prints with its unit and will differ from ours. Every other number a finished lesson prints is identical on Python 3.11 and 3.12; every lesson is checked for that before it is released.
On Kaggle, a lesson that installs a package or fetches a file needs Internet switched on in the notebook's settings, and Kaggle allows that only for phone-verified accounts. Colab, Binder and Codespaces need nothing.
Codespaces opens the whole repository, so open the lesson's lesson.ipynb yourself once it has started:
To work on your own machine, with Python 3.11 or 3.12:
git clone --depth 1 \
https://github.com/TarrySingh/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials \
synapsa-commons
cd synapsa-commons
python -m venv .venv && .venv/bin/pip install -r requirements.txt
.venv/bin/jupyter labOn Windows the last two commands use .venv\Scripts\pip and .venv\Scripts\jupyter.
7 lessons are C or C++ exercises, and they also need make and a C or C++ compiler (clang or gcc). Binder and Codespaces install both from this repository's own setup (binder/apt.txt and .devcontainer/devcontainer.json); on your own machine, install them first.
PyTorch, for the few lessons that use it
PyTorch is an optional, separate install, because only a few lessons use it. Colab and Kaggle
already have it, and a lesson that needs it installs it from its first cell anywhere else. To
install it yourself, run .venv/bin/pip install -r requirements-torch.txt; on Linux, add
--index-url https://download.pytorch.org/whl/cpu to get the CPU build the lessons are checked
with instead of gigabytes of CUDA libraries. On a Mac the pinned version needs Apple silicon and
macOS 14 or later.
The lessons workflow checks on Linux, which is what Colab, Kaggle, Binder and Codespaces run, that every notebook opens and runs.
QUALITY.md sets out 14 gates that a lesson must pass before it is marked built.
A lesson is marked built only after an independent reviewer has tried to break it, including by grading plausible wrong answers against its rubric.
In short, every lesson has:
- measurable objectives, and prerequisites that are real lessons;
- scaffolded exercises with instant feedback, an autograded rubric, a worked solution and a self-check;
- a clean run from top to bottom in a fresh interpreter, inside a declared compute tier and time budget;
- free data that needs no registration, named with its licence;
- a primary source for every claim about the world, and no measured or computed number typed into the prose by hand;
- a notebook that opens and runs alone on Python 3.11 and 3.12, where Run all is a good experience.
Worked solutions, the full rubric with partial credit, and an official score come with free enrolment on Synapsa. Enrolment has not opened yet.
From 2017 to 2025 this repository carried a curated collection of machine-learning and deep-learning tutorials, much of it gathered from other people's work. It helped a great many learners, and we are grateful to everyone who starred it, forked it and contributed to it. That collection has now been retired from public view, so that everything published here is original work we can stand behind and license. Synapsa Commons replaces it.
Synapsa Commons is © 2026 RealAI, free to learn from and share, and licensed under
CC BY-NC-SA 4.0; the legal code is in
LICENSE and a plain-words summary in NOTICE.
- You may use the lessons to learn and to teach, and copy, fork, share and adapt them.
- You must credit "Synapsa Commons by RealAI" with a link here, say what you changed, and share adaptations under the same licence.
- You may not use them, or anything adapted from them, for commercial advantage or payment: selling them, charging for a course or training built on them, or packaging them into a paid product or service.
Commercial licences are available from RealAI. Third-party
material inside a lesson keeps its own licence, named in that lesson's assets/SOURCE.md or
claims.yaml. The Synapsa name and logo belong to RealAI and are not licensed.
For maintainers
lessons/,flagships/,programmes/: track lessons, flagship subtrees, industry programmes.- Lessons are written and gated in a separate source that holds the worked solutions and the rubrics; this repository receives the student version of each lesson once it passes. The status lines, indexes and launch links on these pages are generated there from the lessons themselves.
tools/notebooks.pygenerates eachlesson.ipynband its launcher cell (--checkfor drift), andtools/verify_portable.pyruns each notebook alone in a minimal kernel on Python 3.11 and 3.12..github/workflows/lessons.ymlruns both on Linux on every change, and fails if a solution or rubric file is ever committed here.brand/holds the Synapsa Commons lockups used here and at the top of every notebook;brand/readme/andbrand/areas/hold the artwork on these pages, andtools/brand_svgs.py --lintchecks it.
Synapsa Commons by RealAI · synapsa.realai.eu