Something is up with the i dimensions: in the first tensor it is 8192, in the second 12.
I must admit the error message isn’t as clear as it could be, so I took the liberty to file an issue with your example: Clarity of error message in einsum regressed in performance improvements · Issue #58380 · pytorch/pytorch · GitHub 127
Thank you for asking this and providing a straightforward example, it gives us a chance to improve the error message.
Best regards
Thomas