A(q, K, V) = V @ softmax(K / √d @ q)
Weights: K / √d and V
nonlinearity: softmax
💡This offers fresh insights into KV cache compression research 🧵(1/3)
A(q, K, V) = V @ softmax(K / √d @ q)
Weights: K / √d and V
nonlinearity: softmax
💡This offers fresh insights into KV cache compression research 🧵(1/3)
Linear attention and its variants enable faster inference without growing the KV cache.
Let’s learn the core ideas behind efficient sequence modeling.
youtu.be/pUCWwGR5WmQ
Linear attention and its variants enable faster inference without growing the KV cache.
Let’s learn the core ideas behind efficient sequence modeling.
youtu.be/pUCWwGR5WmQ
LogSumExp is softmax. What everyone calls softmax, is softargmax.
LogSumExp is softmax. What everyone calls softmax, is softargmax.
github.com/xjdr-alt/ent...
github.com/xjdr-alt/ent...
statmodeling.stat.columbia.edu/2024/12/26/t...
statmodeling.stat.columbia.edu/2024/12/26/t...
I really enjoy these cases shaped like VHS tape boxes:
I really enjoy these cases shaped like VHS tape boxes:
This was based on a real bug I found in a neural chess model implementation.
This was based on a real bug I found in a neural chess model implementation.
Given any pytorch model, it profiles it, ranks bottlenecks by amdahl's law, writes triton or CUDA C++ replacements, and runs 300+ experiments overnight with no human in the loop.
- 5.29x over pytorch eager on rmsnorm
- 2.82x on softmax
Given any pytorch model, it profiles it, ranks bottlenecks by amdahl's law, writes triton or CUDA C++ replacements, and runs 300+ experiments overnight with no human in the loop.
- 5.29x over pytorch eager on rmsnorm
- 2.82x on softmax
In this worklog, start by benchmarking PyTorch's softmax operation then finally iteratively optimize it in CUDA. The NVIDIA GPU used for this worklog is one GTX 1050Ti (that's all he has got right now)
maharshi.bearblog.dev/optimizing-s...
In this worklog, start by benchmarking PyTorch's softmax operation then finally iteratively optimize it in CUDA. The NVIDIA GPU used for this worklog is one GTX 1050Ti (that's all he has got right now)
maharshi.bearblog.dev/optimizing-s...