Published onMarch 25, 2026|Views: 70|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: 459|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: 1055|17 min readTensor Puzzles Walkthroughtensorspytorchlinear-algebramachine-learningMy solutions and notes to the tensor broadcasting puzzles created by Sasha Rush.