News for hackers. Stuff that matters.
Re:Differential Transformer by espadrine on Tuesday October 08, 2024 @01:23PM (#41779617)
It is a neat approach, but one that comes with a tradeoff, IIUC: doubling the key heads.

I wonder if a different approach without that issue exists. For instance, using max(0, exp(x)-1) instead of exp(x) in the softmax attention formula. That way when the query is orthogonal to the key (or worse), it does not contribute.

Re:Differential Transformer by smallnamespace on Tuesday October 08, 2024 @06:40PM (#41782523)
> using max(0, exp(x)-1) instead of exp(x)

Won't this cause the gradient to vanish on the left half, causing problems with training?

Re:Differential Transformer by espadrine on Wednesday October 09, 2024 @02:41AM (#41785150)
That is a concern that is shared with ReLU. But since the weights are shared across the context/minibatch, perhaps that would not be an issue, similar to ReLU.