Commit Graph
1633 Commits
Author SHA1 Message Date
Rohit Ghumare 8a311cc17d feat(site): 39 more interactive figures — wave 3 across thin phases
Extends the figure system into the phases that were still sparse: LLM
engineering, multimodal, agents depth, alignment, plus vision/speech/genai
remainders. Five new module files (1,959 LOC) on the shared LF toolkit:

- figures-llmeng.js (P11/P13, 8): few-shot curve, chain-of-thought, constrained
  decoding, prompt-cache hit, semantic cache, function-call args, LLM-judge
  rubric, lost-in-the-middle
- figures-multimodal.js (P12, 7): contrastive matrix, cross-attention fusion,
  modality projection, CFG guidance scale, VQ codebook, video patches, CTC align
- figures-agents2.js (P14/P16, 8): ReWOO plan, tree-of-thoughts, self-refine,
  memory blocks, Voyager skills, LangGraph state, orchestration patterns, debate
- figures-alignment2.js (P9/P18, 8): PPO clip, reward model, constitutional AI,
  actor-critic, interpretability probe, SAE features, jailbreak defense,
  scalable oversight
- figures-foundations2.js (P4/P6/P8, 8): augmentation, transfer learning, BN
  train/eval, CTC collapse, MFCC pipeline, autoencoder bottleneck, normalizing
  flow, score matching

