AI / ML
Exploring the frontiers of artificial intelligence and machine learning.
Neural Cellular Automata (NCA) in WebGL2: Self-Healing Morphogenesis on the GPU
Bridging Gray-Scott reaction-diffusion with deep learning: Sobel perception stencils, asynchronous stochastic updates, pool-based BPTT in PyTorch, and a live 60 FPS WebGL2 ping-pong FBO simulator.
12 min readZero-Bubble Pipeline Parallelism & DualPipe: Overlapping All-to-All with Compute at 671B Scale
How Zero-Bubble B/W backward splitting and DeepSeek-V3's bidirectional DualPipe hide cross-node MoE All-to-All communication and crush pipeline bubbles.
11 min readWorld Models & Video DiTs: 3D Causal VAEs, Spatiotemporal RoPE & Action-Conditioned Rollouts
From 2D Flow Matching to interactive World Models: 3D Causal VAE temporal padding, factorized 3D RoPE, Diffusion Forcing per-frame noise schedules, and fighting autoregressive drift.
12 min readFrom Features to Circuits: Transcoders, Crosscoders & Attribution Graphs
The mechanistic interpretability sequel to Sparse Autoencoders: replacing dense MLPs with JumpReLU Transcoders, exact input-invariant circuit weights, and Crosscoder model diffing in PyTorch.
12 min readTest-Time Reinforcement Learning & Self-Play Verifiers: Scaling Reasoning Without Human Labels
How TTRL majority-vote RL, Absolute Zero Proposer-Solver code self-play, and Test-Time Self-Play bootstrap reasoning curricula without human-labeled ground truth.
12 min readNative Sparse Attention (NSA) & KV-Cache Eviction at 1M+ Context
Hardware-aligned, natively trainable sparse attention: 3-branch gated decomposition (compressed, selected, sliding window), GQA group-shared block loading, and attention-sink eviction mechanics.
12 min read3D Gaussian Splatting from First Principles: EWA Projection, Differentiable Rasterization & Tile Sorting
A practitioner's first-principles guide to 3D Gaussian Splatting: quaternion-scale covariance factorization, EWA Jacobian projection, 16x16 GPU tile radix sorting, and exact reverse-order backward gradients.
13 min readTest-Time Training (TTT) & Fast-Weight RNNs: Updating an MLP Hidden State via Gradient Descent on Every Token
A first-principles guide to Test-Time Training (TTT) layers and fast-weight neural memory: replacing linear SSM hidden states with online self-supervised SGD, TTT-Linear vs TTT-MLP, and the parallel mini-batch dual form in PyTorch.
14 min readWriting Fused LLM Kernels in Triton (Liger-Kernel): Eliminating the 128k-Vocab Logits VRAM Cliff
How fused GPU kernels in Triton (Liger-Kernel) cut LLM training VRAM by 80%: chunked FusedLinearCrossEntropy with in-place gradient overwriting, online SRAM log-sum-exp, and FP32 accumulation footguns in PyTorch.
13 min readMasked Diffusion Language Models (MDLM & LLaDA): Breaking the Autoregressive Token-by-Token Bottleneck
A practitioner's guide to discrete absorbing-state diffusion LLMs (MDLM and LLaDA 8B): continuous-time Rao-Blackwellized ELBO, SUBS zero-mask parameterization, low-confidence parallel remasking, and solving the reversal curse in PyTorch.
14 min readDisentangling Polysemantic Superposition: TopK & JumpReLU Sparse Autoencoders (SAEs) and Dead-Latent Resurrection
A first-principles mechanistic interpretability guide to TopK and JumpReLU Sparse Autoencoders (SAEs): eliminating L1 activation shrinkage, Riemannian tangent gradient projection on unit-norm decoders, and AuxK dead-latent revival in PyTorch.
14 min readBeyond AdamW: Matrix Orthogonalization (Muon), Newton–Schulz Iteration & RMS Scale Alignment at 16B+ Scale
A practitioner's first-principles guide to the Muon optimizer and Moonlight scaling laws: 5-step quintic Newton–Schulz matrix orthogonalization in BF16, 0.2*sqrt(max(m,n)) RMS update alignment, and per-head QKV splitting in PyTorch.
14 min readFull-Duplex Speech-to-Speech Systems: Parallel Audio-Text Streams (Moshi), Inner Monologue & WebSocket Barge-In
How to architect sub-200ms full-duplex conversational audio systems: Dual-Stream RQ-Transformers (Moshi), time-aligned Inner Monologue text prefixes, acoustic delay patterns, and WebSocket barge-in KV-cache rollback.
13 min readSE(3)-Equivariant Flow Matching on Lie Groups: Geodesic Interpolants & Matrix Exponential Maps (FoldFlow)
A first-principles geometric deep learning guide to Riemannian Conditional Flow Matching on SE(3) and SO(3): Rodrigues matrix exponential and logarithmic maps, geodesic optimal transport, and protein backbone generation in PyTorch.
14 min readOutlier-Free 4-Bit & FP8 LLM Systems: Hadamard Invariance (QuaRot), Stiefel Rotations (SpinQuant) & Blockwise FP8
How orthogonal Walsh–Hadamard rotations (QuaRot), Cayley Stiefel manifold optimization (SpinQuant), and 1x128 blockwise FP8 scaling eliminate Transformer activation outliers and enable lossless W4A4KV4 inference in PyTorch.
15 min readBeyond Length-Biased RL: Online Dr. GRPO, Iterative RPO-DPO & Rubric Verifiers Under ASR Noise
A practitioner's first-principles guide to unbiased verifiable reinforcement learning (Dr. GRPO) and Iterative RPO-DPO under noisy multilingual ASR transcripts: fixing length bias, likelihood collapse, and shotgun-questioning exploits in PyTorch.
14 min readFourier Neural Operators (FNO) vs. PINNs: Zero-Shot Super-Resolution on Navier–Stokes
A first-principles practitioner guide to Fourier Neural Operators (FNO): Banach-space operator learning vs. coordinate PINNs, spectral convolution via rfft2, zero-shot 4x super-resolution on 2D Navier–Stokes turbulence, and cuFFT AMP footguns in PyTorch.
14 min readState Space Duality (SSD) & Hybrid Mamba-2: Sub-Quadratic Sequence Parallelism
A practitioner's first-principles guide to Structured State Space Duality (SSD / Mamba-2) and Ring Attention: 1-semiseparable matrix equivalence, Tensor Core blockwise scans, O(1) recurrent state caching, and hybrid GQA+SSD architectures in PyTorch.
15 min readAutonomous AI Scientists: Recursive Hypothesis Search, Sandboxed Execution & Verifiable Rewards
How to architect an autonomous ML research agent: MCTS over executable git commits, rule-based verifiable rewards (GRPO), AST and causal-leakage verification gates, and distributed spot-GPU experiment orchestration.
13 min readContinuous-Time Audio Flow Matching: Vocal Seed Infilling & Phase Coherence Across Long Tracks
A first-principles guide to Masked Conditional Flow Matching for generative music and voice: preventing acoustic timbre drift, bidirectional master-seed infilling, raised-cosine boundary crossfades, and DiT audio velocity fields in PyTorch.
12 min readWeight-Space Programming on Physics Neural Networks: Can an LLM Read and Write PDE Weights?
Testing Gemini 4 Carbon and Gemini 4 Argon on Weight-Space Programming for Physics-Informed Neural Networks (PINNs): zero-shot PDE weight generation, read-only forensics on neuron-permuted models, and surgical weight patching without gradients.
10 min readSparse Mixture-of-Experts (MoE): Routing Math, Load Balancing & Expert Parallelism
A practitioner's first-principles reference to Sparse Mixture-of-Experts (MoE) LLMs: Top-K gating, Switch auxiliary load-balancing loss, Router z-loss, DeepSeek-V3 auxiliary-loss-free bias routing, and All-to-All Expert Parallelism in PyTorch.
15 min readFlow Matching & Diffusion Transformers (DiT): Continuous-Time Generative Physics
A first-principles physics and ML guide to Flow Matching, Optimal Transport Rectified Flows, Score-SDE equivalence, Logit-Normal timestep sampling, and Diffusion Transformers (DiT) with adaLN-Zero in PyTorch.
15 min readTest-Time Compute & Reasoning Verification: PRMs, MCTS & Search Scaling Laws
A practitioner's first-principles guide to LLM test-time compute scaling: Outcome vs. Process Reward Models (ORM vs. PRM), step-level credit assignment, Best-of-N asymptotics, and Monte Carlo Tree Search (PUCT) in PyTorch.
14 min readLLM Inference & Speculative Decoding: From Roofline Physics to Lossless Acceleration
A first-principles practitioner guide to LLM inference engineering: Roofline memory-bandwidth bounds, Paged KV-Cache mechanics, exact Speculative Decoding rejection sampling proof, and tree-based verification in PyTorch.
14 min readAttention Engineering: From MHA to GQA, MLA & FlashAttention
A practitioner's first-principles reference to modern LLM attention: Roofline arithmetic intensity, RoPE & YaRN, GQA, DeepSeek's Multi-Head Latent Attention (MLA) with weight absorption, and FlashAttention-2 online softmax tiling.
14 min readLLM Post-Training: A Practitioner's First-Principles Guide
A deep-dive into the modern post-training stack: SFT, DPO, PPO, GRPO, and Knowledge Distillation with mathematical formulation and PyTorch implementations.
8 min readTesting Gemini Omni: Making a Still Bird Fly
A first look at Gemini Omni's image-to-video generation capabilities, evaluating biomechanical motion realism and temporal consistency.
4 min readBuilding a Custom Agent Skill: The Semantic Git-Commit Assistant
A hands-on tutorial for building a three-layered local agent skill following progressive disclosure design guidelines to enable clean self-correction loops.
7 min readBuilding a Custom MCP Server: The Port & Process Manager
A hands-on tutorial for building a robust, cross-platform Port and Process Manager MCP server using FastMCP and psutil to reclaim ghost ports.
6 min readFrom Prompts to Playbooks: Distilling Anthropic’s Guide to Agent Skills
A high-density guide to building portable, production-ready AI playbooks: progressive disclosure, YAML routing, validation boundaries, and evaluation suites.
7 min readBeyond Chatbots: Hard-Won Realities from OpenAI's Agent Guide
A high-density distillation of OpenAI's practical guide to agents: core mental models, production-grade tool design, and guardrail realities.
10 min readSetup for MCP (Model Context Protocol)
A modern guide to setting up the Model Context Protocol (MCP) for Claude Desktop and Cursor using FastMCP, uvx, and npx.
5 min read