JAX Tutorial: From Basics to Advanced JAX 教程:从入门到进阶
Online tutorial在线教程, JAX 0.12 · Jupyter, 2026
About this tutorial
A hands-on JAX tutorial in two parts, from the basics to advanced topics. It follows two courses on apxml.com — Getting Started with JAX and Advanced JAX: Performance, Optimization, and Scale — and adds five extra chapters on topics you run into in real projects: Pallas kernels, debugging, export and deployment, random numbers and sharding, and scientific computing.
Every chapter is a Jupyter notebook that was run end to end on JAX 0.12 (CPU), with all outputs included, so you can read it here without running anything. Key claims are backed by asserts in the code, and outdated APIs are shown side by side with the current way to write them.
How to use it
- Read online: open any chapter below.
- Run it yourself: on each chapter page, click Open in Colab. The first cell installs the tested JAX version; use the default CPU runtime. You can also download the
.ipynband run it locally. - Exercises: each exercise has a ✍️ answer cell followed by a 🧪 self-check. ✅ means your answer passes; ⏳ means you haven’t defined the required name yet. Reference solutions are in each chapter’s appendix.
- First time through: follow the core learning path — read the main text and the 🟢 Must-read extras, and skip the ⚪ Optional ones for now. Looking for a specific API? Try the keyword index.
Part 1 · Basics
Part 2 · Advanced
Course explanations are reorganized from the key points of the original apxml.com courses, with a link to the original page at the start of each section. The original course content is © ApX Machine Learning.
教程简介
一套分成入门和进阶两部分的 JAX 实战教程。内容跟着 apxml.com 的两门课程整理: JAX 入门 和 JAX 高级编程:性能、优化与规模化,另外补充了五章实际项目里常用的内容: Pallas 内核、调试、导出与部署、随机数与分片、科学计算。
每章是一个 Jupyter notebook,都在 JAX 0.12(CPU)上完整运行过,输出也一并保留,不运行也能直接在这里阅读。 重要结论都配了 assert 验证;过时的 API 会和现在的写法放在一起对照。
怎么用
- 在线阅读:点下面任意一章。
- 自己动手运行:在章节页点 在 Colab 中打开。第一格会安装测试过的 JAX 版本,用默认的 CPU 运行时即可。 也可以下载
.ipynb在本地运行。 - 做练习:每道练习下面有 ✍️ 作答区和 🧪 自检。✅ 表示通过;⏳ 表示还没定义题目要求的名字。参考答案在每章最后的附录里。
- 第一遍学习:按 核心学习路径 走,只看正文和标着 🟢 必读的补充,⚪ 选读的可以先跳过。 想查某个 API 在哪讲过,可以用 关键词索引。
第一部分 · 入门
第二部分 · 进阶
讲解部分按 apxml.com 原课程的要点重新组织,每节开头附有原课程链接。原课程内容版权归 ApX Machine Learning 所有。
