{"id":50432719,"url":"https://github.com/danielsobrado/machine-learning-visualized","last_synced_at":"2026-05-31T15:01:29.247Z","repository":{"id":326489175,"uuid":"1105738471","full_name":"danielsobrado/Machine-Learning-Visualized","owner":"danielsobrado","description":"Learn Machine learning by doing exercises and intuitive animations","archived":false,"fork":false,"pushed_at":"2026-05-26T05:38:39.000Z","size":58723,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T07:19:21.777Z","etag":null,"topics":["ai-agents","attention-mechanism","gradient-descent","hands-on-machine-learning","learning-by-doing","llms","lstm-neural-networks","matrix-multiplication","neural-networks","stable-diffusion","transformers","vae-implementation"],"latest_commit_sha":null,"homepage":"https://danielsobrado.github.io/Machine-Learning-Visualized/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielsobrado.png","metadata":{"files":{"readme":"README.md","changelog":"change-of-basis-animation/index.html","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-11-28T04:53:57.000Z","updated_at":"2026-05-26T05:37:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/danielsobrado/Machine-Learning-Visualized","commit_stats":null,"previous_names":["danielsobrado/ml-animations","danielsobrado/machine-learning-visualized"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielsobrado/Machine-Learning-Visualized","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsobrado%2FMachine-Learning-Visualized","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsobrado%2FMachine-Learning-Visualized/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsobrado%2FMachine-Learning-Visualized/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsobrado%2FMachine-Learning-Visualized/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielsobrado","download_url":"https://codeload.github.com/danielsobrado/Machine-Learning-Visualized/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsobrado%2FMachine-Learning-Visualized/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33735663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","attention-mechanism","gradient-descent","hands-on-machine-learning","learning-by-doing","llms","lstm-neural-networks","matrix-multiplication","neural-networks","stable-diffusion","transformers","vae-implementation"],"created_at":"2026-05-31T15:01:27.706Z","updated_at":"2026-05-31T15:01:29.238Z","avatar_url":"https://github.com/danielsobrado.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Machine Learning Visualized\n\nMachine Learning Visualized is an interactive curriculum for machine learning, deep learning, language models, retrieval, diffusion, reinforcement learning, and the math behind them.\n\nThe project started as a collection of standalone animations. It is now centered on a unified React app with guided paths, lesson metadata, quizzes, labs, glossary links, and local progress tracking.\n\n[Open the live site](https://danielsobrado.github.io/Machine-Learning-Visualized/)\n\n![Machine Learning Visualized home](screenshots/readme/home.png)\n\n## What is inside\n\n- A unified lesson browser with searchable topics and curriculum tracks.\n- Guided paths for fundamentals, experimentation and causal ML, LLMs, frontier LLMs and agentic systems, RAG, model reliability, vision and diffusion, and reinforcement learning.\n- Core ML lessons for splitting data, cross-validation, leakage, scaling, metrics, calibration, PCA, clustering, tree ensembles, and classical classifiers.\n- Model reliability lessons for debugging, interpretability, monitoring, fairness, and uncertainty estimation.\n- Experimentation and causal ML lessons for A/B testing foundations and power analysis, with planned modules for sequential testing, CUPED, confounding, DAGs, treatment effects, and propensity scores.\n- Transformer lessons for attention, masks, architecture families, training objectives, token generation, sampling, KV cache, Flash Attention, and fine-tuning.\n- Frontier LLM lessons for MoE at scale, MLA, Native Sparse Attention, RLVR/GRPO, test-time compute, long-context systems, omni multimodal models, diffusion language models, efficient serving, frontier evaluation/safety, tool-using reasoners, and agentic coding systems.\n- RAG lessons for chunking, vector indexing, reranking, grounding, retrieval evaluation, and failure modes.\n- Neural-network lessons for backpropagation, initialization, optimizers, dropout, batch normalization, and training-loop dynamics.\n- Diffusion lessons from beginner denoising intuition through sampling, classifier-free guidance, U-Net vs DiT, SD3, DiT, VAE, CLIP, T5, and flow matching.\n- Small from-scratch implementations in Rust, Go, Java, and Python for neural networks, diffusion, and Markov chains.\n\n## Current App\n\nThe unified app is in `unified-app/`.\n\n```bash\ncd unified-app\nnpm install\nnpm run dev\n```\n\nBuild and test:\n\n```bash\ncd unified-app\nnpm test\nnpm run audit:quality\nnpm run test:smoke\nnpm run build\n```\n\nThe app uses React, Vite, Tailwind CSS, Three.js, GSAP, and Recharts.\n\n## Screenshots\n\n### Core ML Lesson\n\n![Core ML lesson](screenshots/readme/core-ml.png)\n\n### LLM Generation Lesson\n\n![Token generation lesson](screenshots/readme/llm-generation.png)\n\n### Frontier LLM Architecture\n\n![Frontier LLM architecture lesson](screenshots/readme/frontier-llm-architecture.png)\n\n### Reasoning RLVR / GRPO\n\n![Reasoning RLVR and GRPO lesson](screenshots/readme/reasoning-rlvr-grpo.png)\n\n### Efficient LLM Serving\n\n![Efficient LLM serving lesson](screenshots/readme/efficient-llm-serving.png)\n\n### Frontier Evaluation and Safety\n\n![Frontier evaluation and safety lesson](screenshots/readme/frontier-evaluation-safety.png)\n\n### Diffusion Basics Lesson\n\n![Diffusion basics lesson](screenshots/readme/diffusion-basics.png)\n\n## Curriculum Areas\n\n### Foundations\n\nThe foundations track covers linear algebra, probability, statistics, optimization, and the core supervised-learning workflow. Lessons include matrix multiplication, linear regression, train/validation/test splits, gradient descent, PCA, k-means, overfitting, regularization, calibration, ROC and precision-recall curves, and bias-variance tradeoffs.\n\n### Natural Language Processing and Transformers\n\nThe NLP and transformer track starts with bag-of-words, tokenization, and embeddings, then moves into attention, self-attention, masks, positional encoding, RoPE, transformer architectures, LLM training objectives, token generation, sampling, KV cache, Flash Attention, Native Sparse Attention, and fine-tuning.\n\n### Frontier LLMs and Agentic Systems\n\nThe frontier path covers modern architecture and systems topics: dense vs MoE models, MLA, Native Sparse Attention, attention compression, reasoning models, RLVR/GRPO, test-time compute, tool-using reasoning, agentic coding, long-context systems, omni multimodal models, diffusion language models, efficient LLM serving, and frontier evaluation/safety.\n\n### RAG\n\nThe retrieval track covers the RAG pipeline as a system: chunking, embedding search, vector indexing, reranking, context packing, grounding, retrieval metrics, and failure modes.\n\n### Model Reliability\n\nThe model reliability track covers post-training and deployed-system concerns: debugging failures, interpreting model behavior, estimating uncertainty, monitoring drift and regressions, and evaluating fairness tradeoffs across slices and groups.\n\n### Experimentation and Causal ML\n\nThe experimentation track connects hypothesis testing, confidence intervals, metrics, calibration, leakage, fairness, monitoring, and uncertainty to causal decision-making. Active lessons now cover A/B testing foundations, power and sample size, sequential testing and peeking, CUPED variance reduction, confounding and Simpson's paradox, causal graphs and DAGs, treatment effects, and propensity scores.\n\nThe next-priority applied ML pillars are also active as overview lessons: time series and forecasting, recommender systems and ranking, ML security and robustness, efficient inference and compression, and data engineering for ML.\n\n### Vision and Diffusion\n\nThe diffusion track starts with basic denoising and sampling before moving into classifier-free guidance, U-Net vs DiT, latent VAEs, CLIP, T5, SD3, DiT, joint attention, and flow matching.\n\n### Reinforcement Learning\n\nThe RL track covers agents, rewards, discounted returns, MDPs, value iteration, policy iteration, Q-learning, exploration, policy gradients, actor-critic methods, and reward shaping.\n\n## Standalone Implementations\n\nThe repository also includes compact implementations meant for reading and experimentation:\n\n- `mini-nn/`, `mini-nn-go/`, `mini-nn-java/`, `mini-nn-python/`\n- `mini-diffusion/`, `mini-diffusion-go/`, `mini-diffusion-java/`, `mini-diffusion-python/`\n- `mini-markov/`, `mini-markov-go/`, `mini-markov-java/`, `mini-markov-python/`\n- `mini-eagle/` Rustlings-style exercises for EAGLE 3.1 speculative decoding\n- `mini-spec-sparse/` Rustlings-style exercises for SpecSA / SpecAttn sparse speculative decoding\n- `mini-turboquant/` Rustlings-style exercises for TurboQuant KV-cache quantization\n\nEach directory has its own README with setup notes and examples.\n\n## Publishing\n\nGitHub Pages is published manually from this machine. The deploy script builds the unified app and pushes the generated site to the `gh-pages` branch.\n\n```bash\nnode scripts/deploy-github-pages.mjs\n```\n\nThe script also publishes static `*-animation/index.html` entry pages with route-specific metadata, so older animation URLs and crawlers land on the current unified lessons.\n\n## Repository Layout\n\n```text\nunified-app/                 Unified React app\nscreenshots/readme/          Current README screenshots\nscripts/                     Local maintenance and deploy scripts\n*-animation/                 Static lesson entry pages and legacy standalone lessons\nmini-nn*/                    Small neural-network implementations\nmini-diffusion*/             Small diffusion implementations\nmini-markov*/                Small Markov-chain implementations\nmini-eagle/                  Speculative decoding exercises with TODO-driven Rust tests\nmini-spec-sparse/            Sparse speculative decoding exercises with TODO-driven Rust tests\nmini-turboquant/             KV-cache quantization exercises with TODO-driven Rust tests\n```\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielsobrado%2Fmachine-learning-visualized","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielsobrado%2Fmachine-learning-visualized","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielsobrado%2Fmachine-learning-visualized/lists"}