My understanding of Large Language Models like GPT is that they are special kinds of deep neural networks specifically trained to predict the next word, given the beginning of a sentence.
I understand that a key aspect of their architecture is attention, which allows a word representation (a vector) to be mixed-up with the representation of other words in the sentence, the weights being used to make that linear combination representing a notion of proximity as they are derived from the scalar product of the words embedding.
Now, considering a sentence of words like "word1 word2 word3", if we want to feed it to a neural network, which has a fixed number of input nodes, we should represent it as a single input vector of fixed size (same as the number of input nodes). My understanding of attention is that it still produces one vector for each input words, not one vector for the whole sentence.
How is a full sentence turned into a fixed-size vector?