6 ms·
I like the token window bit. I don't really like the probability bit, because it kinda alludes that OpenAI just built a huge probability map of all N-grams (N=8
by spion 4y ago
I like the token window bit. I don't really like the probability bit, because it kinda alludes that OpenAI just built a huge probability map of all N-grams (N=8000) and called it a day.
Which incidentally would also imply that a lot of N-grams just don't exist in the training data, causing the model to completely halt when someone says something unexpected.
But that's not the case - instead we convert words into a lot fuzzier float vector space - and then we train the network to predict the next fuzzy float vector. Since the space is so vast, to do this it must learn the ability to generalize, that is, to extrapolate or interpolate predictions even in situations where no examples exists. For this purpose, it has quite a few layers of interconnects with billions of weights where it sums and multiplies numbers from the initial vectors, and during training it tries to tweak those numbers in the general direction of making the error of its last predicted word vector smaller.
And since the N-gram length is so long, the data so large, and the number of internal weights is so big, it has the ability to generalize (extrapolate) very complex things.
So this "probability of next word" thing has some misleading implications WRT what the limits of these models are.
- nycdatasci 4y ago“The hard and expensive part of the above one-sentence explanation — the part that we’ve only recently hit on how to do using massive amounts of electricity and leading-edge computer chips — is hidden deep inside the word /related/.” The whole point of mentioning relatedness is to show readers that we’re not dealing with finite n-grams.
- ChatGTP 4y agoSo basically, if a pattern that hasn't been encountered before is seen, it will just try to connect "something" together, which is why it does things like predict today's date being in the future etc? The model says, "I don't have a good enough path forwards here, I'll just make one up given the next best thing I have and serve it back"? Maybe this is why Bing is working differently, they've changed the model or the working to just say, "I don't know" when there isn't enough confidence in what it's generated based off what it finds in it's database?
- spion 4y agoNot just connect something. For example, at a certain size, GPT models start to "learn" how to do basic arithmetic (addition), even for numbers with multiple digits they've never encountered before. It might look like a small thing, what with computers being quite able to do arithmetic at the base level. But this is a language model, so its a bit different. It learns how to add numbers without "carrying the 1" first, then at a certain larger size also learns to carry the 1, then when even larger it learns to do that across multiple digits... So its not just blindly guessing, its learning the rules of the game (and in some cases some quite complex rules) by building a model of the world made of words. And the model of digits and addition is just one small bit most likely, as the training space doesn't contain much of that - writing about adding numbers is pretty boring after all. The full model must encode rules and knowledge about a variety of complex things to be able to make reliable predictions. It probably also contains true generalizations that humanity hasn't thought of before, as well as specializations of those generalizations that could be immensely useful.
- LakshyAAAgrawal 4y agoHey! That's a very interesting explanation, could you please provide any references for further/detailed reading on model's abilities to learn to add numbers, with carry and finally with carry across digits?
- spion 4y agoThere is some commentary in the GPT-3 paper https://arxiv.org/pdf/2005.14165.pdf https://arxiv.org/pdf/2005.14165.pdf (figure 3.10 and table 3.10) note: I may have extrapolated a bit more than strictly correct from those two bits, but the accuracy being about 50% indicates carrying is the issue. GPT-3 is at around carrying twice, but hasn't generalized full carrying yet.
- ChatGTP 4y agoThe only issue with the math example would be that we don't do complex math in English. Of course it can learn other "languages" but as you said there is less "written" complex math It probably also contains true generalizations that humanity hasn't thought of before, as well as specializations of those generalizations that could be immensely useful. I thought this is quite exciting, I actually think this will become a field of research in itself, and that might spur completely novel new industries and field of technology, research etc. I'm being optimistic here but I hope we're on the cusp of a greater future, rather than a dystopian one brought on by terminators and AI that replaces all work :)
- jimbokun 4y agoThe author knows all that, he’s just trying to simplify to give the layman some intuition about what’s going on.
- cwkoss 4y agoHow many dimensions does the vector space have? Seems like there are an infinite number of ways you could convert word->vector, how do you choose which one is 'right'? What should I google to understand how a word is encoded as a vector and then vector turned back into word(s)?
- spion 4y agoThat's the beauty of it - you don't have to choose, the network chooses for you. If you set up your layers such that the first input layer has one input for each possible token (lets say total of 80K weights), and the next layer connected to that layer only 1024 values, you will get "word embeddings" as a consequence of training the network (i.e. each node in the 80K layer will have 1024 values pointing to individual nodes of the next layer) The simplest way to get word embeddings (without necessarily building a complex GPT like model) is word2vec: https://towardsdatascience.com/creating-word-embeddings-coding-the-word2vec-algorithm-in-python-using-deep-learning-b337d0ba17a8 https://towardsdatascience.com/creating-word-embeddings-codi... - the principle is similar but the network is smaller.