To Be Human
Here is a running list of lessons that I have learned over the years from my mistakes. This list isn’t complete, as I am very capable at finding more spectacular ways to fail.
Life Principles
- Life is short; time is your most valuable currency.
- Take full responsibility for your actions and own the outcomes.
- In the grand scheme of things, your existence is utterly meaningless. Only the pursuit of dreams gives life its meaning.
- Attachment is the cause of all suffering.
- Be kind to others without ever expecting anything in return.
Work Principles
- Don’t reinvent the wheel. Ask the best human (or AI) expert to identify the existing solutions.
- Never micromanage, and never allow yourself to be micromanaged.
- Be aware of your blind spots and collaborate with people who complement your weaknesses.
- People think and work differently. Create a space for them to explain their perspectives.
Machine Learning
- When in doubt, always start with AdamW with learning rate between $[10^{-4}, 10^{-3}]$ and a linear warm-up.
- Adam is a memory-hog because it tracks EMA estimates of the first two moments of the gradient.
- Covariance is the dimension-scaled dot product of two mean-centered vectors and measures their directional alignment.
- Multi-headed self-attention can be viewed as a dynamic CNN whose kernel spans the entire input, with each attention head acting as a separate channel.
- When increasing the number of tokens per batch, a useful initial heuristic is: $\mathrm{lr} \sim \sqrt{\mathrm{tokens}}$.
- Larger models require more data and computational resources but not linearly. Your model might be undertrained for its size.
- Floating-point precision varies with magnitude, so final result of arithmetic depends on the order of operations, ie. $(a + b) + c \neq a + (b + c)$. This makes many algorithms non-deterministic on parallel GPU kernels. For example, as of 2025, there is no deterministic CUDA kernel for
torch.cumsum.
