AkihikoWatanabe / paper_notes

たまに追加される論文メモ
https://AkihikoWatanabe.github.io/paper_notes
14 stars 0 forks source link

RWKV: Reinventing RNNs for the Transformer Era, Bo Peng+, N/A, arXiv'23 #765

Open AkihikoWatanabe opened 1 year ago

AkihikoWatanabe commented 1 year ago

URL

AkihikoWatanabe commented 1 year ago

異なるtransformerとRWKVの計算量とメモリ消費量の比較 image

RWKVの構造は基本的に、residual blockをスタックすることによって構成される。一つのresidual blockは、time-mixing(時間方向の混ぜ合わせ)と、channnel-mixing(要素間での混ぜ合わせ)を行う。  RWKVのカギとなる要素は以下の4つであり、RWKVのブロック、およびLMでのアーキテクチャは以下のようになる:

image image image

ここで、token-shiftは、previsou timestepのinputとのlinear interpolationを現在のinputととることである。これにより再帰性を担保する。

RWKVは他のLLMと比較し、パラメータ数に対して性能はcomparableであり、context lengthを増やすことで、lossはきちんと低下し、テキスト生成をする際に要する時間は他のLLMと比較して、トークン数に対して線形にしか増加しない。 image image image