arXiv:1805.02867

Paper record

W2801655600

Online normalizer calculation for softmax

Maxim Milakov, Natalia E. Gimelshein

Year
2018
Venue
arXiv (Cornell University)
References
11
Cited by
301

Details and counts from OpenAlex.

Abstract

The Softmax function is ubiquitous in machine learning, multiple previous works suggested faster alternatives for it. In this paper we propose a way to compute classical Softmax with fewer memory accesses and hypothesize that this reduction in memory accesses should improve Softmax performance on actual hardware. The benchmarks confirm this hypothesis: Softmax accelerates by up to 1.3x and Softmax+TopK combined and fused by up to 5x.