Oh, I’m so looking forward to my next coding interview. “Okay, could you show me on the whiteboard how you might go about writing a program that can reverse a string?” “Great, so I’m going to start by initializing a simple transformer-based neural network with 175 billion parameters and 96 attention layers, and I’m going to train it on a corpus of 45 terabytes of data tokenized into about 500 billion tokens…”
"Cool, so what do you think would be the time complexity of that? Do you think we can maybe do better than that?"
Teaching GPT-3 to reverse words
21–30 of 81 posts
Re: Teaching GPT-3 to reverse words
#22Earlier quoted context omitted.
I meant it mostly as a joke, but there is a certain amount of irony to it. This goes way beyond prompt engineering - he wrote an algorithm to run on GPT in a way you would not expect a non-programmer to write. I think the idea is cool and the process to write it was revealing.
Right. What non-programmer is going to think to turn a word into character list with positional metadata sprinkled in.
Re: Teaching GPT-3 to reverse words
#23Has GPT-3 really been "taught" anything here? If you don't provide an explicit example as the context of your input, GPT-3 does not retain the ability to reverse words.
Re: Teaching GPT-3 to reverse words
#24Oh, I’m so looking forward to my next coding interview. “Okay, could you show me on the whiteboard how you might go about writing a program that can reverse a string?” “Great, so I’m going to start by initializing a simple transformer-based neural network with 175 billion parameters and 96 attention layers, and I’m going to train it on a corpus of 45 terabytes of data tokenized into about 500 billion tokens…”
"Cool, so what do you think would be the time complexity of that? Do you think we can maybe do better than that?"
Re: Teaching GPT-3 to reverse words
#25> GPT-3 correctly reverses long words! But to get there, we had to teach GPT-3 the algorithm to use to get around its limitations. Has GPT-3 really been "taught" anything here? If you don't provide an explicit example as the context of your input, GPT-3 does not retain the ability to reverse words.
That is also why it has such a strong propensity to lose the plot once you are outside of that window size and it's generating new content based on self-generated content.
Re: Teaching GPT-3 to reverse words
#26> Tokens are chunks of characters. For example, the word “alphabet” gets broken up into the tokens “alph" and "abet”. I didn’t know that. Seems like it would confuse it during training. Anyone able to explain?
The alternatives are learning at the character level (way more complex, and scales badly in memory/compute), or learning at the whole word level (needs absurdly massive dictionary of words, and still can’t handle really rare/novel words). Breaking things into a set of subwords that allows you to encode any string solves lots of problems and is the relatively standard way to do things these days.
No, BPEs are more complex: you have a whole additional layer of preprocessing, with all sorts of strange and counterintuitive downstream effects and brand new ways to screw up (fun quiz question: everyone knows that BPEs use '' tokens to denote document breaks; what does the string '' encode to?). BPEs are reliably one of the ways that OA API users screw up, especially when trying to work with longer completions or context windows.
But a character is a character.
> and scales badly in memory/compute)
Actually very competitive: https://arxiv.org/abs/2105.13626#google (Especially if you account for all the time and effort and subtle bugs caused by BPEs.)
Re: Teaching GPT-3 to reverse words
#27> Tokens are chunks of characters. For example, the word “alphabet” gets broken up into the tokens “alph" and "abet”. I didn’t know that. Seems like it would confuse it during training. Anyone able to explain?
Re: Teaching GPT-3 to reverse words
#28> Tokens are chunks of characters. For example, the word “alphabet” gets broken up into the tokens “alph" and "abet”. I didn’t know that. Seems like it would confuse it during training. Anyone able to explain?
Humans also think about words in terms of subcomponents, languages make heavy use of prefixes and suffixes for example.
Re: Teaching GPT-3 to reverse words
#29> GPT-3 correctly reverses long words! But to get there, we had to teach GPT-3 the algorithm to use to get around its limitations. Has GPT-3 really been "taught" anything here? If you don't provide an explicit example as the context of your input, GPT-3 does not retain the ability to reverse words.
No, it isn't taught anything. GPT3 text generation is effectively a really fancy autocompletion algorithm based on the n-many previous tokens in a rolling window. You can only "teach" GPT3 something within that window, and it doesn't "learn" there, it just tries its best to generate content based on what is stored in its massive n-dimension table of graph edges for tokens. That is also why it has such a strong propen…