Embedded in 39 figure-free lessons. Validated headless: all 173 registered
figures (16 core + 157 module) mount with zero console errors; PPO clip,
CLIP contrastive matrix, and tree-of-thoughts verified in light and dark.
2026-06-10 23:56:21 +01:00
github-actions[bot] 148de3663f chore(site): rebuild data.js 2026-06-10 18:36:17 +00:00
Rohit Ghumare cb55ea0cc6 feat(site): curriculum-wide interactive figure system (134 widgets, 13 modules) (#279)
* feat(site): interactive training-foundations figures in 5 lessons

Add five theme-aware interactive widgets to lesson-figures.js, embedded
via the existing ```figure fence:

- gradient-descent (P1.08 optimization): drag learning rate, watch the
  descent path converge or diverge past lr > 1
- softmax-temperature (P3.04 activations): divide logits by T, reshape
  the distribution from argmax to uniform
- bias-variance (P2.10): slide model complexity across the U-shaped
  test-error curve, see the sweet spot move
- l2-regularization (P3.07): raise lambda, watch every weight shrink
- lr-schedule (P3.09): compare warmup, cosine, step, exponential decay

Validated headless: all five mount with no console errors, sliders and
selects drive re-render, both light and dark themes render correctly.

* feat(site): interactive LLM-internals figures in 5 lessons

Batch 2, building on the same widget system:

- sampling-decoder (P10.04 mini-gpt): temperature then top-k then top-p
  filtering over the logits, survivors renormalized
- scaling-laws (P7.13): Chinchilla loss from params and tokens, with the
  20-tokens-per-parameter compute-optimal rule
- quantization (P10.11): bits per weight against model size and the
  precision lost at fp16/int8/int4/int2
- rope-explorer (P7.04): rotary frequencies across position and dimension,
  base controls wavelength and usable context
- lora-params (P11.08): rank against the 2r/d trainable fraction

Validated headless: all five mount with no console errors, sliders and
selects drive re-render, both light and dark render correctly.

* feat(site): interactive evaluation and representation figures in 5 lessons

Batch 3, same widget system:

- precision-recall-threshold (P2.09 model-evaluation): slide the cutoff
  across two class distributions, watch precision/recall/F1 trade
- cross-entropy-loss (P3.05 loss-functions): -log(p_true), the price of
  being confident and wrong
- cosine-similarity (P11.04 embeddings): the angle between two vectors is
  the similarity, magnitude drops out
- tokenizer-tradeoff (P10.01 tokenizers): vocab size against tokens-per-word
  and the embedding table cost
- rag-chunking (P11.06 rag): chunk size, overlap, and top-k against chunk
  count and context tokens per query

Validated headless: all five mount with no console errors, math checks out
(thr 0.8 -> P 1.00/R 0.11, -ln(0.05)=2.996, cos 90 deg = 0, 224 chunks),
sliders drive re-render, both light and dark render correctly.

* feat(site): interactive figure system — 74 new widgets across 11 phases

Expand the lesson-figure system from a handful of widgets into a curriculum-wide
library. Refactor lesson-figures.js to expose a shared LF toolkit (el, svgEl,
slider, select, fmtInt, clamp, lerp, raf, register) and split widgets into eight
per-phase module files that plug in via LF.register.

New module files (3,682 LOC) and the concepts they make draggable:
- figures-math.js (P1, 11): vector projection, matrix transform + determinant,
  eigenvectors, derivative tangent, chain rule, gaussian, bayes update,
  entropy/KL, PCA axes, fourier synthesis, convex vs nonconvex
- figures-ml.js (P2, 10): regression fit/MSE, logistic boundary, SVM margin,
  kNN smoothness, k-means steps, tree depth, feature scaling, naive bayes,
  class imbalance, k-fold CV
- figures-dl.js (P3, 9): perceptron boundary, MLP forward pass, vanishing
  gradients, optimizer trajectories, weight-init variance, dropout, batchnorm,
  learning curves, gradient clipping
- figures-vision-speech.js (P4/P6, 8): convolution kernel, pooling, receptive
  field, conv output size, CNN params, spectrogram window, mel scale, aliasing
- figures-transformers.js (P5/P7, 9): attention heatmap, multihead split, causal
  mask, sqrt(d_k) scaling, word2vec arithmetic, BPE merges, GQA sharing,
  residual stream, flash-attention memory
- figures-genai-rl.js (P8/P9, 9): diffusion denoise, noise schedule, VAE latent,
  GAN minimax, Q-learning gridworld, value iteration, epsilon-greedy, discount
  horizon, policy-gradient ascent
- figures-llms-systems.js (P10/P12/P13, 9): beam search, speculative decoding,
  MoE routing, context window, perplexity, continuous batching, ViT patches,
  multimodal fusion, MCP round trip
- figures-agents-alignment.js (P11/P14/P16/P18, 9): agent loop, ReAct trace,
  tool routing, swarm message scaling, supervisor tree, RLHF reward-KL,
  DPO margin, context budget, guardrail gates

Each widget embedded in its lesson via the figure fence (74 lessons). All
theme-aware through CSS vars, vanilla ES5, no dependencies.

Validated headless: all 90 registered figures (16 prior + 74) mount with zero
console errors in a master harness; rich SVG visualizations (attention heatmap,
gridworld policy, convolution feature map, swarm graphs) render correctly in
both light and dark.

* feat(site): 44 more interactive figures — NLP, LLM internals, infra, autonomy

Wave 2 extends the figure system into the phases that were still bare,
plus deeper coverage of the large NLP and LLM phases. Five new module
files (2,219 LOC), each plugging into the shared LF toolkit:

- figures-math2.js (P1, 9): SVD low-rank reconstruction, tensor broadcasting,
  log-sum-exp stability, Lp unit balls, monte-carlo pi, system conditioning,
  random-walk diffusion, roots of unity, graph degree
- figures-nlp2.js (P5, 8): BoW/TF-IDF, RNN unroll, LSTM gates, seq2seq
  alignment, edit distance, n-gram backoff, BIO tagging, sentiment logits
- figures-llms2.js (P10, 9): RMSNorm vs LayerNorm, SwiGLU, RLHF pipeline,
  DPO loss, paged KV cache, expert capacity, sliding-window attention,
  differential attention, weight tying
- figures-infra.js (P17, 9): data/tensor/pipeline parallelism, ZeRO sharding,
  GPU memory breakdown, throughput-latency, autoscaling, cost-per-token,
  roofline
- figures-frontier.js (P15/P19, 9): task decomposition, reflection loop,
  memory consolidation, world-model rollout, autonomy oversight, pass@k,
  eval-harness matrix, canary rollout, trace spans

Embedded in 44 lessons via the figure fence. Validated headless: all 134
registered figures (16 core + 118 module) mount with zero console errors in
a full harness; pipeline-bubble, SVD energy, and trace-span visualizations
render correctly in light and dark.

* fix(site): address review findings on figure widgets

- sampling-decoder: formula now reads 'cumulative >= p' (nucleus keeps the
  smallest set covering p, matching the implementation)
- supervisor-hierarchy: drop the dead capped-total accumulator; show the exact
  geometric total and note when the diagram caps a level at 64 so the number
  and the drawn nodes stay consistent; handle b=1 (total = depth + 1) instead
  of the closed form that is undefined at b=1
- image-patch-tokens: use ceil(size/patch) so non-divisible sizes count the
  partial patch row; formula shows the ceil and meta notes the padded size
- debugging-neural-networks: normalize the one-off Type 'Practice' to 'Build'

Verified in browser: all three widgets render with the corrected text/math,
no console errors.

Skipped: the 'figure fence is not an approved language tag' findings. lesson.html
keys on codeLang === 'figure' to emit the widget mount point; the fence body is
the figure id. Renaming the fence to the figure id would stop it rendering.
There is no fence-language allowlist for these lesson docs.
2026-06-10 19:35:56 +01:00
Rohit Ghumare b963cf63ff fix(site): About page dark mode + header overlap (#275)
About page shipped without the inline theme bootstrap every other page
has, so the theme toggle was dead and the page was stuck on light. Add
the same localStorage/matchMedia bootstrap + toggle wiring.

It also cleared the 64px fixed header with only 64px top padding, so the
eyebrow tucked under the header. Bump .about top padding to 100px (80px
mobile) to match the glossary page.
2026-06-08 11:09:10 +01:00
github-actions[bot] d552c62fa3 chore(site): rebuild data.js 2026-06-08 09:11:46 +00:00
Rohit Ghumare b749aab1b4 docs(phase-14): close three harness-engineering gaps in Agent Workbench (#274)
Close three harness-engineering gaps in the Agent Workbench mini-track:
- 33 (Instructions): progressive disclosure — thin AGENTS.md router + tiered docs
- 36 (Scope Contracts): feature_list.json as the project-level scope primitive
- 40 (Handoff): leave a clean state — cleanup phase before the handoff packet
2026-06-08 10:11:26 +01:00
Rohit Ghumare 0b2b7292e1 feat(site): add About page (#270)
* feat(site): add About page + nav/footer links + /about rewrite

* fix(site): add command palette trigger to About page header

About page loaded cmdpalette.js but had no [data-cmd-palette] trigger,
unlike the other five pages. Insert the same search-toggle button
between </nav> and the theme toggle so Cmd-K and click both work.
2026-06-08 00:09:28 +01:00
Rohit Ghumare 95292efdfb fix(figures): keep transformer-block labels inside their boxes (#269) 2026-06-07 12:18:31 +01:00
github-actions[bot] 6db6f19c19 chore(site): rebuild data.js 2026-06-07 10:39:12 +00:00
Rohit Ghumare 4a7c1240a9 feat(site): SEO/AEO foundation - sitemap, llms.txt, JSON-LD, canonical (#267)
* feat(site): SEO/AEO foundation: sitemap, llms.txt, JSON-LD, canonical

* chore(site): stop tracking generated sitemap.xml + llms.txt (build-time only)
2026-06-07 11:38:50 +01:00
github-actions[bot] 2babca5ea7 chore(site): rebuild data.js 2026-06-07 09:58:56 +00:00
Rohit Ghumare 533fe6be8d feat(site): interactive lesson figures + KV-cache sizer (#265)
* feat(site): interactive lesson figures + KV-cache sizer

Adds an in-lesson interactive figure layer. Authors drop a fenced block in
docs/en.md:

    ```figure
    kv-cache
    ```

which the lesson renderer hydrates into a real widget (sliders, live output),
theme-aware via the site's CSS vars. First widget: a KV-cache sizer — drag
sequence length, batch, layers, kv-heads, head-dim, dtype and watch the cache
size cross a single GPU's memory. Wired into 07/12 (KV cache & FlashAttention).

Mechanism: `figure` fenced block -> <div class="lesson-figure" data-figure>,
mounted by lesson-figures.js after render. No deps; figures live in lessons,
not on the homepage. Validated interactivity + light/dark parity.

* feat(site): animated figures in lesson content + delegate from fenced block

The fenced ```figure``` block now mounts both interactive widgets (defined in
lesson-figures.js) and the animated SVG explainers (figures.js), via one
syntax. Embeds animated figures directly in lesson bodies:

- attention-matrix  -> 07/02 self-attention
- transformer-block -> 07/05 full transformer
- tokenizer-bpe     -> 10/01 tokenizers
- kv-cache-sizer    -> 07/12 (interactive sliders)

Animated figures render live in normal browsers and fall back to a clean
static frame under prefers-reduced-motion. Validated all four mount via the
lesson path; light/dark parity.

* docs(07/02): replace ASCII pipeline with mermaid flowchart
2026-06-07 10:58:35 +01:00
github-actions[bot] a205d33dbb chore(site): rebuild data.js 2026-06-07 08:44:39 +00:00
GovInd 75c22ab412 fix(data-management): update canonical hugging face dataset paths and configs (#180)
* fix: update dataset path for Rotten Tomatoes in load_and_inspect and stream_dataset functions

* fix: improve formatting of dataset split print statements

* fix: update Hugging Face IDs for dataset recommendations in prompt-data-helper

* fix: update Hugging Face IDs and configurations in dataset recommendations
2026-06-07 09:44:18 +01:00
github-actions[bot] 9b7612331d chore(site): rebuild data.js 2026-06-07 00:22:23 +00:00
Rohit Ghumare afcc4a6bf2 Merge pull request #263 from rohitg00/readme-traffic-stats-v2
docs(readme): 30-day traffic proof, single-source + self-healing
2026-06-07 01:22:06 +01:00
Rohit Ghumare d5f26c1010 docs(readme): refresh traffic stats to 2026-06-07 (150.6K/241.7K) 2026-06-07 01:17:34 +01:00
Rohit Ghumare a6cd747ad8 chore(site): rebuild data.js 2026-06-07 01:04:38 +01:00
Rohit Ghumare b87a15a5fd fix(build): sync lessons badge alt text too (CodeRabbit #256) 2026-06-07 00:59:22 +01:00
Rohit Ghumare fba601c913 fix(build): make syncReadme self-healing and surface stats errors
CodeRabbit on #256:
- Insert-or-replace the README STATS block: if the markers are missing or
  mangled, re-insert before "## How this works" instead of silently doing
  nothing, so the README can't drift from site/stats.json.
- Replace the empty catch with a console.warn so a malformed stats.json is
  visible. Kept it a warning, not a CI hard-fail: bad analytics JSON should
  not break the whole site build.
2026-06-07 00:59:22 +01:00
Rohit Ghumare c05e1f9238 docs(readme): add 30-day traffic proof, sourced from site/stats.json
145,598 readers and 234,496 page views (last 30 days) now show under the
hero. The numbers live in a single source (site/stats.json) and build.js
regenerates the README block on each build; it also keeps the lessons
badge in sync with the live count. Vercel has no analytics API, so refresh
stats.json from the dashboard and re-run build to propagate.
2026-06-07 00:59:22 +01:00
github-actions[bot] 33433b8524 chore(site): rebuild data.js 2026-06-06 09:46:16 +00:00
Rohit Ghumare c0d320da4c Update README.md 2026-06-06 10:45:58 +01:00
github-actions[bot] 44b9b14e4c chore(site): rebuild data.js 2026-06-03 00:12:37 +00:00
Rohit Ghumare a2f95e0cf4 Merge pull request #247 from rohitg00/site-count-sync
fix(site): sync hardcoded curriculum counts to live total (473 → 503)
2026-06-03 01:12:18 +01:00
Rohit Ghumare 7e151e5fb4 fix(site): sync hardcoded curriculum counts to live total (473 -> 503)
PR #246 indexed 35 lessons (468 -> 503) but the marketing counts stayed
hardcoded: index/catalog/lesson/prereqs HTML and the command palette still
showed 473/435 lessons and 489 outputs, so the live site read stale.

build.js now rewrites every "<n> lessons / phases / outputs" string to the
count it computes, so these never drift again. Synced all pages to
503 lessons, 20 phases, 499 outputs.
2026-06-03 01:11:31 +01:00
github-actions[bot] 825ba2ba8e chore(site): rebuild data.js 2026-06-03 00:01:45 +00:00
Rohit Ghumare a4fd73bc8a Merge pull request #246 from rohitg00/index-merged-lessons
docs(site): index merged-but-unlisted lessons (468 → 503)
2026-06-03 01:01:21 +01:00
Rohit Ghumare a4accf6cc5 docs(site): index merged-but-unlisted lessons so they render on the site
35 completed lessons were merged to main but never wired into the site
source (README), so the catalog and lesson pages could not reach them.

- Phase 19 capstones 58-87 added to README (tracks E. Multimodal VLM,
  F. Advanced RAG, G. Eval framework, H. Distributed train, I. Safety
  harness); the phase-19 summary now reads 85 lessons / 9 deep-build tracks
- Phase 19 capstones 20-87 added to ROADMAP (it only listed 01-17)
- 5 cross-phase orphans wired into README + ROADMAP:
  07/15 attention-variants, 07/16 speculative-decoding,
  08/19 visual-autoregressive-var, 10/25 speculative-decoding,
  10/34 gradient-checkpointing
- Corrected stale counts; rebuilt site/data.js (468 -> 503 lessons)
2026-06-03 01:00:33 +01:00
github-actions[bot] e659b4d41e chore(site): rebuild data.js 2026-06-02 23:31:43 +00:00
Rohit Ghumare a5285f6d78 Merge pull request #245 from rohitg00/site-fix-tables-diagrams
fix(site): table pipe rendering + theme-safe mermaid diagrams
2026-06-03 00:31:23 +01:00
Rohit Ghumare d571df8a7a fix(site): repair table pipe rendering and theme-safe mermaid diagrams
Tables (closes #193):
- Parse table rows with an escape/code-aware splitter so escaped pipes
  (P(X\|Y)) and pipes inside inline-code spans no longer shatter cells
- Normalize each row to the header column count
- Split markdown on /\r?\n/ so CRLF docs do not leak a trailing \r

Diagrams (closes #233):
- Replace the non-rendering block-beta protocol landscape in
  phase 16/03 with a standard flowchart, and convert the stateDiagram
  note from literal \n to block-note syntax
- Add a hue-preserving HSL fill transform to the mermaid renderer:
  in dark mode light fills are darkened, in light mode dark fills are
  lightened, so hard-coded node colors stay legible in both themes
2026-06-03 00:26:03 +01:00
github-actions[bot] e4f2f8bf0a chore(site): rebuild data.js 2026-06-02 23:00:43 +00:00
Rohit Ghumare d1e000f5c8 Merge pull request #244 from rohitg00/lesson18-mcp-auth-spec-update
docs(mcp-auth): update lesson 18 to MCP 2025-11-25 authorization spec
2026-06-03 00:00:19 +01:00
Rohit Ghumare 7be1e78b17 refactor(mcp-auth): harden lesson 18 validator and client checks
- Check the issuer allow-list before any JWKS lookup/refresh so an
  untrusted iss returns "iss not allowed" and never triggers a refresh
- Map each tool to its required scope; destructive notes.delete now needs
  mcp:tools.delete (outside the minimal scopes_supported), so the step-up
  bonus actually demonstrates an incremental scope gate
- Replace asserts in Client.discover/register with explicit ValueErrors so
  the contract checks survive python -O
2026-06-02 23:59:34 +01:00
Rohit Ghumare 88ae6033fd docs(mcp-auth): update lesson 18 to the MCP 2025-11-25 authorization spec
- Add Client ID Metadata Documents (CIMD) as the recommended default
  enrollment path; reframe Dynamic Client Registration as a backwards-
  compatible fallback (spec demoted DCR from SHOULD to MAY)
- Fix JWKS handling: separate authorization-server key rotation from
  resource-server cache refresh. The cache-miss fallback now re-fetches
  (idempotent) instead of minting a key, closing an attacker-controlled
  key-creation DoS and a logic bug where the minted kid never matched
- Emit resource_metadata in WWW-Authenticate per RFC 9728 5.1
- Correct canonical resource URI guidance (path may be retained when it
  identifies an individual server)
- Add RFC 9207 iss / mix-up attack coverage; distinguish audience replay
  (access-token privilege restriction) from the confused-deputy problem
- Refresh IdP capability matrix, key terms, exercises, further reading
- Rewrite code/main.py and the skill output to match

Regenerate site/data.js.
2026-06-02 23:46:33 +01:00
github-actions[bot] cf8ca3f56b chore(site): rebuild data.js 2026-06-02 16:30:48 +00:00
github-actions[bot] faaa07dd30 chore(readme): sync counts 2026-06-02 16:30:34 +00:00
Rohit Ghumare 7cf6217b6b Merge pull request #212 from rohitg00/feat/phase-19-track-i
feat(phase-19): track I safety red-team lessons 82-87
2026-06-02 17:30:19 +01:00
github-actions[bot] e7910a445d chore(site): rebuild data.js 2026-06-02 16:26:19 +00:00
github-actions[bot] 1ac33e39dd chore(readme): sync counts 2026-06-02 16:26:08 +00:00
github-actions[bot] 7d4e8ff691 chore(site): rebuild data.js 2026-06-02 16:25:57 +00:00
Rohit Ghumare b27839962f Merge pull request #215 from rohitg00/feat/phase-19-track-h
feat(phase-19): track H distributed training lessons 76-81
2026-06-02 17:25:53 +01:00
github-actions[bot] c7e5bdf40d chore(readme): sync counts 2026-06-02 16:25:48 +00:00
Rohit Ghumare d7ba77d75f Merge pull request #210 from rohitg00/feat/phase-19-track-g
feat(phase-19): track G eval harness lessons 70-75
2026-06-02 17:25:32 +01:00
github-actions[bot] 98229d8b21 chore(site): rebuild data.js 2026-06-01 16:14:01 +00:00
github-actions[bot] 69a27a2e6c chore(readme): sync counts 2026-06-01 16:13:51 +00:00
Rohit Ghumare 40d4c76ad5 Merge pull request #213 from rohitg00/feat/phase-19-track-f
feat(phase-19): track F production RAG lessons 64-69
2026-06-01 17:13:34 +01:00
github-actions[bot] eec3a48dac chore(site): rebuild data.js 2026-06-01 16:04:45 +00:00
github-actions[bot] 08858fbb2a chore(readme): sync counts 2026-06-01 16:04:33 +00:00