Thomas Ahle
banner
thomasahle.bsky.social
Thomas Ahle
@thomasahle.bsky.social
Head of AI @ NormalComputing. Tweets on Math, AI, Chess, Probability, ML, Algorithms and Randomness. Author of tensorcookbook.com
like this?
November 12, 2025 at 10:09 AM
Added a new symbols menu - let me know if I missed any of your favourite LaTeX commands!
November 11, 2025 at 12:02 AM
Isserlis' (or Wick's) theorem is one of the strongest tools to handle High Dimensional Gaussians.

Turns out it generalizes to _every distribution_ using cumulant tensors!

That's higher order variance, skewness, kurtosis, etc.
February 19, 2025 at 9:15 PM
I added a Playground to tensorcookbook.com for when you need that Matrix or Tensor Derivative in a hurry.

Hopefully it can also be a way to help people become familiar with tensor diagrams.
February 18, 2025 at 8:01 AM
Some sketches for the next chapter
February 6, 2025 at 10:28 AM
I added code execution to tensorcookbook.com so you can try tensorgrad's automatic tensor algebra without installing anything.
February 4, 2025 at 3:58 PM
Tensor Product Attention illustrated with Tensor Diagrams
January 18, 2025 at 2:00 PM
Neat one-page proof of "Stirling's bound"

(n/e)ⁿ√{2π n} ≤ n! ≤ (n/e)ⁿ(√{2π n}+1)

Inspired by the discussion on mathoverflow.net/a/458011/5429. Just had to keep hitting it with logarithmic inequalities...
December 18, 2024 at 12:37 PM
"Central Limit Theorem" for the Poisson Distribution
December 11, 2024 at 10:45 AM
Chess engines like Stockfish will keep a so-called butterfly board, keeping track of how often a move was chosen in the search tree. _Independently of the position_.

This is data is considered elsewhere in the search tree to decide how much time to spend considering the move.

Why do this?

2/5
December 3, 2024 at 5:42 AM
Clever use of the KV-cache: Writing in the margins (arxiv.org/abs/2408.14906) at Neurips next week.

By "taking notes" as you read, ypu reduce the complexity from N^3 (N tokens at N^2 cost) to N^3/3 (1+4+9+...+N^2).
November 29, 2024 at 4:27 PM