tutorials.pmanko.dev · Stream 2 — The Laboratory

First-Principles AI Engineering Tutorials

Hands-on, mathematically grounded engineering tutorials built inside the-laboratory. Each tutorial pairs theoretical derivations and interactive visual simulators with scaffolded Marimo / PyTorch exercises (# TODO stubs) that graduate into production clinical AI components.

Editorial Light Mode Interactive Visual Simulators Scaffolded Marimo + Pytest Loop
Active Tutorials
Tutorial 01 · System-1 Clinical Verification

System-1 Decision Layers with Laya

From strictly proper scoring rules, Murphy's Brier decomposition, and post-hoc temperature scaling to Laya's ModernBERT-large + [MASK]-gather architecture, 1.16% base-rate prior shift correction, and 3-band selective classification for OpenMRS ChartSearchAI.

Planned in The Laboratory (Stream 2)
Tutorial 02 · Post-Training Foundations

LoRA Without Regret & Memory Rooflines

Adapter placement across attention vs. MLP projections, scaling laws for low-rank learning rates, activation memory arithmetic on Apple Silicon MPS vs. NVIDIA GPUs, and verifiable GSM8K/clinical SFT.

Tutorial 03 · Alignment & RLVR

On-Policy Distillation & Group Relative Policy Optimization (GRPO)

Reverse vs. forward KL divergence in distillation, Critic-free group-normalized advantage estimation, deterministic FHIR/CQL clinical reward verifiers, and policy-collapse diagnostics.

Tutorial 04 · Statistical Evaluation

Prediction-Powered Inference (PPI) for Clinical AI

Combining small gold-standard clinician adjudication sets ($n=60$) with large LLM/Laya trace cohorts ($N=6,635$) to construct unbiased, variance-reduced confidence intervals with valid coverage.