HenryNdubuaku / maths-cs-ai-compendium

HenryNdubuaku / maths-cs-ai-compendium

Overview

Most textbooks bury good ideas under dense notation, skip the intuition, assume you already know half the material, and quickly get outdated in fast-moving fields like AI. This is an open, unconventional textbook covering maths, computing, and artificial intelligence from the ground up. Written for curious practitioners looking to deeply understand the stuff, not just survive an exam/interview.

概述

大多数教科书将好的思想埋没在晦涩的符号中,跳过直觉,预设你已经掌握了一半的内容,并且在人工智能等快速发展的领域中很快就会过时。这是一本开放的、非传统的教科书,从基础开始涵盖数学、计算和人工智能。它专为那些渴望深入理解知识,而不仅仅是为了应付考试或面试的实践者而编写。


Background

Over the past years working in AI/ML, I filled notebooks with intuition first, real-world context, no hand-waving explanations of maths, computing and AI concepts. In 2025, a few friends used these notes to prep for interviews at DeepMind, OpenAI, Nvidia etc. They all got in and currently perform well in their roles. Meanwhile I got in Y Combinator last year. So I’m sharing to everyone.

背景

在过去几年从事 AI/ML 工作的过程中,我写满了笔记本,内容以直觉优先,结合现实世界的背景,对数学、计算和人工智能概念进行了扎实的解释,而非敷衍了事。2025 年,几位朋友利用这些笔记准备 DeepMind、OpenAI、Nvidia 等公司的面试。他们全部成功入职,目前在各自岗位上表现出色。与此同时,我去年入选了 Y Combinator。因此,我决定将这些内容分享给大家。


MCP Server

This repo includes an MCP server that lets any AI assistant (Claude Code, Cursor, VS Code, etc.) use the compendium as a knowledge base. It requires a local clone of the repo. Comes with tools for educational purposes and example implementations.

MCP 服务器

该仓库包含一个 MCP 服务器,允许任何 AI 助手(如 Claude Code、Cursor、VS Code 等)将此纲要作为知识库使用。这需要你在本地克隆该仓库。它还附带了用于教学目的的工具和示例实现。


Outline

(Summary of chapters 01-18)

大纲

(第 01-18 章摘要)

#ChapterStatus
01Vectors (Spaces, magnitude, direction, norms, metrics, dot/cross/outer products, basis, duality)Available
02Matrices (Properties, special types, operations, linear transformations, decompositions)Available
03Calculus (Derivatives, integrals, multivariate calculus, Taylor approximation, optimisation)Available
04Statistics (Descriptive measures, sampling, central limit theorem, hypothesis testing)Available
05Probability (Counting, conditional probability, distributions, Bayesian methods, information theory)Available
06Machine Learning (Classical ML, gradient methods, deep learning, reinforcement learning)Available
07Computational Linguistics (NLP, language models, RNNs, CNNs, attention, transformers, etc.)Available
08Computer Vision (Image processing, object detection, segmentation, SLAM, vision transformers)Available
09Audio & Speech (DSP, ASR, TTS, voice activity detection, diarisation, source separation)Available
10Multimodal Learning (Fusion strategies, contrastive learning, CLIP, VLMs, world models)Available
11Autonomous Systems (Perception, robot learning, VLAs, self-driving cars)Available
12Graph Neural Networks (Geometric deep learning, graph theory, GNNs, graph attention)Available
13Computing & OS (Discrete maths, architecture, OS, concurrency, parallelism, languages)Available
14Data Structures & Algorithms (Big O, recursion, DP, arrays, hashing, trees, graphs)Available
15Production Software Engineering (Linux, Git, testing, CI/CD, Docker, MLOps, coding agents)Available
16SIMD & GPU Programming (C++ for ML, hardware fundamentals, CUDA, Triton, TPUs, RISC-V)Available
17AI Inference (Quantisation, efficient architectures, speculative decoding, cost optimisation)Available
18ML Systems Design (Systems fundamentals, cloud, distributed systems, feature stores, MLOps)Available

