Skip to content

About

Interactive AI explainer hosted on gh pages

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

AI Explained

Big models. Tiny aha moments. Six interactive learning paths through AI, with small experiments, welcoming explanations, and the evidence close at hand.

The homepage offers a starting point for newcomers and still includes the original reasoning tour. Every track keeps its scrolling scenes and interactive workbench. The site is an independent exploration by Christopher Smothers.

Path What you can explore
/how-models-learn Neurons, loss, gradients, backpropagation, and genuinely trainable tiny networks.
/chat-llm Tokens, representations, attention, sampling, and post-training.
/reasoning-llm Intermediate tokens, inference-time computation, training, and reasoning faithfulness.
/image-diffusion A Stable Diffusion-style path from noisy latent representations to pixels.
/moe-llm Sparse expert routing, active versus total parameters, and balancing tradeoffs.
/inside-the-black-box Toy superposition, induction circuits, intermediate decoding, and feature steering.

These are learning paths, not a claim that all modern products use one architecture. “Thinking” describes computational behavior here, not human-like experience.

Develop and verify

Use Node.js 22.12 or newer (validated with 22.23.1) and npm.

npm ci
npm run dev          # http://localhost:4321/ai-explained/
npm run validate     # Astro + numerical tests + production build + static audit
npm run preview     # serve the production build locally

npm run test:tinynet checks deterministic initialization, finite-difference backpropagation gradients, training convergence, finite values, and the loss bowl. npm run check:static requires a build and verifies every track and scene, JavaScript-free chapter links, local links/assets/anchors, unique IDs, one H1 per page, and canonical URLs. These checks complement browser/keyboard review; they do not replace it.

The tokenizer currently produces a roughly 1.9 MB minified vocabulary bundle and Vite reports a chunk-size warning. It hydrates when its scene becomes visible. No new dependency or remote font was added for the field-guide refresh.

Architecture

Astro, MDX content collections, React islands, Tailwind CSS 4, and Scrollama. Most interactive islands hydrate with client:visible; the chapter rail hydrates on load and retains real anchor links without JavaScript. All narration is static HTML. Reduced-motion preferences disable smooth scrolling and are respected by the animated experiments.

flowchart LR
  Guide[Welcome + track guide] --> Track[Track JSON]
  Track --> Scene[Reusable scene MDX]
  Scene --> Narration[Static narration + primary sources]
  Scene --> Island[Interactive React island]
  Island --> Provenance[Live arithmetic / illustration / optional model]
Loading
src/content/tracks/*.json    ordered paths and highlighted scenes
src/content/scenes/*.mdx     scene narratives and island references
src/data/guide.ts            entrances, learning boundaries, source/provenance labels
src/components/Welcome.astro homepage entrance and six-path directory
src/components/TrackView.astro shared route renderer
src/components/islands/      34 registered interactive panels
src/data/                   authored example values and small datasets

To add a track, create its JSON path, author any new scene MDX, add the new track entry in src/data/guide.ts, and set its ordering/family for the existing tab navigation. New islands must be registered in registry.ts and SceneGraphic.astro. Add appropriate source/provenance notes and run the complete validation command. Shared scenes remain reusable across paths.

What the demos are doing

  • Tokenization, probability math, tiny-network training, gradients, and toy superposition run locally. The sampling demo starts from authored logits.
  • Attention matrices, embedding coordinates, diffusion pictures, logit-lens values, steering completions, and scaling curves are teaching illustrations. They are not fresh measurements, benchmarks, or hidden model transcripts.
  • scripts/precompute.mjs is an optional research helper. The committed example data is curated; running the helper is not required to build the site. If you replace it with measured values, record the model, prompt, settings, and method and update the visible provenance to match.
  • Optional GPT-2 inference downloads a runtime and model files after an explicit click, then processes prompts locally. Downloads contact external hosts. The Neuronpedia dashboard is also loaded only on request. There are no accounts or analytics and ordinary controls do not send or persist inputs.

The source links beside scenes and in the narration are the trail back to the research. See the completed field-guide audit for sources, corrections, verification, and limits. Earlier design explorations remain in docs/explorations/.

Deploy

Pushing to main triggers GitHub Pages deployment. The default site is https://crs48.github.io, with base /ai-explained. For a custom domain or root deployment, set SITE_URL and BASE_PATH in the build environment. Settings → Pages must use GitHub Actions.

License

MIT. Existing contributor notices are preserved.

About

Interactive AI explainer hosted on gh pages

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages