Serce transformera: każdy token tworzy zapytanie (Q), klucz (K) i wartość (V), a wynik to średnia wartości ważona podobieństwem zapytania do kluczy wszystkich tokenów. Dzięki temu model łączy informacje z całej sekwencji naraz; koszt rośnie kwadratowo z długością tekstu. W modelach generujących tekst stosuje się maskę przyczynową (token widzi tylko poprzednie).
The heart of the transformer: each token produces a query (Q), key (K) and value (V), and the output is a weighted average of values, weighted by query–key similarity across all tokens. This lets the model mix information from the whole sequence at once; cost grows quadratically with length. Text-generating models use a causal mask (a token sees only earlier ones).
To sposób, w jaki każdy fragment danych dobiera informacje z innych fragmentów tego samego wejścia.
This lets each data element draw information from other elements of the same input.
Samo słowo nie wystarcza, żeby ustalić, do czego odnosi się w całym zdaniu.
A word alone is not enough to determine what it refers to in a sentence.
Fragmenty tworzą zapytania i opisy, porównują je, a potem mieszają informacje według dopasowania i dozwolonego zakresu widzenia.
Elements create queries and descriptors, compare them, then mix information according to their match and the permitted viewing range.
W zdaniu o oddaniu klucza sąsiadowi model zestawia zaimek z wcześniejszą wzmianką, żeby przygotować odpowiedź o odbiorcy.
In a sentence about giving a neighbour a key, a model connects a pronoun with an earlier reference to answer about the recipient.