AI・機械学習
TokenTown: LLMがどのように機能するかを視覚的に理解する方法
TokenTown: A visual way to understand how LLMs work (laurentiugabriel.github.io)
要約
TokenTownは、Transformer言語モデルの各ステージを都市の地区として視覚化したインタラクティブなウェブアプリケーションです。ユーザーは、トークン化、埋め込み、アテンションメカニズム、KVキャッシュ、そして最終的なトークン生成に至るまでのLLMの内部処理を、都市の景観とコンボイの移動を通して直感的に理解できます。このツールは、モデルの重みはランダムですが、処理メカニズムは実際の計算に基づいています。
全文翻訳
How much of it is real
idle
Press Run to start
The city is idle. Type a prompt below and watch a single token make the round trip.
Residual stream idle
12 numbers standing in for the 4,096+ a real model carries. Blue is negative, warm is positive.
Attention softmax over the KV cache
Runs at the Attention Plaza.
Next token logits → softmax
Computed at the Vocabulary Stadium.
Context
Output
nothing yet