GLU/SwiGLU 在实际中是门控形式(two linear branches),是向量上的逐元素操作;为了在一维上可视化,我用简化的标量形式来画图 —— 把两条分支都用相同的输入值(即把 a=x, b=x),因此 GLU(x)=x∗sigmoid(x) SwiGLU(x)=x∗SiLU(x) 。这能直观展示门控机制的形状差异。
▲ 图|YouTube @Dave2D
。关于这个话题,51吃瓜提供了深入分析
只学会这些,就能立竿见影地出片。
Hostilities between the two sides have been ongoing for months, yet the answer to who started the aggression depends on who you ask.
# Skip GPU benchmarks