Learning · ML and LLM from scratch · Personal In development
Learning HQ
A 14-week LLM engineering curriculum, with visual labs that replay my from-scratch implementations.
01 — Overview
Learning HQ is a 14-week curriculum in LLM engineering that I wrote for myself, and the system that keeps it honest. Its rule is simple: build it from scratch first, then use the library. Twelve of the builds are done by hand — a raw-HTTP client for an LLM API, attention in NumPy, byte-pair encoding, a transformer block, word embeddings, BM25, vector search, reciprocal rank fusion, a tool loop, a ReAct agent, evaluation metrics.
02 — Why
Knowledge of frameworks ages quickly; fundamentals do not. I would rather be able to open a paper or a library’s source and understand what it does — and to know that, I need to have written it myself.
The objectives:
- Rebuild the core of modern NLP and LLM systems by hand, with tests.
- See each algorithm behave, not only pass.
- Track progress honestly: a task is done when its definition of done is met.
03 — What it contains
- A main track, 14 weeks, from tokenisation and attention to retrieval-augmented generation, context engineering and agent patterns, with Stanford’s CS224N assignments woven in.
- A classical machine-learning side track, a hundred days from the perceptron to support-vector machines — every algorithm twice: once from scratch, once with the library.
- Visual labs. Each algorithm is a player that replays, frame by frame, the states written by my own Python implementation, with a toggle to the library’s run for comparison.
- A dashboard that shows where I am, what comes next, and the definition of done for each task. Every study day ends as a commit.
04 — How it works
algorithms/<name>/<name>.pyholds the implementation, with the parts that are mine to write left empty.- Running it writes a state file, and
visualizers/<name>.htmlreplays that file on a canvas through a small shared engine. - Definitions of done are machine-checkable wherever possible: the lab itself is the first reviewer.
- The dashboard is a small Python server with no dependencies, and every piece of data stays on my machine.
05 — Engineering decisions
The lab is the first reviewer
A definition of done that a machine can check is worth more than a feeling of success. Labs verify behaviour — a decision boundary, a loss curve, states step by step — so an implementation that “almost works” is caught before I move on.
Mine next to the library’s
Every algorithm runs twice: my version and the library’s, on the same data, in the same player. Agreement to several decimal places is the test; a difference is a lesson.
Parts to write, not solutions
The files I am meant to write contain holes and docstrings, not answers. Hints come on request, as a ladder — never as finished code. AI reviews my work against the definition of done and asks one question back. It never writes the learning code.
06 — Status
Ongoing since October 2026. The classical machine-learning foundations are being redone; the main track is under way. It is a personal project and it is not published.
Technologies
- Python
- NumPy
- JavaScript
- Canvas
- Git