Softpick: Geen Attention Sink, Geen Massale Activaties met Gecorrigeerde Softmax
Softpick: No Attention Sink, No Massive Activations with Rectified Softmax
April 29, 2025
Auteurs: Zayd M. K. Zuhri, Erland Hilman Fuadi, Alham Fikri Aji
cs.AI
Samenvatting
We introduceren softpick, een gecorrigeerde, niet-som-tot-één, directe vervanging voor softmax in transformer-attentiemechanismen die aandachtssinks en massieve activaties elimineert. Onze experimenten met modellen van 340M parameters tonen aan dat softpick prestaties behoudt die gelijk zijn aan softmax op standaard benchmarks, terwijl een sinkpercentage van 0% wordt bereikt. De softpick-transformer produceert verborgen toestanden met aanzienlijk lagere kurtosis (340 vs 33.510) en creëert sparse aandachtmaps (46,97% sparsity). Modellen die softpick gebruiken, presteren consistent beter dan softmax wanneer ze gekwantiseerd worden, met name uitgesproken voordelen bij lagere bitprecisies. Onze analyse en discussie laten zien hoe softpick nieuwe mogelijkheden kan openen voor kwantisatie, training met lage precisie, sparsity-optimalisatie, pruning en interpreteerbaarheid. Onze code is beschikbaar op https://github.com/zaydzuhri/softpick-attention.
English
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.