Reproduce “Efficient softmax approximation for GPUs” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Edouard Grave, Armand Joulin, Moustapha Cissé, David Grangier, Hervé Jégou

This paper presents 'adaptive softmax,' an efficient hierarchical approximation strategy for neural network language models with large vocabularies, specifically optimized for GPU computation. The method achieves 2x to 10x speed-ups and enables state-of-the-art perplexity on benchmarks like the One Billion Word dataset using only a single GPU.

Key insights

  • GPU matrix multiplication time is non-linear, with constant overheads for small operations, contradicting assumptions of prior theoretical methods.
  • Leveraging Zipf's Law for word frequencies by strategically partitioning words into a directly accessed 'head' cluster for frequent words and grouped 'tail' clusters for less frequent ones, minimizes computational cost.
  • Optimizing the two-level hierarchy's structure, cluster sizes, and word assignments based on the empirical GPU computation time model improves practical efficiency.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.