# ai-learnings

A structured, opinionated learning journal documenting one backend engineer's journey into AI / ML / LLM engineering — built in the open as both a study log and a working portfolio.

The polished, visual version of this is hosted at **[pratiksethi.dev/ai-learnings](https://pratiksethi.dev/ai-learnings/)**. This README is the source-of-truth for the GitHub repo.

## Motivation

I want to learn the systems and tools that are reshaping both what I work on and how I work.

I respect the craft of software engineering deeply. I have mixed feelings about AI writing so much of the code these days — but I've come to think the power has never really been in the code itself, it's in the problems the code lets you solve. I still find joy in writing code the way people find joy in handmade paintings. Both can be true. And I'm bullish that AI is here to transform the way we work — closer in scope to the internet or the smartphone than to any single library or framework. It's hard to imagine modern life without those; AI is on a similar trajectory.

This isn't a new interest for me. I've been curious about AI/ML for over a decade — in undergrad (2015–16) I built an Auto Image Captioning project inspired by Karpathy's NeuralTalk2, well before transformers were the default answer. What's pulled me back now is the intersection: I love deep systems work, and *distributed systems + ML* is the spot I most want to be in. Inference internals, KV cache, paged attention, distributed serving, kernels — all of it sits exactly where my systems intuition meets a discipline I haven't worked in professionally. Closing that gap is the goal.

If I weren't a software engineer, I'd want to teach. I believe in perpetual learning, and writing is how I think clearly — so this repo is built first and foremost for me, as a study log I can reference from anywhere (yes, including my phone). If it helps anyone else on a similar path, that's a bonus.

This is built in public. Each note is a step in *actually understanding* a thing — not bookmarking it.

## Where I'm starting from

A snapshot in **early 2026** — partly so readers can calibrate, mostly so future-me can see how far this has come.

**Background**
- Backend / distributed-systems engineer with ~10 years of experience.
- Strong in Java, Python, caching infrastructure, and distributed systems.
- Took AI, ML, and NLP coursework in undergrad and grad school. Built an Auto Image Captioning project in 2015–16 inspired by Karpathy's NeuralTalk2. Most of the formal ML content has rusted since.

**What I'm bringing in**
- Comfortable with **Python and Jupyter**.
- Strong **systems intuition**: caching, batching, throughput vs. latency, queueing. This is the leverage I'm trying to apply.
- Working knowledge of **agents, MCP, and coding agents** from using them daily in my own workflow.

**What I need to rebuild**
- Math (linear algebra, calculus, probability) and ML terminology — both rusty. Refreshing on demand, not bootcamp-style.
- Some ML basics (supervised learning, gradient descent, loss functions) I can follow at a high level but want to rebuild from first principles.
- **No prior PyTorch or JAX** experience — picking up PyTorch through Karpathy's *Zero to Hero*.

### Intuition before math

Math notation is compressed intuition. If you read the notation before you have the intuition, it stays as squiggles. I'm building the picture first; the math becomes a faster way to talk about what I already understand.

When I'm ready for math foundations → [`prereqs/`](./prereqs/).

## The path I'm following

Roughly four phases. Adjust as the work tells me to.

1. **Intuition** — 3Blue1Brown, Karpathy *Zero to Hero* (early lectures), distill.pub. Build a mental model before reaching for notation.
2. **Build from scratch** — micrograd, makemore, GPT from scratch. Hand-rolled backprop. No frameworks until I've earned the right to use them.
3. **Go deeper into inference** — vLLM internals, KV cache, paged attention, disaggregated serving, production RAG, MCP. The phase where my systems background pays off most.
4. **Research literacy** — read papers, implement one (FlashAttention-style is the target), write CUDA/Triton kernels, contribute to vLLM or Ray.

### Intuition-first resources I'm pulling from

- **3Blue1Brown — Neural Networks** — canonical visual intuition.
- **Andrej Karpathy — Zero to Hero** — best use of time once past the basics.
- **distill.pub** — interactive, beautifully written explanations.

## Repo layout

| Folder | What's there |
|---|---|
| [`prereqs/`](./prereqs/) | Linear algebra, calculus, tensors — refreshed on demand. |
| [`foundations/`](./foundations/) | Backprop, training loop, transformers, PyTorch, hyperparameters. |
| [`courses/`](./courses/) | Walkthroughs of guided curricula (Karpathy, deeplearning.ai, etc.). |
| [`papers/`](./papers/) | Reading list and per-paper notes. |
| [`topics/`](./topics/) | Deep dives by area — inference, agents, RAG, kernels, training. |
| [`projects/`](./projects/) | `ideas/` (drafts) and `builds/` (actual implementations). |
| [`workflow/`](./workflow/) | How I work — Claude Code notes and similar. |

Visualizations live in `viz/` directories as standalone HTML files added topic-by-topic. The published site at [pratiksethi.dev/ai-learnings](https://pratiksethi.dev/ai-learnings/) is the visual front-door; this repo is the source.

## Tooling

I'm building this with [Claude Code](https://claude.com/claude-code) as my primary AI coding tool. Notes on the workflow live in [`workflow/`](./workflow/).