Foreword

A newborn’s brain is a newly initialised neural network, which trains from realworld data and experience into adulthood…until forever. Exceptional understanding of French with the flawless accent implies correct exposure to exceptional French and flawless accent. Similarly, great AI Researchers & engineers with excellent problem-skills imply quality knowledge consumed and exposure rich experience.

前言

新生儿的大脑是一个刚初始化的神经网络,它通过现实世界的数据和经验进行训练,直至成年……乃至永远。对法语的卓越理解和完美的口音,意味着曾接触过卓越的法语和完美的口音。同样,优秀的 AI 研究人员和工程师拥有出色的解决问题能力,意味着他们吸收了高质量的知识并拥有丰富的经验。


Now Kvashchev’s experiment was a long-term Serbian study demonstrating that intensive, three-year training in creative problem-solving can significantly boost intelligence, particularly fluid intelligence, adding 10-15 IQ points. There is such a thing as having a naturally high IQ, similar to how quality weight initialisations yield better training, evidenced by nature-vs-nurture experimental findings. However, the only advantage a high-IQ individual really has is the ability to learn/recognise patterns faster. But using a repeated pattern makes any concept absolutely learnable.

Kvashchev 的实验是一项长期的塞尔维亚研究,证明了为期三年的强化创造性问题解决训练可以显著提高智力,特别是流体智力,增加 10-15 个 IQ 点。确实存在天生高智商的情况,这类似于高质量的权重初始化能带来更好的训练效果,这已被先天与后天的实验结果所证实。然而,高智商个体真正拥有的唯一优势是能够更快地学习/识别模式。但通过重复的模式,任何概念都是绝对可以学会的。


Charles Darwin was considered a very average, if not below-average, student by his teachers and father. He described himself as not being quick-witted, feeling like a “slow processor” who needed time to soak in data. Between 3-10yrs, I performed well academically, naturally grasping concepts without ever taking notes or revising. I got a bit cocky between 11-13 and dropped to the bottom half of an 80-student class with this technique. Now between 14-15, I began reading like a normal student, finishing 1st in my final secondary school semester. Early school curriculum works well with natural IQ but real-world talents are powered by quality knowledge consumption and execution intensity. In fact, most students who perform well academically are just more studious, but the academic system is designed for fast learners. This compendium provides a rounded and well-connected flow of knowledge to facilitate better learning for the Darwins of the world. You only need elementary maths and basic python programming, everything else is picked up, just read and trust the process!

查尔斯·达尔文曾被他的老师和父亲认为是一个非常平庸,甚至低于平均水平的学生。他形容自己并不机灵,感觉自己是一个需要时间来吸收数据的“慢处理器”。在 3 到 10 岁之间,我的学业表现很好,无需做笔记或复习就能自然地掌握概念。在 11 到 13 岁之间,我变得有些自负,这种方法导致我的成绩跌落到 80 人班级中的后半段。到了 14 到 15 岁,我开始像普通学生一样阅读,最终在中学最后一个学期获得了第一名。早期的学校课程适合天生高智商的学生,但现实世界中的才能是由高质量的知识吸收和执行强度驱动的。事实上,大多数学业表现优异的学生只是更勤奋,但学术体系是为快速学习者设计的。本纲要提供了一个全面且联系紧密的知识流,旨在为世界上的“达尔文们”提供更好的学习路径。你只需要初等数学和基础的 Python 编程知识,其他一切都可以通过学习获得,只需阅读并相信这个过程!


How To Study Better

First semester at university, I took 17 modules at once, grades were not great for it, so I used a technique: Phase 1: Cumulative re…

如何更好地学习

大学第一学期,我同时修了 17 门课程,成绩并不理想,所以我使用了一种技巧:第一阶段:累积复习……