You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[السياق ذو الخطوات الواسعة](#السياق-ذو-الخطوات-الواسعة)
33
-
-[مزيج من السياق المحلي والعالمي](#مزيج-من-السياق-المحلي-والعالمي)
34
-
-[الانتباه القائم على المحتوى](#الانتباه-القائم-على-المحتوى)
35
-
-[الانتباه منخفض الرتبة](#الانتباه-منخفض-الرتبة)
36
-
-[الترانسفورمر في التعلم المعزز](#الترانسفورمر-في-التعلم-المعزز)
37
-
-[الاستشهاد](#الاستشهاد)
38
-
-[المراجع](#المراجع)
39
-
40
-
---
41
-
42
7
تم اقتراح العديد من التحسينات الجديدة على معمارية الترانسفورمر منذ منشوري الأخير حول "[عائلة الترانسفورمر](https://lilianweng.github.io/posts/2020-04-07-the-transformer-family/)" قبل حوالي ثلاث سنوات. هنا قمت بإعادة هيكلة وإثراء كبيرين لذلك المنشور الصادر عام 2020 - حيث أعدت هيكلة التسلسل الهرمي للأقسام وحسنت العديد من الأقسام بأوراق بحثية أحدث. الإصدار 2.0 هو مجموعة شاملة من الإصدار القديم، بطول يبلغ ضعف طوله تقريبًا.
where $g: \mathbb{R}^{[\frac{L}{c}] \times d} \to \mathbb{R}^{L \times d}$ reverses the compression function $f$.
238
238
239
239
2.**Attention-reconstruction loss** (lossy objective) reconstructs content-based attention over memory vs compressed memory and minimize the difference:
Transformer-XL with a memory of size $m$ has a maximum temporal range of $m \times N$, where $N$ is the number of layers in the model, and attention cost $\mathcal{O}(L^2 + Lm)$. In comparison, compressed transformer has a temporal range of $(m_m + c \cdot m_{cm}) \times N$ and attention cost $\mathcal{O}(L^2 + L(m_m + m_{cm}))$. A larger compression rate $c$ gives better tradeoff between temporal range length and attention cost.
_(Left) The order of computation for default softmax operation. (Right) The order of computation when using random feature attention, a lot cheaper than default softmax. (Image source: [Peng et al. 2021](https://arxiv.org/abs/2103.02143))._
747
747
748
748
**Causal Attention RFA** has token at time step $t$ only attend to earlier keys and values $\{\mathbf{k}_i\}_{i \leq t}, \{\mathbf{v}_i\}_{i \leq t}$. Let us use a tuple of variables, $(\mathbf{S}_t \in \mathbb{R}^{2D \times d}, \mathbf{z} \in \mathbb{R}^{2D})$, to track the hidden state history at time step $t$, similar to RNNs:
@@ -763,7 +763,7 @@ RFA leads to significant speedup in autoregressive decoding and the memory compl
763
763
764
764
Performer modifies the random feature attention with positive random feature maps to reduce the estimation error. It also keeps the randomly sampled $\mathbf{w}_1, \dots, \mathbf{w}_D$ to be orthogonal to further reduce the variance of the estimator.
765
765
766
-

766
+

767
767
_Comparison of approximation error when using (Left) i.i.d vs orthogonal features and (Right) sin/cos vs positive random features. (Image source: [Choromanski et al. 2021](https://arxiv.org/abs/2009.14794))._
0 commit comments