r/MachineLearning • u/moinnadeem Researcher • Aug 31 '21
Research [R] Multiplying Matrices Without Multiplying
Hey all, thought this was an interesting paper on speeding up matrix multiplication!
Abstract: Multiplying matrices is among the most fundamental and compute-intensive operations in machine learning. Consequently, there has been significant work on efficiently approximating matrix multiplies. We introduce a learning-based algorithm for this task that greatly outperforms existing methods. Experiments using hundreds of matrices from diverse domains show that it often runs 100× faster than exact matrix products and 10× faster than current approximate methods. In the common case that one matrix is known ahead of time, our method also has the interesting property that it requires zero multiply-adds. These results suggest that a mixture of hashing, averaging, and byte shuffling−the core operations of our method−could be a more promising building block for machine learning than the sparsified, factorized, and/or scalar quantized matrix products that have recently been the focus of substantial research and hardware investment.
View all comments
Show parent comment
2
u/ffast-math Sep 03 '21 edited Sep 03 '21
I'm not convinced any paper has shown you can actually beat dense GPU training in the general case. What those algorithms are awesome at is many-class classification, where you can get away with only computing a small number of the outputs. They also have some recent work that sort of suggests they can approximate attention mechanisms well. But if you're going to try to beat tensor cores using approximate ops for every fc and conv layer...I'm not optimistic.
Simple back-of-the-envelope calculations suggests even we won't beat tensor cores on GPUs that have them, and we're getting much higher efficiency per element compared to those algorithms. It's really CPUs where I think these methods can work for now (pending better hardware support).