Some Kernel+Inference Engineering Thoughts
Photo of The Matrix. Cite: https://www.reddit.com/r/MovieDetails/comments/joik3h/to_create_the_code_for_the_matrix_1999_a/ Today, I looked into why ANEs aren't used heavily on Macs for LLMs. I also got through a few more minutes of Baseten's video, which I'm almost done with, and I'm nearly finished with chapter 1 of Basten's inference engineering book. ANEs on Macs are typically only good for fixed-size matrices, so there's a potential speedup for linear attention on Macs. This also explains their lack of use in Mac-based engines. People have shown that they're slower for certain models, though I forgot whether those models were linear. I learned that expert parallelism divides the experts in each layer across GPUs. This means GPU:0 could contain experts 1 and 2 for several layers. I also relearned tensor parallelism. It splits a model's weights for each layer across multiple GPUs, then concatenates the outputs through an all-gather to get the final ou...