TensorX
返回文献探索

Paper · arXiv 2504.20966

Softpick: No Attention Sink, No Massive Activations with Rectified Softmax

Zayd M. K. Zuhri, Erland Hilman Fuadi, Alham Fikri Aji

31 upvotesApril 29, 2025arXiv 预印本
AI 摘要

Softpick is a drop-in replacement for softmax in transformer attention mechanisms that improves performance, reduces activation sinks, and achieves sparsity, particularly beneficial for quantization and low-precision training.

softmaxsoftpickattention mechanismsattention sinkkurtosissparse attention mapsquantizationlow-precision trainingsparsity optimizationpruninginterpretability

Abstract

We introduce softpick, a rectified, not sum-to-one, drop-in replacement for softmax in transformer attention mechanisms that eliminates attention sink and massive activations. Our experiments with 340M parameter models demonstrate that softpick maintains performance parity with softmax on standard benchmarks while achieving 0% sink rate. The softpick transformer produces hidden states with significantly lower kurtosis (340 vs 33,510) and creates sparse attention maps (46.97% sparsity). Models using softpick consistently outperform softmax when quantized, with particularly pronounced advantages at lower bit precisions. Our analysis and discussion shows how softpick has the potential to open new possibilities for quantization, low-precision training, sparsity optimization, pruning, and interpretability. Our code is available at https://github.com/zaydzuhri/softpick-attention.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
Softpick: No Attention Sink, No Massive Activations with Rectified Softmax | TensorX