#sampling
4 articles
01
·VLMs & Multimodal·★ MEMBER·PAPER·8 min read
Video Understanding from Scratch — From a Pile of Frames to a Sense of Time
A video is not just a lot of images. This piece splits video understanding into three questions — which frames to take (sampling), how to mix them (temporal attention), and how to shrink a long video (compression) — and works through each with equations, interactive figures, and code.
02
·Probability & Statistics·★ MEMBER·10 min read
Monte Carlo Methods from Scratch — Solving Integrals with Dice
An integral you cannot solve can still be estimated: scatter random points and take the average. This piece builds up why the law of large numbers buys you only 1/√N, what importance sampling rescues, and how MCMC samples from a distribution whose normalizing constant nobody can compute.
03
·Inference & Serving·★ MEMBER·PAPER·8 min read
Speculative Decoding from Scratch — How a Tiny Draft Model Speeds Up an LLM Without Changing a Single Output
Speculative decoding lets a small model draft several tokens ahead while a large model verifies them in one batch — provably identical outputs, 2–3x faster in practice. A from-scratch walkthrough of the mechanism and the intuition behind the acceptance rate α, straight from the original paper.
04
·Probability & Statistics·★ MEMBER·8 min read
Probability and Statistics for AI — A Model's Output Is a Distribution
Classifiers and language models do not return answers; they return probability distributions. Distributions, expectation, conditional probability and Bayes explained from the symbols up — building to the payoff: why maximum likelihood is where loss functions come from. Cross-entropy and MSE were derived, not invented.