Published onMarch 25, 2026|Views: 119|7 min readStop using torch.cat for your KV cache implementationsllmkv-cachepytorchinferenceoptimizationtransformerstl;dr: `torch.cat` is not in-place, instead use pre-allocated buffers
Published onFebruary 14, 2025|Views: 520|17 min readTensor Puzzles Walkthrough: Optimizations, Comparing Solutionstensorspytorchlinear-algebramachine-learningPart 2 of my Tensor Puzzles Walkthrough series: optimizing solutions to fit the puzzle constraints, and comparing notes with the author.
Published onFebruary 12, 2025|Views: 1180|17 min readTensor Puzzles Walkthroughtensorspytorchlinear-algebramachine-learningMy solutions and notes to the tensor broadcasting puzzles created by Sasha Rush.