Tinkerings
Photo of the author

Notes to build mental models for how things work.

Score centering

rl

Why a mismatched inference engine pushes the trainer toward itself, why ratios cannot fix it cleanly, and the one-line change that does: subtract the engine’s distribution instead of the trainer’s.

Nov 6, 2026

Bias and variance of the policy gradient

rl

Every RL-for-LLM weighting rule, from REINFORCE to DPPO, measured on a toy where the true gradient is exact: bias, variance, the cap, and why a trust region is needed.

Nov 6, 2026

Triton Kernels

gpus
Modern GPUs have massive compute but limited memory bandwidth. The key metric is arithmetic intensity (AI):
Sep 8, 2025

Context Parallelism

distributed-training
Context Parallelism (CP) is a distributed training technique that enables training of LLMs with extremely long sequences (up to 1M tokens) by sharding the sequence dimension…
Sep 3, 2025

Expert Parallelism

distributed-training
Let’s distill how to run a Mixture-of-Experts (MoE) model with expert parallelism with an example.
Sep 1, 2025
No matching items

Tinkerings